From joachim at buechse.de Tue Aug 1 01:11:30 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 1 Aug 2006 09:11:30 +0200 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <34B6BC40-1405-4A13-8054-0FC6CE10466A@buechse.de> This is a problem with lock files. You should find it somewhere in the documentation... On 01.08.2006, at 03:53, Richard P. Welty wrote: > trying to get my app running on a Mac OS X powerbook, when > the following is executed as the first thing inside the > run method of a Thread: > > > try { > port = (SerialPort) selectedPort.open( > this.getClass().getName(), 2000); > } catch ( PortInUseException ex){ > ex.printStackTrace(); > return; > } > > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java: > 354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run > (ScaleWatcher.java:143) > > i've not seen any documentation suggesting that rxtx would be finicky > about application names... > > thanks for any suggestions, > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From rwelty at suespammers.org Tue Aug 1 05:37:53 2006 From: rwelty at suespammers.org (Richard P. Welty) Date: Tue, 01 Aug 2006 07:37:53 -0400 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <44CF3D11.9060108@suespammers.org> Richard P. Welty wrote: > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) Aha, a confusing error message. it's really a lock file problem; the code is trying to fill in the application name but when it's getting "Unknown Application" and filling that in... richard From ajmas at sympatico.ca Tue Aug 1 13:10:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:10:59 -0400 Subject: [Rxtx] Application Name? Message-ID: <20060801191059.HFCD18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> You need the source code in CVS. The forth coming 2.18 will correct this, but currently the only place to find the correction is in CVS. No idea when 2.18 is due. > > From: "Richard P. Welty" > Date: 2006/08/01 Tue AM 07:37:53 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Application Name? > > Richard P. Welty wrote: > > > i get the following: > > > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > at > > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) > > Aha, a confusing error message. it's really a lock file problem; the > code is trying to fill in the application name but when it's getting > "Unknown Application" and filling that in... > > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:15:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:15:57 -0400 Subject: [Rxtx] Do interfaces break backwards compatibility? Message-ID: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> It is the class that decides to add serializable that needs to worry about those issues. For the most part serial ports and their connection states should be considered as transient, since there is no guarantee they will still be present or that their state will be, especially in a USB world. What you can store is the port settings and port id and then simply test for port availability next time. Nothing else should be assumed. > > From: Gregg Wonderly > Date: 2006/07/31 Mon PM 01:21:19 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Do interfaces break backwards compatibility? > > Doug Berkland wrote: > > As far as I can tell, nothing in either RXTX or Sun's JavaCOMM > > implements Serializable. Therefore, there are no worries from that > > either. (I can't think of a reason anything in JavaCOMM should > > implement Serializable either.) > > Any interface in javax.comm can become implemented by a serializable object. > Thus, if someone wants to provide remote access to a serial port, then they > might (and I think this is not wise) choose to subclass and add Serializable to > the interface list. > > It's that kind of Serialization compatibility that I'm talking about. > > Gregg Wonderly > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:18:11 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:18:11 -0400 Subject: [Rxtx] precompiled for Intel Mac? Message-ID: <20060801191811.FLJY27612.tomts16-srv.bellnexxia.net@smtp1.sympatico.ca> > > From: Joachim Buechse > There will be. However not before we have figured out some remaining issues. What issues are remaining? Andre From Pawan.Kharbanda at dot.state.co.us Tue Aug 1 16:55:08 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 1 Aug 2006 16:55:08 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Hi, I am also experiencing occasional JVM crash thru the native code. I am attaching the log from the crash. Any ideas what might be causing it???? Regards Pawan Kharbanda # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # --------------- T H R E A D --------------- Current thread (0x8d000480): JavaThread "Thread-119" [_thread_in_native, id=111 51] siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba Registers: EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 Top of Stack: (sp=0x8d3482b8) 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 0x8d348308: 00000000 00000002 00000000 00000000 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 Instructions: (pc=0xb75e39b2) 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~StubRoutines::call_stub V [libjvm.so+0x2607ec] V [libjvm.so+0x423828] V [libjvm.so+0x260045] V [libjvm.so+0x2600de] V [libjvm.so+0x2d7745] V [libjvm.so+0x4c2ba3] V [libjvm.so+0x424338] C [libpthread.so.0+0x4dd8] 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 ) =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, id=11026] 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, id=11023] From tjarvi at qbang.org Tue Aug 1 18:46:21 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 1 Aug 2006 18:46:21 -0600 (MDT) Subject: [Rxtx] JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Message-ID: On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) > C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] > 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, > id=11034] > 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, > id=11033] > 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, > id=11032] > 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, > id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] > 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, > id=11028] > 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, > id=11027] > 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, > id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] > 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- Index: termios.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/termios.c,v retrieving revision 1.9.2.57 diff -u -r1.9.2.57 termios.c --- termios.c 4 Jun 2006 02:50:01 -0000 1.9.2.57 +++ termios.c 11 Jun 2006 21:51:10 -0000 @@ -1048,26 +1048,29 @@ if ( !first_tl ) { port->prev = NULL; + port->next = NULL; first_tl = port; } else { - while ( index->next ) + while ( ( index->fd < port->fd ) && index->next ) index = index->next; - if ( port == first_tl ) + if ( index->fd > port->fd ) { - port->prev = NULL; - port->next = first_tl; - first_tl->prev = port; - first_tl = port; + /* inserting previously closed fd */ + port->prev = index->prev; + port->next=index + index->prev->next = port; + index->prev = port; } else { + /* adding to end of list */ port->prev = index; + port->next = NULL; index->next = port; } } - port->next = NULL; LEAVE( "add_port" ); return port; From gergg at cox.net Tue Aug 1 23:25:19 2006 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 02 Aug 2006 00:25:19 -0500 Subject: [Rxtx] Do interfaces break backwards compatibility? In-Reply-To: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <44D0373F.7020600@cox.net> Andre-John Mas wrote: > It is the class that decides to add serializable that needs to worry about those issues. > For the most part serial ports and their connection states should be considered as > transient, since there is no guarantee they will still be present or that their state > will be, especially in a USB world. Right, but when you provide an interface as the standard, that opens the doors for a lot more interpretation and variation. An abstract class can indicate a lot more about what the expected implementation is. Gregg Wonderly From lyon at docjava.com Wed Aug 2 06:02:15 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:02:15 -0400 Subject: [Rxtx] jsr spec and license issues Message-ID: Hi All, Trent and I have been discussing the license issues of the JSR spec and code that we develop, as a community. Here is what we have come up with: >During the development, the new JSR spec that we derive >will be >covered under the LGPL license. Since it is >just interfaces, any contributions will come back to me, for inclusion >into the specification. The goal is to provide a detailed set of >interfaces that >document the present state of our reference model. I am using >the RXTX as the reference model. If there is something missing from >the reference model, or if the reference model has something that should >not be there, we will need to discuss it. > >After Sun accepts the JSR, I, as the copyright holder, can issue >a version with a JSR compatible license. > >The goal is to migrate the interfaces into javax.comm. Does this sound like a reasonable plan to everyone? Thanks! - Doug From joachim at buechse.de Wed Aug 2 06:21:03 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 14:21:03 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Good day, quite frankly I think that this is a very bad idea. This specification (!) should be in the public domain and nowhere else. Defining a spec under the (L)GPL makes absolutely no sense. After all it is a specification not an implementation. There is no or only trivial code attached to it. So while nothing can be gained by putting it under the LGPL, a lot can be lost - for example the contribution of companies that do not like to open source their implementations. Furthermore you are plain wrong assuming you will be the copyright holder to additions made by other people. Best regards, Joachim On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for >> inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that >> should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Aug 2 06:39:28 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:39:28 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Hi All, I don't know anything about licensing issues. The below sounds reasonable. If we make this public domain, will that be compatible with Sun's JSR? Thanks! - DL P.S. I really don't care what we do, as long as there is some sort of collective agreement. >Good day, > >quite frankly I think that this is a very bad idea. This specification >(!) should be in the public domain and nowhere else. > >Defining a spec under the (L)GPL makes absolutely no sense. After all? >it is a specification not an implementation. There is no or only? >trivial code attached to it. So while nothing can be gained by? >putting it under the LGPL, a lot can be lost - for example the? >contribution of companies that do not like to open source their? >implementations. > >Furthermore you are plain wrong assuming you will be the copyright? >holder to additions made by other people. > >Best regards, >Joachim > > >On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for? >>> inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that? >>> should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> >> Does this sound like a reasonable plan to everyone? >> >> Thanks! >> - Doug >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 07:50:09 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 10:50:09 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D0AD91.4080103@gmail.com> Hi, I have been searching the web and here it is: http://jcp.org/en/resources/license_reference Here there is a list of the licenses that are compatible with the JCP for JSR submitting. I think that Apache, CDDL, CPL and OSL are the one that are compatible with our needs. But I think that Apache is the best for us, Doug why do not make a votation? Regards, Manuel > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. > >> Good day, >> >> quite frankly I think that this is a very bad idea. This specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From lyon at docjava.com Wed Aug 2 08:10:55 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 10:10:55 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D0AD91.4080103@gmail.com> References: <44D0AD91.4080103@gmail.com> Message-ID: Hi All, I have no objection to an Apache license for the JSR interfaces that we produce. Would anyone care to comment? Joachim: Does this address your public domain concerns? How does this impact the reference implementation (i.e. RXTX)? Thanks! - DL >Hi, >I have been searching the web and here it is: >http://jcp.org/en/resources/license_reference >Here there is a list of the licenses that are compatible with the JCP >for JSR submitting. >I think that Apache, CDDL, CPL and OSL are the one that are compatible >with our needs. >But I think that Apache is the best for us, Doug why do not make a votation? >Regards, >Manuel > >> Hi All, >> I don't know anything about licensing issues. >> The below sounds reasonable. If we make this public domain, >> will that be compatible with Sun's JSR? >> Thanks! >> - DL >> P.S. I really don't care what we do, as long as there is >> some sort of collective agreement. >>?? >>> Good day, >>> >>> quite frankly I think that this is a very bad idea. This specification >>> (!) should be in the public domain and nowhere else. >>> >>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>> it is a specification not an implementation. There is no or only >>> trivial code attached to it. So while nothing can be gained by >>> putting it under the LGPL, a lot can be lost - for example the >>> contribution of companies that do not like to open source their >>> implementations. >>> >>> Furthermore you are plain wrong assuming you will be the copyright >>> holder to additions made by other people. >>> >>> Best regards, > >> Joachim >>> >>> >>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>> >>>???? >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>?????? >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for >>>>> inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that >>>>> should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>>>???????? >>>> Does this sound like a reasonable plan to everyone? >>>> >>>> Thanks! >>>> - Doug >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>?????? >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>???? >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 08:20:29 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 11:20:29 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D0AD91.4080103@gmail.com> Message-ID: <44D0B4AD.2050106@gmail.com> Doug; > How does this impact the reference implementation (i.e. RXTX)? > Fuck I have not thinked about that, we would need that everyone who had colaborated with RXTX and have putted code on it to agree a license chaging. Or start from sractch. I don't know if Trent have the right to do that. Regards, Manuel > > >> Hi, >> I have been searching the web and here it is: >> http://jcp.org/en/resources/license_reference >> Here there is a list of the licenses that are compatible with the JCP >> for JSR submitting. >> I think that Apache, CDDL, CPL and OSL are the one that are compatible >> with our needs. >> But I think that Apache is the best for us, Doug why do not make a votation? >> Regards, >> Manuel >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> >> >> Joachim >> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 08:21:15 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 16:21:15 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Putting something in the public domain means, that it can be used by anyone for whatever (s)he thinks is appropriate. The authors define no restriction regarding it's use. That's how any specification should be. Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From berkland at spamcop.net Wed Aug 2 08:50:50 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 10:50:50 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> You may want to consider making it available under two separate licenses. 1 - LGPL as it is today The LGPL can be used by anyone wanting to extend the current functionality, as long as they provide code for anything they change. 2 - Sun Community Source License (SCSL) http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf The SCSL will allow anyone who wants to do a closed source implementation from the ground up to do so, if I'm reading it correctly, as long as they don't use any of the code from the Reference Implementation. This will satisfy any company that wants to have a closed-source implementation, but not help them out very much. On 8/2/06, Joachim Buechse wrote: > Putting something in the public domain means, that it can be used by > anyone for whatever (s)he thinks is appropriate. The authors define > no restriction regarding it's use. That's how any specification > should be. > > Best regards, > Joachim > > > On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > > > Hi All, > > I don't know anything about licensing issues. > > The below sounds reasonable. If we make this public domain, > > will that be compatible with Sun's JSR? > > Thanks! > > - DL > > P.S. I really don't care what we do, as long as there is > > some sort of collective agreement. > >> Good day, > >> > >> quite frankly I think that this is a very bad idea. This > >> specification > >> (!) should be in the public domain and nowhere else. > >> > >> Defining a spec under the (L)GPL makes absolutely no sense. After all > >> it is a specification not an implementation. There is no or only > >> trivial code attached to it. So while nothing can be gained by > >> putting it under the LGPL, a lot can be lost - for example the > >> contribution of companies that do not like to open source their > >> implementations. > >> > >> Furthermore you are plain wrong assuming you will be the copyright > >> holder to additions made by other people. > >> > >> Best regards, > >> Joachim > >> > >> > >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> > >>> Hi All, > >>> Trent and I have been discussing the license issues of the > >>> JSR spec and code that we develop, as a community. > >>> Here is what we have come up with: > >>> > >>>> During the development, the new JSR spec that we derive > >>>> will be > >>>> covered under the LGPL license. Since it is > >>>> just interfaces, any contributions will come back to me, for > >>>> inclusion > >>>> into the specification. The goal is to provide a detailed set of > >>>> interfaces that > >>>> document the present state of our reference model. I am using > >>>> the RXTX as the reference model. If there is something missing > >>>> from > >>>> the reference model, or if the reference model has something that > >>>> should > >>>> not be there, we will need to discuss it. > >>>> > >>>> After Sun accepts the JSR, I, as the copyright holder, can issue > >>>> a version with a JSR compatible license. > >>>> > >>>> The goal is to migrate the interfaces into javax.comm. > >>> > >>> Does this sound like a reasonable plan to everyone? > >>> > >>> Thanks! > >>> - Doug > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From naranjo.manuel at gmail.com Wed Aug 2 09:03:02 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 12:03:02 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> References: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> Message-ID: <44D0BEA6.2040408@gmail.com> Or even better, you can use Apache v2, which allows both Open Source and Closed Source forms ;-) > You may want to consider making it available under two separate licenses. > > 1 - LGPL as it is today > > The LGPL can be used by anyone wanting to extend the current > functionality, as long as they provide code for anything they change. > > 2 - Sun Community Source License (SCSL) > http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf > > The SCSL will allow anyone who wants to do a closed source > implementation from the ground up to do so, if I'm reading it > correctly, as long as they don't use any of the code from the > Reference Implementation. This will satisfy any company that wants to > have a closed-source implementation, but not help them out very much. > > On 8/2/06, Joachim Buechse wrote: > >> Putting something in the public domain means, that it can be used by >> anyone for whatever (s)he thinks is appropriate. The authors define >> no restriction regarding it's use. That's how any specification >> should be. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This >>>> specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> Joachim >>>> >>>> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing >>>>>> from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 09:46:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 17:46:25 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> I assume that javax.comm/RXTX is to be redefined using Interfaces. In this case we should separate 2 things: 1) The specification and it's incarnation in the form of java classes defining the interfaces. 2) The actual implementation of the functionality. It is possible that 1) may contain some trivial code in abstract or none abstract classes (ie PortFactory, PortRegistry, etc). Doug's original question was regarding 1) - unless I misunderstood. I personally think that 1) should be in the public domain. It should not be covered by any restrictions what-so-ever. Let it be free as in "totally free in any respect". I do not care under which license 2) is released. Why? Because it is in my very interest that all/almost all vendors include implementations with their distributions. Which will only happen if they do not need to respect open source licenses. (javax.comm is not nearly as important as the Apache web server or MySql, so nobody will take licensing risks). Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ssbello at gmail.com Wed Aug 2 10:28:30 2006 From: ssbello at gmail.com (Simone) Date: Wed, 2 Aug 2006 18:28:30 +0200 Subject: [Rxtx] pocketPC 2003 Message-ID: <39ed505d0608020928k6ceb01aen470c2e6a78c5a6b0@mail.gmail.com> Does anyone know if the Rxtx works on PocketPc 2003? If yes, could you, please, give me some suggestion. Thanks, Simone Bell? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/72e0fb87/attachment-0327.html From berkland at spamcop.net Wed Aug 2 13:00:10 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 15:00:10 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> Message-ID: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> How about these for the "Business Terms" of the new JSR: > The specification will be released in accordance with standard terms > as specified by the JCP process. > > The reference implementation (RI) will be delivered in binary form > free of charge from http://rxtx.org. Licensing details are expected to > be under the Binary Code License (BCL). > > The source for the reference implementation is expected to be > delivered via the Limited GNU Public License (LGPL) and available free > of charge. > > The TCK will be made available free of charge to all J2SE and J2EE licensees. > > The TCK will be offered for license at no charge, without support or > any trademark license rights, to qualified not-for-profit entities > (including not-for-profit) academic institutions) and qualified > individuals engaged in efforts to create compatible implementations of > the Specification. From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 13:13:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 13:13:33 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E495@hqexchange3.dot.state.co.us> Trent, I didn't exactly get it. Again I am not a C guy, maybe its very simple for you but I don't see any checks for FD (as written in the patch for termios.c) in the initialise_event_info_struct, I see some checks in the interruptEventLoop call. Second as you explained I open three("/dev/cuf01","/dev/cuf01","/dev/cuf01") ports, I close the 2nd ("/dev/cuf02", the other 2 are still open) , I never try to open the third ("/dev/cuf03") port again if it is already open. Are you planning to have a fix for this in the next release 2.1.8. Its very important for me to have a fix for this, its causing some major headaches for our project. I know you have your regular job too, I will appreciate any help. Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, August 01, 2006 6:46 PM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java > VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic > frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) C [librxtxSerial.so+0x69b2] > initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] > Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" > [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: > /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread > "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 > JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon > [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" > daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread > "AdapterThread" daemon [_thread_blocked, id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, > id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Wed Aug 2 13:14:20 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 16:14:20 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> Message-ID: <44D0F98C.1070600@gmail.com> +1 Agree > How about these for the "Business Terms" of the new JSR: > > >> The specification will be released in accordance with standard terms >> as specified by the JCP process. >> >> The reference implementation (RI) will be delivered in binary form >> free of charge from http://rxtx.org. Licensing details are expected to >> be under the Binary Code License (BCL). >> >> The source for the reference implementation is expected to be >> delivered via the Limited GNU Public License (LGPL) and available free >> of charge. >> >> The TCK will be made available free of charge to all J2SE and J2EE licensees. >> >> The TCK will be offered for license at no charge, without support or >> any trademark license rights, to qualified not-for-profit entities >> (including not-for-profit) academic institutions) and qualified >> individuals engaged in efforts to create compatible implementations of >> the Specification. >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From savagobr at yahoo.com Wed Aug 2 13:40:42 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:40:42 -0700 (PDT) Subject: [Rxtx] jsr spec and license issues Message-ID: <20060802194042.83599.qmail@web53807.mail.yahoo.com> Friends Apache seems ok... if I get it right, does it *almost* equals to BSD? Regarding public domain: I think that the good people that spent so much time on this library will like to keep some rights over its own work, don't you think? Best regards Savago --------------------------------- Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/79abdfd5/attachment-0327.html From savagobr at yahoo.com Wed Aug 2 13:58:04 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:58:04 -0700 (PDT) Subject: [Rxtx] JVM Crashing Message-ID: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago --------------------------------- Groups are talking. We´re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/47d561ae/attachment-0327.html From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 14:09:18 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 14:09:18 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E4AD@hqexchange3.dot.state.co.us> Thank You :) ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adenilson Cavalcanti Sent: Wednesday, August 02, 2006 1:58 PM To: rxtx at qbang.org Subject: Re: [Rxtx] JVM Crashing Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago ________________________________ Groups are talking. We?re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/b4eb22cf/attachment-0327.html From tjarvi at qbang.org Wed Aug 2 20:23:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 20:23:42 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > Hi Doug As mentioned off the list, the important point in my mind is that everyone is on the same base more than what license is decided upon. These things are just best addressed early so there isn't confusion. The Apache license is fairly standard in the Open Source community vs several of the relatively unknown [and obviously redundat even by their descriptions] offerings by Sun. Perhaps one option here that would kill a few birds with one stone is to dual license the interface as Apache and LGPL. This would allow everyone to use the interfaces without needing to do wastefull work for internal license requirements. Projects could choose between the two the license that best suits their needs. If there is a software shop doing Java that isn't familiar with the Apache license, they must be doing some strange Java. I do think it is foolhearty to blindly travel in public domain but nobody is trying to undermine the spec files. The intent is to use the work for a JSR submission that everyone can use without confusion later on down the line. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 21:01:16 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 20:01:16 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D166FC.9090005@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> Does this sound like a reasonable plan to everyone? >> > > Hi Doug > > As mentioned off the list, the important point in my mind is that everyone > is on the same base more than what license is decided upon. These things > are just best addressed early so there isn't confusion. > > The Apache license is fairly standard in the Open Source community vs > several of the relatively unknown [and obviously redundat even by > their descriptions] offerings by Sun. The JCP is a reasonable process for what the RxTx project intends to achieve by evolving the API. There isn't much to lose by going the JSR route. The community will benefit from a fair API like so many other that have undergone the process. Sun isn't going to own the API or manipulate it into anything weird anymore than anyone else is. I think your fears are rather vague and unfounded. Which isn't to say that I am a well-informed representative of the JCP, I've only sat through one JSR process and we ended up with javax.usb, and IBM got what it wanted out of the deal and the community got a very nice standard. Paul > > Perhaps one option here that would kill a few birds with one stone is to > dual license the interface as Apache and LGPL. This would allow everyone > to use the interfaces without needing to do wastefull work for internal > license requirements. Projects could choose between the two the license > that best suits their needs. If there is a software shop doing Java that > isn't familiar with the Apache license, they must be doing some strange > Java. > > I do think it is foolhearty to blindly travel in public domain but nobody > is trying to undermine the spec files. The intent is to use the work for > a JSR submission that everyone can use without confusion later on down the > line. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Aug 2 22:10:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 22:10:48 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D166FC.9090005@sun.com> References: <44D166FC.9090005@sun.com> Message-ID: On Wed, 2 Aug 2006, Paul Klissner wrote: > Trent Jarvi wrote: >> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> Does this sound like a reasonable plan to everyone? >>> >> >> Hi Doug >> >> As mentioned off the list, the important point in my mind is that everyone >> is on the same base more than what license is decided upon. These things >> are just best addressed early so there isn't confusion. >> >> The Apache license is fairly standard in the Open Source community vs >> several of the relatively unknown [and obviously redundat even by >> their descriptions] offerings by Sun. > > The JCP is a reasonable process for what the RxTx project intends > to achieve by evolving the API. > > There isn't much to lose by going the JSR route. The community will > benefit from a fair API like so many other that have undergone > the process. Sun isn't going to own the API or manipulate it > into anything weird anymore than anyone else is. I think your > fears are rather vague and unfounded. > > Which isn't to say that I am a well-informed representative > of the JCP, I've only sat through one JSR process and we ended > up with javax.usb, and IBM got what it wanted out of the deal > and the community got a very nice standard. > Hi Paul The JCP should work fine. As our intentions are in line, licensing so that everyone can use the interface code should not be a problem. Note that the current default right now is that the interfaces are copyrighted and no license for distribution is included. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 22:33:51 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 21:33:51 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D166FC.9090005@sun.com> Message-ID: <44D17CAF.1090802@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Paul Klissner wrote: > >> Trent Jarvi wrote: >>> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>> Does this sound like a reasonable plan to everyone? >>>> >>> Hi Doug >>> >>> As mentioned off the list, the important point in my mind is that everyone >>> is on the same base more than what license is decided upon. These things >>> are just best addressed early so there isn't confusion. >>> >>> The Apache license is fairly standard in the Open Source community vs >>> several of the relatively unknown [and obviously redundat even by >>> their descriptions] offerings by Sun. >> The JCP is a reasonable process for what the RxTx project intends >> to achieve by evolving the API. >> >> There isn't much to lose by going the JSR route. The community will >> benefit from a fair API like so many other that have undergone >> the process. Sun isn't going to own the API or manipulate it >> into anything weird anymore than anyone else is. I think your >> fears are rather vague and unfounded. >> >> Which isn't to say that I am a well-informed representative >> of the JCP, I've only sat through one JSR process and we ended >> up with javax.usb, and IBM got what it wanted out of the deal >> and the community got a very nice standard. >> > > Hi Paul > > The JCP should work fine. As our intentions are in line, licensing so > that everyone can use the interface code should not be a problem. Sorry, looks like my concerns were unfounded. I haven't been following the threads closely this week, as work got busy with an escalated issue and new project. Sorry about that. > > Note that the current default right now is that the interfaces are > copyrighted and no license for distribution is included. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Aug 3 03:45:56 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 03 Aug 2006 05:45:56 -0400 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: Hi All, I have been waiting a day for things to cool down. Licensing appears to be a hot-button topic. I have no objection to dual license the interfaces as both Apache and LGPL. Some thoughts: Goal: developers wish to work together on a common piece of code that the team needs. It makes sense that the code base they work on should be Apache-licensed. That makes it possible for the team to use and develop common code, even if the end result is LGPL'd as a whole. If we combine licenses, we must follow the terms of both licenses when distributing the combined work. Thus, the dual license contains the super set of terms in the licenses of Apached and LGPL. This should address concern about using Apache-licensed code within LGPL projects due to the FSF's claim that they are incompatible. Here is a draft statement for RXSL: The RXTX Specification Library (RXSL) uses a dual license strategy for the source code. These licenses are the GNU Lesser General Public License (LGPL) and the Apache License. I strongly encourage users to use the LGPL license and participate fully in the free software community. Dual licensing of the RXSL source code provides open and free access to the technology both for the GPL community and for other developers or companies that cannot use the GPL. Dual license is common practice in open source projects like OpenOffice, Perl and Mozilla. Through the combined use of LGPL and Apache license, developers will have a high degree of freedom yet compatibility and interoperability will be preserved. You can freely modify, extend, and improve the RXSL source code. The only question is whether or not you must provide the source code and contribute modifications to the community. The GNU and Apache licenses allow different ranges of flexibility in this regard, but in the end, regardless of the license used, any and all incompatible changes must be published openly. Note that there is the RXTX Reference Model that uses the org.rxtx package, which itself is protected by the LGPL. This may be part of the distribution, however, it can not be redistributed using a different license. Is everybody OK with this? Thanks Trent, great idea! - Doug From joachim at buechse.de Thu Aug 3 04:15:44 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 3 Aug 2006 12:15:44 +0200 Subject: [Rxtx] JVM Crashing In-Reply-To: <20060802195804.70935.qmail@web53812.mail.yahoo.com> References: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Message-ID: <6ABA2AB2-CECE-4C4B-A7D6-0CDF8B9C95A8@buechse.de> I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of > rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jvermillard at archean.fr Thu Aug 3 04:26:48 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Thu, 03 Aug 2006 12:26:48 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <1154600808.16732.18.camel@localhost.localdomain> Hi, I'm a developer of the Apache MINA framework. It's a network application framework which helps users develop high performance and high scalability network applications easily. http://directory.apache.org/subprojects/mina/index.html . I would like to integrate serial connection to the framework (actualy supporting TCP, UDP (broadcast) and in VM communications), but LGPL is an issue for me. An Apache License would be pretty usefull for me and integrate rxtx functionnalities easly. Thanks, Julien Le jeudi 03 ao?t 2006 ? 05:45 -0400, Dr. Douglas Lyon a ?crit : > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/755cca7f/smime-0327.bin From pascal at quies.net Thu Aug 3 04:32:35 2006 From: pascal at quies.net (Pascal S. de Kloe) Date: Thu, 3 Aug 2006 12:32:35 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <200608031232.35838.pascal@quies.net> Hi Doug, The Apache license is unnessesary complex. It puts all kinds of limitations on the usage. Is there a particular reason why people chose this or was it just the familiar name? I agree with Joachim (again) that the specification and the interfaces should be public domain. However, if we realy need a license then have a look at the X11 license because that one is compatible with the GPL and suits our needs: http://www.fsf.org/licensing/licenses/index_html http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3 ---- start: implementation Copyright (C) 2006 Sun Microsystems, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Sun Microsystems shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Sun Microsystems. Java is a trademark of Sun Microsystems, Inc. ---- end Op donderdag 3 augustus 2006 11:45, schreef Dr. Douglas Lyon: > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Aug 3 05:17:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 05:17:07 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154600808.16732.18.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: On Thu, 3 Aug 2006, Julien Vermillard wrote: > Hi, > > I'm a developer of the Apache MINA framework. It's a network application > framework which helps users develop high performance and high > scalability network applications easily. > http://directory.apache.org/subprojects/mina/index.html . I would like > to integrate serial connection to the framework (actualy supporting TCP, > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > An Apache License would be pretty usefull for me and integrate rxtx > functionnalities easly. > > Thanks, > > Julien > Hi Julien The rxtx license itself will not change. This is just the interface. You would be free to implement an rxtx replacement if the LGPL low level code is a problem for you. These licensing details would make it possible to take the interface code instead of needing to recode them for a new project. You are probably confusing the license problems with the GPL not the LGPL though you can share links to concerns off the list if you would like to go through them. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 11:59:48 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 11:59:48 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E516@hqexchange3.dot.state.co.us> Joachim, I think my both problems (JVM crashing & Port Locking) are being caused by the corruption of "Event Info Struct / EIS" I have noticed with in EIS my "FD" and "Closing" value being overwritten. The problem is definitely in SerialImp.c file. I am trying to understand what the code does and try to pin point the problem by trying few other options. I will keep everybody posted. Regards Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Joachim Buechse Sent: Thursday, August 03, 2006 4:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Thu Aug 3 13:50:07 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 14:50:07 -0500 Subject: [Rxtx] slow startup Message-ID: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete From brian at mbari.org Thu Aug 3 14:05:57 2006 From: brian at mbari.org (Brian Schlining) Date: Thu, 3 Aug 2006 13:05:57 -0700 Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> References: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Message-ID: Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B > Greetings, > I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/ > qbang.org). > > In testing things out, I ran the list ports example from the Wiki, > and it seems to take quite a while for the library to initialize? > Like on the order of 30+ seconds or so after startup (and the RXTX > banner prints), and before the application starts running. > > Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then > I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ > terminal server) and I'm wondering if they are not responding properly > and this is causing the slow startup? Or is this a known problem of > some kind, or maybe something on my system is screwy? > > Thanks, > Pete > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/6123f730/attachment-0326.html From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 14:13:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 14:13:47 -0600 Subject: [Rxtx] slow startup Message-ID: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Hi Pete, RXTX does open and close the ports in Windows. Try downloading utility like PORTMON(only for windows) and you can see that whenever you load RXTX it tries to register all the available COMM ports in the system. It is a little slow if you have virtual ports, we use digi as a terminal server, Its going to get worst of you have comm ports in 100's Thanks Pawan Kharbanda ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Brian Schlining Sent: Thursday, August 03, 2006 2:06 PM To: RXTX Developers and Users Subject: Re: [Rxtx] slow startup Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/94fd105d/attachment-0326.html From pete.flugstad at gmail.com Thu Aug 3 14:32:04 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 15:32:04 -0500 Subject: [Rxtx] slow startup In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Message-ID: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> On 8/3/06, Kharbanda, Pawan wrote: > RXTX does open and close the ports in Windows. Try downloading utility > like PORTMON(only for windows) and you can see that whenever you load RXTX > it tries to register all the available COMM ports in the system. It is a > little slow if you have virtual ports, we use digi as a terminal server, Its > going to get worst of you have comm ports in 100's Okay, I can understand that, but from the PORTMON output, it looks like it's opening each port TWICE: 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS ... 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS Also, assuming instead of listing the ports I wanted to just open one, I'm still seeing the 30 second delay, so it's scanning at startup regardless of what the Java code is going to do. Probably necessary, but annoying. I know, I know, contribute patches... :-) Thanks, Pete From tjarvi at qbang.org Thu Aug 3 15:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 15:04:42 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: On Thu, 3 Aug 2006, Pete Flugstad wrote: > On 8/3/06, Kharbanda, Pawan wrote: >> RXTX does open and close the ports in Windows. Try downloading utility >> like PORTMON(only for windows) and you can see that whenever you load RXTX >> it tries to register all the available COMM ports in the system. It is a >> little slow if you have virtual ports, we use digi as a terminal server, Its >> going to get worst of you have comm ports in 100's > > Okay, I can understand that, but from the PORTMON output, it looks > like it's opening each port TWICE: > > 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > ... > 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > > Also, assuming instead of listing the ports I wanted to just open one, > I'm still seeing the 30 second delay, so it's scanning at startup > regardless of what the Java code is going to do. Probably necessary, > but annoying. > > I know, I know, contribute patches... :-) > I think this problem is in RXTXCommDriver.java. I've just not tracked it down but it should be in the java code, not the native code so easy enough to track down. -- Trent Jarvi tjarvi at qbang.org From jvermillard at archean.fr Fri Aug 4 03:43:28 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:43:28 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: <1154684608.6181.4.camel@localhost.localdomain> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > Hi, > > > > I'm a developer of the Apache MINA framework. It's a network application > > framework which helps users develop high performance and high > > scalability network applications easily. > > http://directory.apache.org/subprojects/mina/index.html . I would like > > to integrate serial connection to the framework (actualy supporting TCP, > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > An Apache License would be pretty usefull for me and integrate rxtx > > functionnalities easly. > > > > Thanks, > > > > Julien > > > > Hi Julien > > The rxtx license itself will not change. This is just the interface. > You would be free to implement an rxtx replacement if the LGPL low level > code is a problem for you. These licensing details would make it possible > to take the interface code instead of needing to recode them for a new > project. > > You are probably confusing the license problems with the GPL not the LGPL > though you can share links to concerns off the list if you would like to > go through them. > > -- > Trent Jarvi > tjarvi at qbang.org Hi, I'm not a license expert but some guys at ASF said me you can't call LGPLed libs from java. some peoples interprete that as static linking and not dynamic linking (no idea why). So ASF/BSD licensied interface willl solve the license probleme. If you got some questions about the ASL and the way you can dual license LGPL/ASL you can ask it on legal-discuss at apache.org Julien -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/8d46c0aa/smime-0326.bin From jvermillard at archean.fr Fri Aug 4 03:51:30 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:51:30 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <1154685091.6181.6.camel@localhost.localdomain> erm from java -> from ASLed Java code Le vendredi 04 ao?t 2006 ? 11:43 +0200, Julien Vermillard a ?crit : > Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > Hi, > > I'm not a license expert but some guys at ASF said me you can't call > LGPLed libs from java. some peoples interprete that as static linking > and not dynamic linking (no idea why). So ASF/BSD licensied interface > willl solve the license probleme. > > If you got some questions about the ASL and the way you can dual license > LGPL/ASL you can ask it on legal-discuss at apache.org > > Julien > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dcc29d70/smime-0326.bin From guille at sms.nl Fri Aug 4 04:35:24 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Fri, 04 Aug 2006 12:35:24 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <7.0.1.0.0.20060804123322.036dc748@sms.nl> At 11:43 04/08/2006, Julien Vermillard wrote: >Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > >Hi, > >I'm not a license expert but some guys at ASF said me you can't call >LGPLed libs from java. some peoples interprete that as static linking >and not dynamic linking (no idea why). This interpretation is wrong. See the official position of the FSF regarding the LGPL and Java: http://www.gnu.org/licenses/lgpl-java.html http://www.fsf.org/licensing/licenses/lgpl-java.html Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From hambyiii at hotmail.com Fri Aug 4 04:52:47 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 10:52:47 +0000 Subject: [Rxtx] error getting InputStream Message-ID: Hi, I have written a program in Java for Windows xp using RXTX (which is why I am using this mailing list :). However, I am getting a problem. I am connecting to a serial port, like so: private CommPortIdentifier portID; private boolean openPort(String selectedPort) { boolean portFound = false; Enumeration portList; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portID.getName().equals(selectedPort)) { portFound = true; break; } } } return portFound; } and then I try and get the serial port input stream (leaving out the try and catch for the sake of space): SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); InputStream inputStream = serialPort.getInputStream(); but on the getInputStream() I get the following error message: Bad file descriptor in nativeavailable I cannot figure out where it is going wrong...anyone any ideas. A quick answer would be wonderful, as I am kinda under the hammer to get this fixed quickly Thanks in Advance Keith From tjarvi at qbang.org Fri Aug 4 05:13:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 05:13:19 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <7.0.1.0.0.20060804123322.036dc748@sms.nl> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> <7.0.1.0.0.20060804123322.036dc748@sms.nl> Message-ID: On Fri, 4 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 11:43 04/08/2006, Julien Vermillard wrote: >> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : >>> On Thu, 3 Aug 2006, Julien Vermillard wrote: >>> >>>> Hi, >>>> >>>> I'm a developer of the Apache MINA framework. It's a network application >>>> framework which helps users develop high performance and high >>>> scalability network applications easily. >>>> http://directory.apache.org/subprojects/mina/index.html . I would like >>>> to integrate serial connection to the framework (actualy supporting TCP, >>>> UDP (broadcast) and in VM communications), but LGPL is an issue for me. >>>> >>>> An Apache License would be pretty usefull for me and integrate rxtx >>>> functionnalities easly. >>>> >>>> Thanks, >>>> >>>> Julien >>>> >>> >>> Hi Julien >>> >>> The rxtx license itself will not change. This is just the interface. >>> You would be free to implement an rxtx replacement if the LGPL low level >>> code is a problem for you. These licensing details would make it possible >>> to take the interface code instead of needing to recode them for a new >>> project. >>> >>> You are probably confusing the license problems with the GPL not the LGPL >>> though you can share links to concerns off the list if you would like to >>> go through them. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >> >> Hi, >> >> I'm not a license expert but some guys at ASF said me you can't call >> LGPLed libs from java. some peoples interprete that as static linking >> and not dynamic linking (no idea why). > > This interpretation is wrong. See the official position of the FSF regarding > the LGPL and Java: > > http://www.gnu.org/licenses/lgpl-java.html > > http://www.fsf.org/licensing/licenses/lgpl-java.html > What I do with legal groups that go down that rat hole is give them a copy of the rxtx 2.0 license. Since the confused legal folks are going in a direction that does not represent the intent of the license or authors at that point and are confused about basic things in our industry that most consider facts, the discussions are very short. The rxtx 2.0 license just adds the following and has for 6 years or so. Not because the lawyers are right. They get confused about intent and even facts. The following is added to make confused lawyers that cant understand intent go far away and never come back. period. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. From hambyiii at hotmail.com Fri Aug 4 05:42:21 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 11:42:21 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Okay, I made a little mistake in my last message. The error is not occuring where I thought it was. Instead it is occuring when I do the following: byte[] readBuffer = new byte[128]; try { int numBytes = 0; try { Thread.sleep(500); } catch (InterruptedException e) {} while (inputStream.available() > 0) { numBytes = inputStream.read(readBuffer); } processReceivedData(readBuffer, numBytes); } catch (IOException e) { System.out.println(e.getMessage()); } So I guess the error is happening on the inputStream.read(readBuffer) again, any help is appreciated and again, thanks in advance Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 10:52:47 +0000 > >Hi, > >I have written a program in Java for Windows xp using RXTX (which is why I >am using this mailing list :). However, I am getting a problem. I am >connecting to a serial port, like so: > private CommPortIdentifier portID; > > private boolean openPort(String selectedPort) > { > boolean portFound = false; > Enumeration portList; > > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portID.getName().equals(selectedPort)) > { > portFound = true; > break; > } > } > } > > return portFound; > } > >and then I try and get the serial port input stream (leaving out the try >and >catch for the sake of space): > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >InputStream inputStream = serialPort.getInputStream(); > >but on the getInputStream() I get the following error message: > >Bad file descriptor in nativeavailable > >I cannot figure out where it is going wrong...anyone any ideas. A quick >answer would be wonderful, as I am kinda under the hammer to get this fixed >quickly > >Thanks in Advance >Keith > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From hambyiii at hotmail.com Fri Aug 4 07:08:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:08:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Hi, I know I am replying to myself a lot at the moment, but more information has come to light (These errors are actually happening on a client machine, on software that has worked for the past month, and only now has started to fail, which is why I am a little slow finding things out) The errors I have already written about are only symptoms of an orignal error. The original error occurs the first time I try to WRITE thte OutputStream: OutputStream oStream = serialPort.getOutputStream(); serialPort.notifyOnOutputEmpty(true); byte[] bs = encodeMessage(configString.toString()); oStream.write(bs); oStream.flush(); The error occurs on oStream.write(bs); and is: Input/output error in writeArray Now writeArray is native code, so I have no idea what is going on there. Any help would be appreciated Thanks Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 11:42:21 +0000 > >Okay, I made a little mistake in my last message. > >The error is not occuring where I thought it was. Instead it is occuring >when I do the following: > >byte[] readBuffer = new byte[128]; > >try { > > int numBytes = 0; > try { > Thread.sleep(500); > } > catch (InterruptedException e) > {} > > while (inputStream.available() > 0) > { > numBytes = inputStream.read(readBuffer); > } > > processReceivedData(readBuffer, numBytes); >} >catch (IOException e) >{ > System.out.println(e.getMessage()); >} > >So I guess the error is happening on the inputStream.read(readBuffer) > >again, any help is appreciated and again, thanks in advance >Keith > > >From: "Keith Thorne" > >Reply-To: RXTX Developers and Users > >To: rxtx at qbang.org > >Subject: [Rxtx] error getting InputStream > >Date: Fri, 04 Aug 2006 10:52:47 +0000 > > > >Hi, > > > >I have written a program in Java for Windows xp using RXTX (which is why >I > >am using this mailing list :). However, I am getting a problem. I am > >connecting to a serial port, like so: > > private CommPortIdentifier portID; > > > > private boolean openPort(String selectedPort) > > { > > boolean portFound = false; > > Enumeration portList; > > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > > while (portList.hasMoreElements()) > > { > > portID = (CommPortIdentifier) portList.nextElement(); > > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > > { > > if (portID.getName().equals(selectedPort)) > > { > > portFound = true; > > break; > > } > > } > > } > > > > return portFound; > > } > > > >and then I try and get the serial port input stream (leaving out the try > >and > >catch for the sake of space): > > > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); > >InputStream inputStream = serialPort.getInputStream(); > > > >but on the getInputStream() I get the following error message: > > > >Bad file descriptor in nativeavailable > > > >I cannot figure out where it is going wrong...anyone any ideas. A quick > >answer would be wonderful, as I am kinda under the hammer to get this >fixed > >quickly > > > >Thanks in Advance > >Keith > > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Aug 4 07:26:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: Hi Keith Can you tell us more about the physical serial port? Might it be 'vanishing?' On Fri, 4 Aug 2006, Keith Thorne wrote: > Hi, > > I know I am replying to myself a lot at the moment, but more information has > come to light (These errors are actually happening on a client machine, on > software that has worked for the past month, and only now has started to > fail, which is why I am a little slow finding things out) > > The errors I have already written about are only symptoms of an orignal > error. The original error occurs the first time I try to WRITE thte > OutputStream: > > OutputStream oStream = serialPort.getOutputStream(); > serialPort.notifyOnOutputEmpty(true); > > byte[] bs = encodeMessage(configString.toString()); > > oStream.write(bs); > oStream.flush(); > > The error occurs on oStream.write(bs); and is: > > Input/output error in writeArray > > Now writeArray is native code, so I have no idea what is going on there. Any > help would be appreciated > Thanks > Keith > > >> From: "Keith Thorne" >> Reply-To: RXTX Developers and Users >> To: rxtx at qbang.org >> Subject: Re: [Rxtx] error getting InputStream >> Date: Fri, 04 Aug 2006 11:42:21 +0000 >> >> Okay, I made a little mistake in my last message. >> >> The error is not occuring where I thought it was. Instead it is occuring >> when I do the following: >> >> byte[] readBuffer = new byte[128]; >> >> try { >> >> int numBytes = 0; >> try { >> Thread.sleep(500); >> } >> catch (InterruptedException e) >> {} >> >> while (inputStream.available() > 0) >> { >> numBytes = inputStream.read(readBuffer); >> } >> >> processReceivedData(readBuffer, numBytes); >> } >> catch (IOException e) >> { >> System.out.println(e.getMessage()); >> } >> >> So I guess the error is happening on the inputStream.read(readBuffer) >> >> again, any help is appreciated and again, thanks in advance >> Keith >> >>> From: "Keith Thorne" >>> Reply-To: RXTX Developers and Users >>> To: rxtx at qbang.org >>> Subject: [Rxtx] error getting InputStream >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 >>> >>> Hi, >>> >>> I have written a program in Java for Windows xp using RXTX (which is why >> I >>> am using this mailing list :). However, I am getting a problem. I am >>> connecting to a serial port, like so: >>> private CommPortIdentifier portID; >>> >>> private boolean openPort(String selectedPort) >>> { >>> boolean portFound = false; >>> Enumeration portList; >>> >>> portList = CommPortIdentifier.getPortIdentifiers(); >>> >>> while (portList.hasMoreElements()) >>> { >>> portID = (CommPortIdentifier) portList.nextElement(); >>> if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) >>> { >>> if (portID.getName().equals(selectedPort)) >>> { >>> portFound = true; >>> break; >>> } >>> } >>> } >>> >>> return portFound; >>> } >>> >>> and then I try and get the serial port input stream (leaving out the try >>> and >>> catch for the sake of space): >>> >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >>> InputStream inputStream = serialPort.getInputStream(); >>> >>> but on the getInputStream() I get the following error message: >>> >>> Bad file descriptor in nativeavailable >>> >>> I cannot figure out where it is going wrong...anyone any ideas. A quick >>> answer would be wonderful, as I am kinda under the hammer to get this >> fixed >>> quickly >>> >>> Thanks in Advance >>> Keith >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From hambyiii at hotmail.com Fri Aug 4 07:52:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:52:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more information >has > > come to light (These errors are actually happening on a client machine, >on > > software that has worked for the past month, and only now has started to > > fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an orignal > > error. The original error occurs the first time I try to WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); > >> } > >> catch (IOException e) > >> { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance > >> Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I am > >>> connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Fri Aug 4 08:21:07 2006 From: gergg at cox.net (Gregg Wonderly) Date: Fri, 04 Aug 2006 09:21:07 -0500 Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: <44D357D3.40303@cox.net> Keith Thorne wrote: > Okay, I made a little mistake in my last message. > > The error is not occuring where I thought it was. Instead it is occuring > when I do the following: > > byte[] readBuffer = new byte[128]; > > try { > > } > catch (IOException e) > { > System.out.println(e.getMessage()); > } > > So I guess the error is happening on the inputStream.read(readBuffer) This is one of the most frustrating things to see over and over. The exception tells you exactly which line the error is occuring on, if you will use it to see where. In Java, these days, every class should do the following. import java.util.logging.*; public class MyClass { Logger log = Logger.getLogger( getClass().getName() ); ...in some method... { String data = ...; // any extra data like addresses or // ports which might be wrong and // cause an exception. try { ... } catch( SomeException ex ) { log.log( Level.SEVERE, ex.toString()+": "+data, ex ); } } } By default, you will see all of the appropriate details of any exception logged at the WARNING or SEVERE level. You can read the javadocs about logging to get more information too. Once you do this, people can then turn up logging and get more information, or otherwise manage it with a logging configuration file or other tools such as JMX or my http://logman.dev.java.net project. Gregg Wonderly From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 09:15:24 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 09:15:24 -0600 Subject: [Rxtx] error getting InputStream Message-ID: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Keith, Please send the full stack trace of the exception, may be I can help you. On Trent's question regarding physical 'Serial Port', do you mean you have a USB(Connected to Client Machine) to 9 Pin Serial cable(Connected to H/W device)? Also please mention which java version you are using? Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Keith Thorne Sent: Friday, August 04, 2006 7:52 AM To: rxtx at qbang.org Subject: Re: [Rxtx] error getting InputStream The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more > > information >has > > come to light (These errors are actually happening on a client > > machine, >on > > software that has worked for the past month, and only now has > > started to fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an > > orignal error. The original error occurs the first time I try to > > WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); } catch (IOException > >> e) { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the > >> inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which > >>> is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I > >>> am connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out > >>> the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get > >>> this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 14:36:16 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 14:36:16 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Trent, As discussed over the phone yesterday, I am emailing you all the details of the bugs I have been experiencing. We do not use Serial Ports like most of the applications. Our application uses approx 80 -100 serial ports (attached thru Digi boxes) which are opened and closed every 20 sec to 1 minute depending upon the type of device. Some Serial ports are left opened all the time and receive event based serial calls while other devices uses polling (request and reply) to collect data. So the opening and closing of the Serial Ports is not really in a sequential order as you mentioned in our conversation yesterday. Also 2 same serial ports can never be opened at one time we have business locks to prevent that from happening. Our findings so far (of course with the help of RXTX user group): The real culprit is in the SerialImp.c file, somehow the other the Event Info Structure in the Linked List gets damaged and loses references to the original EIS structure. I believe both the problems are caused because of the corruption of EIS packet. I have noticed that the link list traversal of EIS in the following methods under SerialImp.c : 1)initialise_event_info_struct 2)finalize_event_info_struct 3)interruptEventLoop So culprit code might be in one of these methods. I am currently using JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and Fedora Core 5). I am also attaching a Test Class to replicate the problem. You need to modify the class and add your systems Serial ports into the code and execute. java TestOpenClosePort 100 It will open and close all the serial ports 100 times in there own thread. Please let me know, I will be available thru out this weekend and can help you as much as I can with testing. Regards Pawan Kharbanda CDOT-ITS 303-478-2991 (cell) 303-985-4350 (home) -------------- next part -------------- A non-text attachment was scrubbed... Name: TestOpenClosePort.java Type: application/octet-stream Size: 6139 bytes Desc: TestOpenClosePort.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dd3754d9/TestOpenClosePort-0325.obj From tjarvi at qbang.org Fri Aug 4 15:43:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 15:43:09 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: Thanks, I'll look at it tomorrow morning. I don't know when I'll find the solution but you may check email tomorrow afternoon to see if I think I found it. On Fri, 4 Aug 2006, Kharbanda, Pawan wrote: > Trent, > As discussed over the phone yesterday, I am emailing you all the > details of the bugs I have been experiencing. We do not use Serial Ports > like most of the applications. Our application uses approx 80 -100 > serial ports (attached thru Digi boxes) which are opened and closed > every 20 sec to 1 minute depending upon the type of device. Some Serial > ports are left opened all the time and receive event based serial calls > while other devices uses polling (request and reply) to collect data. So > the opening and closing of the Serial Ports is not really in a > sequential order as you mentioned in our conversation yesterday. Also 2 > same serial ports can never be opened at one time we have business locks > to prevent that from happening. > > Our findings so far (of course with the help of RXTX user group): > > The real culprit is in the SerialImp.c file, somehow the other the Event > Info Structure in the Linked List gets damaged and loses references to > the original EIS structure. I believe both the problems are caused > because of the corruption of EIS packet. I have noticed that the link > list traversal of EIS in the following methods under SerialImp.c : > > 1)initialise_event_info_struct > 2)finalize_event_info_struct > 3)interruptEventLoop > > So culprit code might be in one of these methods. I am currently using > JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and > Fedora Core 5). > > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > > Regards > Pawan Kharbanda > CDOT-ITS > 303-478-2991 (cell) > 303-985-4350 (home) > > > > > > > > > > From tjarvi at qbang.org Sat Aug 5 12:32:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:32:40 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:34:27 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:34:27 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> You need to run it few times. More the number of ports, more frequently you can reproduce. With just 2 ports it will be hard to reproduce frequently. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:33 PM To: Kharbanda, Pawan Cc: tjarvi at qbang.org; RXTX Developers and Users Subject: Re: Port Locking / JVM Crashing > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Aug 5 12:52:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:52:26 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> Message-ID: Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more frequently > you can reproduce. With just 2 ports it will be hard to reproduce > frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:57:49 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:57:49 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Trent, I have 5 ports of Digi and I can reproduce almost every time. Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX version -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:52 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more > frequently you can reproduce. With just 2 ports it will be hard to > reproduce frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need >> to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From tjarvi at qbang.org Sat Aug 5 13:06:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:06:07 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Message-ID: You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few thousand > iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:07:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:07:33 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E659@hqexchange3.dot.state.co.us> We use our own locks but I haven't turned off the RXTX locks. I am still using the RXTX locks that might be the difference. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:13:22 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:13:22 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Trent, How can you turn off the lock files? I can try using that. I never tried that, I thought you can't turn off the file locking. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From tjarvi at qbang.org Sat Aug 5 13:18:53 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:18:53 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Message-ID: Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java > -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except lockfiles > are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:31:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:31:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Trent, I am able to constantly replicate almost everytime even when I have locks disabled. Don't know the reason why you are not able to on your environment. Any suggestions??????? Cycle No (Thread ::: /dev/cuf04) ::::::: 7 Cycle No (Thread ::: /dev/cuf01) ::::::: 7 Cycle No (Thread ::: /dev/cuf02) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) Exiting Thread ::: /dev/cuf03 Cycle No (Thread ::: /dev/cuf03) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent Port /dev/cuf01 is Opened 0x01 Sent Port /dev/cub01 is Opened 0x01 Sent Port /dev/cuf01 is Closed Port /dev/cuf02 is Closed Port /dev/cuf03 is Closed Port /dev/cuf04 is Closed Port /dev/cub01 is Closed Exiting Thread ::: /dev/cuf03 Exiting Thread ::: /dev/cuf02 Cycle No (Thread ::: /dev/cuf03) ::::::: 8 Cycle No (Thread ::: /dev/cuf02) ::::::: 8 Exiting Thread ::: /dev/cuf04 Exiting Thread ::: /dev/cuf01 Cycle No (Thread ::: /dev/cuf01) ::::::: 8 Cycle No (Thread ::: /dev/cuf04) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened 0x01 Sent Port /dev/cuf01 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 # # An error report file with more information is saved as hs_err_pid21386.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:19 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) > 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux > java -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except > lockfiles are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code >>>> and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm >>> running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From tjarvi at qbang.org Sat Aug 5 14:14:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 14:14:49 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: I'd stick a couple $15 dual port serial boards in the machine to see if its kernel driver specific. I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more problematic. They do not get the same number of eyes looking for problems. You could try putting #undef TIOCSERGETLSR #undef TIOCGICOUNT in the very top of SerialImp.h or one or the other to flip bits of code off and on. The kernel here is 2.6.11.4-20a-smp from Suse. glibc is 2.3.4-23.4 from Suse the jre is 1.5.0_06-b05 from Sun. The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC ram. You should be able to reproduce what I'm seeing then go from there. I don't think I'm going to see this problem without having the same cornercase hardware you have. Maybe we can work that out off the list but I doubt I'm going to find it in rxtx at this point. I have seen problems in the past were kernel structs don't match user space struct and bad things happen but I was including a kernel struct to get functionality that had not made its way into user space at the time. The only thing I may be missing is that when I write 0x01 out the port, nothing comes back. That was not specified but you could easily disconnect anything connected to the ports to see if that changes anything. rxtx is far from bug free but I do not see anything yet. On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I am able to constantly replicate almost everytime even when I have > locks disabled. Don't know the reason why you are not able to on your > environment. Any suggestions??????? > > > Cycle No (Thread ::: /dev/cuf04) ::::::: 7 > Cycle No (Thread ::: /dev/cuf01) ::::::: 7 > Cycle No (Thread ::: /dev/cuf02) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > Exiting Thread ::: /dev/cuf03 > Cycle No (Thread ::: /dev/cuf03) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > Port /dev/cuf01 is Opened > 0x01 Sent > Port /dev/cub01 is Opened > 0x01 Sent > Port /dev/cuf01 is Closed > Port /dev/cuf02 is Closed > Port /dev/cuf03 is Closed > Port /dev/cuf04 is Closed > Port /dev/cub01 is Closed > Exiting Thread ::: /dev/cuf03 > Exiting Thread ::: /dev/cuf02 > Cycle No (Thread ::: /dev/cuf03) ::::::: 8 > Cycle No (Thread ::: /dev/cuf02) ::::::: 8 > Exiting Thread ::: /dev/cuf04 > Exiting Thread ::: /dev/cuf01 > Cycle No (Thread ::: /dev/cuf01) ::::::: 8 > Cycle No (Thread ::: /dev/cuf04) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > 0x01 Sent > Port /dev/cuf01 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 > # > # An error report file with more information is saved as > hs_err_pid21386.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > Aborted > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:19 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Lockfiles are a compile time option. I've turned them on now, corrected > a mistake resulting in only 3 ports being used and now have it going > through a few hundred iterations again without a crash. > > To disable lockfiles.. > > ./configure --disable-lockfiles && make install > > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > Port /dev/ttyS5 is Closed > Exiting Thread ::: /dev/ttyS1 > Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: > /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting > Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port > /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS1 is Closed > Port /dev/ttyS4 is Closed > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > > > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, How can you turn off the lock files? I can try using that. I >> never tried that, I thought you can't turn off the file locking. >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:06 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> You may try 4 ports instead of 5 to make sure thats not the issue. >> >> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >> 2.6.11.4-20a-smp >> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >> java -version java version "1.5.0_06" >> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >> >> I'm using rxtx 2.1-7 (final) with default configuration except >> lockfiles are disabled. I gathered that you are doing your own > resource locking. >> >> ... >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> ... >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>> version >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:52 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> Whats a few times? I've got 4 ports here and have run it a few >>> thousand iterations. >>> >>> Is that true for you if you run it with just four of your DIGI ports? >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> You need to run it few times. More the number of ports, more >>>> frequently you can reproduce. With just 2 ports it will be hard to >>>> reproduce frequently. >>>> >>>> ~pk >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:33 PM >>>> To: Kharbanda, Pawan >>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>> Subject: Re: Port Locking / JVM Crashing >>>> >>>>> I am also attaching a Test Class to replicate the problem. You need > >>>>> to >>>> >>>>> modify the class and add your systems Serial ports into the code >>>>> and >> >>>>> execute. >>>>> >>>>> java TestOpenClosePort 100 >>>>> >>>>> It will open and close all the serial ports 100 times in there own >>>>> thread. >>>>> >>>>> Please let me know, I will be available thru out this weekend and >>>>> can >>> >>>>> help you as much as I can with testing. >>>>> >>>> >>>> How reproducable is the problem with the above testcase? I'm >>>> running >> >>>> 100's of iterations without reproducing the problem. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> >>> >> > From rtlane01 at comcast.net Tue Aug 1 19:22:03 2006 From: rtlane01 at comcast.net (Randall T. Lane) Date: Tue, 01 Aug 2006 21:22:03 -0400 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] Message-ID: <44CFFE3B.90001@comcast.net> Rxtx Community: Please see my e-mail to Trent. Does anyone have any experience using rxtx to successfully communicate with hardware via USB? Thanks. Randy Lane -------------- next part -------------- An embedded message was scrubbed... From: Trent Jarvi Subject: Re: Help with RxTx for USB Communication Date: Tue, 1 Aug 2006 18:49:13 -0600 (MDT) Size: 3300 Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060801/9bbbc255/HelpwithRxTxforUSBCommunication-0323.mht From naranjo.manuel at gmail.com Sun Aug 6 16:59:28 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Sun, 06 Aug 2006 19:59:28 -0300 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44CFFE3B.90001@comcast.net> References: <44CFFE3B.90001@comcast.net> Message-ID: <44D67450.8010100@gmail.com> Randy: I have been able to communicate to AIRcable USB Bluetooth Dongle, with success. I'm not sure which are the options that you have to send to RXTX library, but you can indeed. Check that you do not have the port avaible for much long. I have heard of a problem with WinXP that it simply turn off virtual ports when they are too much long with out activity. If you want I can send you my code, because it is avaible under GPL, the new release is not avaible at AIRcable web site, but it should in short time. Regards, Manu > Rxtx Community: > > Please see my e-mail to Trent. Does anyone have any experience using > rxtx to successfully communicate with hardware via USB? > > Thanks. > > Randy Lane > > ------------------------------------------------------------------------ > > Asunto: > Re: Help with RxTx for USB Communication > De: > Trent Jarvi > Fecha: > Tue, 1 Aug 2006 18:49:13 -0600 (MDT) > Para: > "Randall T. Lane" > > Para: > "Randall T. Lane" > CC: > taj at www.linux.org.uk > > > On Tue, 1 Aug 2006, Randall T. Lane wrote: > >> Trent, >> >> I am working on a project written in Java (1.5) and need to >> communicate to an external device via a USB port. >> >> I have downloaded rxtx-2.1-7-bins-r2.zip from www.rxtx.org and setup >> a Java test project to learn how to use rxtx. I am able to list the >> serial ports available, however rxtx does not recognize my USB port. >> I am running on Windows XP. Here is some output from my test project >> ... >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> COM1 - Serial >> COM3 - Serial >> LPT1 - Parallel >> >> I would appreciate any help you could provide in getting rxtx to >> allow me to communicate via my USB port. >> >> Here is my code, if that would help. >> >> public static void main(String[] args) { >> listPorts(); >> // The listPorts() and getPortTypeName() methods are used for >> port identification. >> static void listPorts() >> { >> Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); >> while ( portEnum.hasMoreElements() ) >> { >> CommPortIdentifier portIdentifier = (CommPortIdentifier) >> portEnum.nextElement(); >> System.out.println(portIdentifier.getName() + " - " + >> getPortTypeName(portIdentifier.getPortType()) ); >> } } >> static String getPortTypeName ( int portType ) >> { >> switch ( portType ) >> { >> case CommPortIdentifier.PORT_I2C: >> return "I2C"; >> case CommPortIdentifier.PORT_PARALLEL: >> return "Parallel"; >> case CommPortIdentifier.PORT_RAW: >> return "Raw"; >> case CommPortIdentifier.PORT_RS485: >> return "RS485"; >> case CommPortIdentifier.PORT_SERIAL: >> return "Serial"; >> default: >> return "unknown type"; >> } >> } >> >> Thanks. >> >> Randy Lane >> > > Hi Randy > > The rxtx mail list is a better place to ask as there are more eyes. > I'm swamped with work. > > Be sure to look to see that your serial port dongle shows up as a > serial port in device manager and no other applications have it open. > USB serial dongles do work with rxtx. Some are less complete than > others. > > -- > Trent Jarvi > tjarvi at qbang.org > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From eddythejekyll at gmail.com Sun Aug 6 23:31:45 2006 From: eddythejekyll at gmail.com (Ed) Date: Sun, 6 Aug 2006 23:31:45 -0600 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? Message-ID: I have written a simple client server (RMI) application without using RxTx where the server controls a parallel port simply by addressing the port and banging the bits in order to drive a relay. It also reads the port's. I am doing this by making Runtime.exec calls to a binary that actually does the parallel port bit banging and reading. However, I'd like to use RxTx so it is a pure Java application, and I've so far installed and figured out how to discover the ports, but I'm having trouble finding good examples or some howto type documentation for this. I did find the two examples on the Wiki: one for serial IO and the other to discover the ports on a system. As I said, I have so far installed RxTx and gotten it to compile and run and I can identify the ports. When I run the server I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found Ports! Found port COM1 Found port COM3 Found port LPT1 LPT1 Not Currently owned EASSwitch Server starting. EASSwitch is bound. Server Ready. So it looks like thing are installed and working, but I feel all dressed up and no idea how to proceed. Basically, I just want to be able to toggle the data lines on the parallel port and read them. Very simple. No parallel printer type usage. Are there any examples I can work off of? If so, please advise. Thank you. -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060806/c7e39898/attachment-0323.html From hambyiii at hotmail.com Sun Aug 6 23:53:54 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Mon, 07 Aug 2006 05:53:54 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Message-ID: Hi, sorry I took the weekend to reply, but I was away for the last couple of days. Unfortunately I cannot send the full stack trace yet. The problem is not, unfortunately, happening on my computer, but on a clients computer, which I will go and visit today. I will hopefully be able to get a stack trace then. As to the physical connection, tt is indeed a USB from the computer, connected to a 9 pin serial device that connects to the hard-ware. My java version is 1.5.06 >From: "Kharbanda, Pawan" >Reply-To: RXTX Developers and Users >To: "RXTX Developers and Users" >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 09:15:24 -0600 > >Keith, > Please send the full stack trace of the exception, may be I can help >you. On Trent's question regarding physical 'Serial Port', do you mean >you have a USB(Connected to Client Machine) to 9 Pin Serial >cable(Connected to H/W device)? > >Also please mention which java version you are using? > >Thanks >Pawan Kharbanda > > >-----Original Message----- >From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >Of Keith Thorne >Sent: Friday, August 04, 2006 7:52 AM >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream > >The physical serial port is actually a USB connection that is then >changed to a "virtual serial port", so I can use the serial port >protocols to connect to it. The other end of the connection is a >hardware device that is constantly turned on. I am not sure about the >port 'vanishing'...we have another piece of software that came with the >hardware device, which we can test the device (and with it the virtual >serial port) with. This has no problem connecting to the serial port or >writing to/reading from the device. >It is only when my software is run, that the error occurs. Like I have >said, my software (using rxtx) is connecting to the serial port >successfully, but it is when I try and write to the serial port that I >get the error. > >Although to be truthful, I am not absolutely certain if the error is >happening on the oStream.write() or the oStream.flush(). I only think it >is the write(), because that is where the writeArray() function is >called. > >thanks >Keith > > > >From: Trent Jarvi > >Reply-To: RXTX Developers and Users > >To: RXTX Developers and Users > >Subject: Re: [Rxtx] error getting InputStream > >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > > > > >Hi Keith > > > >Can you tell us more about the physical serial port? Might it be > >'vanishing?' > > > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > > > Hi, > > > > > > I know I am replying to myself a lot at the moment, but more > > > information > >has > > > come to light (These errors are actually happening on a client > > > machine, > >on > > > software that has worked for the past month, and only now has > > > started to fail, which is why I am a little slow finding things out) > > > > > > The errors I have already written about are only symptoms of an > > > orignal error. The original error occurs the first time I try to > > > WRITE thte > > > OutputStream: > > > > > > OutputStream oStream = serialPort.getOutputStream(); > > > serialPort.notifyOnOutputEmpty(true); > > > > > > byte[] bs = encodeMessage(configString.toString()); > > > > > > oStream.write(bs); > > > oStream.flush(); > > > > > > The error occurs on oStream.write(bs); and is: > > > > > > Input/output error in writeArray > > > > > > Now writeArray is native code, so I have no idea what is going on >there. > >Any > > > help would be appreciated > > > Thanks > > > Keith > > > > > > > > >> From: "Keith Thorne" > > >> Reply-To: RXTX Developers and Users > > >> To: rxtx at qbang.org > > >> Subject: Re: [Rxtx] error getting InputStream > > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > > >> > > >> Okay, I made a little mistake in my last message. > > >> > > >> The error is not occuring where I thought it was. Instead it is > >occuring > > >> when I do the following: > > >> > > >> byte[] readBuffer = new byte[128]; > > >> > > >> try { > > >> > > >> int numBytes = 0; > > >> try { > > >> Thread.sleep(500); > > >> } > > >> catch (InterruptedException e) > > >> {} > > >> > > >> while (inputStream.available() > 0) > > >> { > > >> numBytes = inputStream.read(readBuffer); > > >> } > > >> > > >> processReceivedData(readBuffer, numBytes); } catch (IOException > > >> e) { > > >> System.out.println(e.getMessage()); > > >> } > > >> > > >> So I guess the error is happening on the > > >> inputStream.read(readBuffer) > > >> > > >> again, any help is appreciated and again, thanks in advance Keith > > >> > > >>> From: "Keith Thorne" > > >>> Reply-To: RXTX Developers and Users > > >>> To: rxtx at qbang.org > > >>> Subject: [Rxtx] error getting InputStream > > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > > >>> > > >>> Hi, > > >>> > > >>> I have written a program in Java for Windows xp using RXTX (which > > >>> is > >why > > >> I > > >>> am using this mailing list :). However, I am getting a problem. I > > >>> am connecting to a serial port, like so: > > >>> private CommPortIdentifier portID; > > >>> > > >>> private boolean openPort(String selectedPort) > > >>> { > > >>> boolean portFound = false; > > >>> Enumeration portList; > > >>> > > >>> portList = CommPortIdentifier.getPortIdentifiers(); > > >>> > > >>> while (portList.hasMoreElements()) > > >>> { > > >>> portID = (CommPortIdentifier) portList.nextElement(); > > >>> if (portID.getPortType() == > >CommPortIdentifier.PORT_SERIAL) > > >>> { > > >>> if (portID.getName().equals(selectedPort)) > > >>> { > > >>> portFound = true; > > >>> break; > > >>> } > > >>> } > > >>> } > > >>> > > >>> return portFound; > > >>> } > > >>> > > >>> and then I try and get the serial port input stream (leaving out > > >>> the > >try > > >>> and > > >>> catch for the sake of space): > > >>> > > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", > >2000); > > >>> InputStream inputStream = serialPort.getInputStream(); > > >>> > > >>> but on the getInputStream() I get the following error message: > > >>> > > >>> Bad file descriptor in nativeavailable > > >>> > > >>> I cannot figure out where it is going wrong...anyone any ideas. A > >quick > > >>> answer would be wonderful, as I am kinda under the hammer to get > > >>> this > > >> fixed > > >>> quickly > > >>> > > >>> Thanks in Advance > > >>> Keith > > >>> > > >>> > > >>> _______________________________________________ > > >>> Rxtx mailing list > > >>> Rxtx at qbang.org > > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > > >> > > >> > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Aug 7 06:22:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:22:03 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: Hmm.. I left the test running went I went home Saturday. It looks like something did show up after ~30k iterations. I'll look at it more in my free time. Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS5 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 29417 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 29417 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 29417 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00002aab14c2ec63, pid=20573, tid=1095125344 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6c63] initialise_event_info_struct+0x63 # [thread 1087756640 also had an error] Port /dev/ttyS5 is Opened 0x01 Sent [thread 1089861984 also had an error] Port /dev/ttyS4 is Opened 0x01 Sent [thread 1090914656 also had an error] # An error report file with more information is saved as [thread 1090914656 also had an error] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted On Sat, 5 Aug 2006, Trent Jarvi wrote: > > I'd stick a couple $15 dual port serial boards in the machine to see if its > kernel driver specific. > > I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more > problematic. They do not get the same number of eyes looking for problems. > > You could try putting > > #undef TIOCSERGETLSR > #undef TIOCGICOUNT > > in the very top of SerialImp.h or one or the other to flip bits of code off > and on. > > The kernel here is 2.6.11.4-20a-smp from Suse. > glibc is 2.3.4-23.4 from Suse > the jre is 1.5.0_06-b05 from Sun. > > The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC > ram. > > You should be able to reproduce what I'm seeing then go from there. I don't > think I'm going to see this problem without having the same cornercase > hardware you have. Maybe we can work that out off the list but I doubt I'm > going to find it in rxtx at this point. > > I have seen problems in the past were kernel structs don't match user space > struct and bad things happen but I was including a kernel struct to get > functionality that had not made its way into user space at the time. > > The only thing I may be missing is that when I write 0x01 out the port, > nothing comes back. That was not specified but you could easily disconnect > anything connected to the ports to see if that changes anything. > > rxtx is far from bug free but I do not see anything yet. > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, >> I am able to constantly replicate almost everytime even when I have >> locks disabled. Don't know the reason why you are not able to on your >> environment. Any suggestions??????? >> >> >> Cycle No (Thread ::: /dev/cuf04) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> Exiting Thread ::: /dev/cuf03 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> Port /dev/cuf01 is Opened >> 0x01 Sent >> Port /dev/cub01 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Closed >> Port /dev/cuf02 is Closed >> Port /dev/cuf03 is Closed >> Port /dev/cuf04 is Closed >> Port /dev/cub01 is Closed >> Exiting Thread ::: /dev/cuf03 >> Exiting Thread ::: /dev/cuf02 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 8 >> Exiting Thread ::: /dev/cuf04 >> Exiting Thread ::: /dev/cuf01 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf04) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 >> # >> # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 >> # >> # An error report file with more information is saved as >> hs_err_pid21386.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> Aborted >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:19 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Lockfiles are a compile time option. I've turned them on now, corrected >> a mistake resulting in only 3 ports being used and now have it going >> through a few hundred iterations again without a crash. >> >> To disable lockfiles.. >> >> ./configure --disable-lockfiles && make install >> >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> Port /dev/ttyS5 is Closed >> Exiting Thread ::: /dev/ttyS1 >> Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: >> /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting >> Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port >> /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> >> >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, How can you turn off the lock files? I can try using that. I >>> never tried that, I thought you can't turn off the file locking. >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 1:06 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> You may try 4 ports instead of 5 to make sure thats not the issue. >>> >>> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >>> 2.6.11.4-20a-smp >>> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >>> java -version java version "1.5.0_06" >>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >>> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >>> >>> I'm using rxtx 2.1-7 (final) with default configuration except >>> lockfiles are disabled. I gathered that you are doing your own >> resource locking. >>> >>> ... >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> Port /dev/ttyS4 is Closed >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> ... >>> >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>>> version >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:52 PM >>>> To: Kharbanda, Pawan >>>> Cc: Trent Jarvi; RXTX Developers and Users >>>> Subject: RE: Port Locking / JVM Crashing >>>> >>>> >>>> Whats a few times? I've got 4 ports here and have run it a few >>>> thousand iterations. >>>> >>>> Is that true for you if you run it with just four of your DIGI ports? >>>> >>>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>>> >>>>> You need to run it few times. More the number of ports, more >>>>> frequently you can reproduce. With just 2 ports it will be hard to >>>>> reproduce frequently. >>>>> >>>>> ~pk >>>>> >>>>> -----Original Message----- >>>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>>> Sent: Saturday, August 05, 2006 12:33 PM >>>>> To: Kharbanda, Pawan >>>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>>> Subject: Re: Port Locking / JVM Crashing >>>>> >>>>>> I am also attaching a Test Class to replicate the problem. You need >> >>>>>> to >>>>> >>>>>> modify the class and add your systems Serial ports into the code >>>>>> and >>> >>>>>> execute. >>>>>> >>>>>> java TestOpenClosePort 100 >>>>>> >>>>>> It will open and close all the serial ports 100 times in there own >>>>>> thread. >>>>>> >>>>>> Please let me know, I will be available thru out this weekend and >>>>>> can >>>> >>>>>> help you as much as I can with testing. >>>>>> >>>>> >>>>> How reproducable is the problem with the above testcase? I'm >>>>> running >>> >>>>> 100's of iterations without reproducing the problem. >>>>> >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> >>>> >>> >> > From iinjlv01 at gmail.com Mon Aug 7 06:22:07 2006 From: iinjlv01 at gmail.com (J LV) Date: Mon, 7 Aug 2006 14:22:07 +0200 Subject: [Rxtx] Data lost or Slow sampling Message-ID: Hello I am using RXTX to comm with a motion controller using Serial Port and i can write the commands using SerialPort or RXTXPort without problems, but when i try write and read at high sampling rate, for example to know the position and speed at every moment of a trajectory, i obtain a very irregular response times. I am using the most simple algorimth: 1-Write the command "is trajectory finished?" and wait for SerialPortEvent.DATA_AVAILABLE 2-Read the InputStreamReader of serial port while not empty 3-If trajectory finished then stop program, else, continue 4-Read actual time using System.currentTimeMillis() (t0) 5-Write the command "give me position" and wait for SerialPortEvent.DATA_AVAILABLE 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) 7-Read the InputStreamReader of serial port while not empty 8-Save position in Vector or ArrayList and repeat from 1 I don't know if the problem is the RXTX, my program or the motion controller hardware but i have response times from 16 millis to 78 millis at 19200 bauds!. I am using SwingWorked to threading SerialPort reading/writing process. Any idea or similar data leak problem? Thanks for RXTX project and sorry for my badde english! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/909a4cb3/attachment-0323.html From tjarvi at qbang.org Mon Aug 7 06:50:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:50:10 -0600 (MDT) Subject: [Rxtx] Data lost or Slow sampling In-Reply-To: References: Message-ID: On Mon, 7 Aug 2006, J LV wrote: > Hello > > I am using RXTX to comm with a motion controller using Serial Port and i can > write the commands using SerialPort or RXTXPort without problems, but when i > try write and read at high sampling rate, for example to know the position > and speed at every moment of a trajectory, i obtain a very irregular > response times. I am using the most simple algorimth: > 1-Write the command "is trajectory finished?" and wait for > SerialPortEvent.DATA_AVAILABLE > 2-Read the InputStreamReader of serial port while not empty > 3-If trajectory finished then stop program, else, continue > 4-Read actual time using System.currentTimeMillis() (t0) > 5-Write the command "give me position" and wait for > SerialPortEvent.DATA_AVAILABLE > 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) > 7-Read the InputStreamReader of serial port while not empty > 8-Save position in Vector or ArrayList and repeat from 1 > > > I don't know if the problem is the RXTX, my program or the motion controller > hardware but i have response times from 16 millis to 78 millis at 19200 > bauds!. I am using SwingWorked to threading SerialPort reading/writing > process. > > Any idea or similar data leak problem? > > Thanks for RXTX project and sorry for my badde english! > This can be platform dependant. What you may do for a starting point is use a loopback connection and time the same thing at 19200. Write the date, wait for data available, read the data. I would expect from write to data available to take around 10 ms from past experiences. You can experiment with turning on and off buffering in the port settings of the OS, if the OS supports more realtime like interrupts, that could help. You have a java schedual and the kernel schedual. Serial interrupts traditionally have very high priority but modern OSs tend to realize thats not good for GUIs, ... and delay responding to the interrupts. You should be able to have usec response times in a realtime OS. Windows and Linux are not typically setup as realtime OSs. For comparison, the last time I looked which was about 5 years ago, windows NT4 came back with data available in 8 ms and Linux came back in 10 ms. I would be interested in seeing what you get today. -- Trent Jarvi tjarvi at qbang.org From gergg at cox.net Mon Aug 7 09:21:56 2006 From: gergg at cox.net (Gregg Wonderly) Date: Mon, 07 Aug 2006 10:21:56 -0500 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? In-Reply-To: References: Message-ID: <44D75A94.9030205@cox.net> Ed wrote: > Are there any examples I can work off of? If so, please advise. Just read the javax.comm javadocs. You need to take the parallel port and write values to it based on which bits of which lines you want on and off. Gregg Wonderly From pete.flugstad at gmail.com Mon Aug 7 09:36:19 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 7 Aug 2006 10:36:19 -0500 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44D67450.8010100@gmail.com> References: <44CFFE3B.90001@comcast.net> <44D67450.8010100@gmail.com> Message-ID: <84d4a6d50608070836v97e9a29q96e98441ea903ac7@mail.gmail.com> FYI, I'm talking to a USB<->Serial dongle just fine under Windows XP Pro. I did have to install a driver for the thing - Windows XP by default, did not recognize it. Once installed, it just showed up as another COM port, and I've been pushing data over it with no problems. Pete From savagobr at yahoo.com Mon Aug 7 10:13:06 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Mon, 7 Aug 2006 09:13:06 -0700 (PDT) Subject: [Rxtx] Port Locking / JVM Crashing: 2 ports (Serial + usb) Message-ID: <20060807161306.9648.qmail@web53803.mail.yahoo.com> Trent This is curious, since I did reproduced the aformentioned bug using only 2 ports: /dev/ttyS0 and /dev/ttyUSB0. It only need to run for 500 times: $ java -cp . TestOpenClosePort 500 500 Port /dev/ttyS0 is Closed Excpetion ::: Thread ::: /dev/ttyUSB0null Exiting Thread ::: /dev/ttyUSB0 Cycle No (Thread ::: /dev/ttyUSB0) ::::::: 227 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 184 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x203d2044, pid=32368, tid=2986859424 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing) # Problematic frame: # C 0x203d2044 # # An error report file with more information is saved as /tmp/hs_err_pid32368.log # # If you would like to submit a bug report, please visit: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Best regards Savago ps: Test environment $ uname -a Linux localhost.localdomain 2.6.15-1.2054_FC5 #1 Tue Mar 14 15:48:33 EST 2006 i686 i686 i386 GNU/Linux $ java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) $gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.1 20060525 (Red Hat 4.1.1-1) --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/c6ca8094/attachment-0322.html From Pawan.Kharbanda at dot.state.co.us Mon Aug 7 17:23:25 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 7 Aug 2006 17:23:25 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Trent, I think I got the problem fixed after some code changes in the C (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the staging environment (with 10 devices) with real time data and haven't seen a JVM lock/ Port locking since last night. I am going to do further stress testing and will send all my code changes and my findings in next few days. I believe the problem was causing due to the digi drivers and how the Linux kernel talked to it, so after making some code changes and synchronization fixes, I got it to work. I am keeping my fingers crossed :) Thanks for all your help. You have been a great help. Will keep you posted. Cheers ~pk PS : We are going to test my new RXTX changes with the 2.6 Red Hat kernel (currently using 2.4.21-37.ELsmp) too. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 5:08 PM To: Kharbanda, Pawan Subject: RE: Port Locking / JVM Crashing Hi Pawan As mentioned I did reproduce the error but after several hours of cycles. I'm looking at RXTXPort.java and thinking about what may be happening. The error is in the C layer but it may be preventable in the java code. lets say two closes are overlapping or an operation is trying to happen while another port is closing. The structure may be out of sync by the time the code using the structure in another thread gets to the event info struct. So I'm wondering if synchronization in RXTXPort() and close() may help you. A second thing that may help is you can put printf("got here\n"); in each of the lines in initialize event info struct to verify that the problem is in walking the linked list. Thats my suspicion. So a properly timed close() while calling the constructor may be catching rxtx off guard. You can synchronize to test that and it may do away with the problem. From tjarvi at qbang.org Mon Aug 7 18:01:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 18:01:54 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Message-ID: Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do further > stress testing and will send all my code changes and my findings in next > few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to happen > while another port is closing. The structure may be out of sync by the > time the code using the structure in another thread gets to the event > info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may do > away with the problem. > From Pawan.Kharbanda at dot.state.co.us Tue Aug 8 13:49:14 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 8 Aug 2006 13:49:14 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Trent, I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and have absolutely no problem with JVM crashing or Port Locking even after 10000 operations (now I am trying 100,000 :). This is all with the original RXTX 2.1.7 (final) api's without any of my fixes that I have been trying for last 2-3 weeks. I will suggest that we update the INSTALL or Readme file accompnying the RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: 82000685_G 02/02/2006). This should helped everybody using the RXTX API's with RedHat Linux atleast. Regards Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 6:02 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do > further stress testing and will send all my code changes and my > findings in next few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers > crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to > happen while another port is closing. The structure may be out of > sync by the time the code using the structure in another thread gets > to the event info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may > do away with the problem. > From jimo at earthlink.net Wed Aug 9 21:21:00 2006 From: jimo at earthlink.net (Jim Owen) Date: Wed, 9 Aug 2006 20:21:00 -0700 Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat Message-ID: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Hi All, I've run into some difficulties with rxtx that have me baffled and need some help. I have an application that has used earlier versions of rxtx successfully and on a variety of platforms. We recently needed to deploy this application into an environment where we could not utilize lock files. I pulled down the 2.0.7 pre1 source distribution and executed configure with --disable-lockfiles. I then executed make and make install. When I execute the program, as root, I get the following error: ************************************************************************ Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) # Problematic frame: # C 0x00001004 # # An error report file with more information is saved as hs_err_pid20151.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # **************************************************************************** If I execute as a normal user, I get no errors, but no ports listed: (Using an earlier version, I get a serial and parallel port listed.) **************************************************************************** [jim at linuxDev ingenicoApp]$ java VerifyCommBuild Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Some ports appear to have been found, let's try to enumerate them. Complete. **************************************************************************** When I built rxtx, there was a warning given of the following: **************************************************************************** conftest.c: In function 'main': conftest.c:6: warning: incompatible implicit declaration of built-in function 'printf' conftest.c:7: warning: incompatible implicit declaration of built-in function 'exit' WARNING: Kernel include files do not match the current kernel **************************************************************************** uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux JAVA_HOME=/usr/java/j2sdk1.4.2_11 javax.comm.properties: Driver=gnu.io.RXTXCommDriver Here's the code for VerifyCommBuild.java that I'm using to test: **************************************************************************** import javax.comm.*; import java.util.Enumeration; /** * A quick app to check that the javax.comm (Serial) Communications extension has been properly * installed and configured on this machine. * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. */ public class VerifyCommBuild { public static void main(String args[]) { Enumeration ports; System.out.println("Verifying Comm Build Environment"); try { ports = CommPortIdentifier.getPortIdentifiers(); if (ports == null) { System.out.println("No comm ports found!"); return; } System.out.println("Some ports appear to have been found, let's try to enumerate them."); while (ports.hasMoreElements()) { System.out.println("Here is a port [" + ((CommPortIdentifier)ports.nextElement()).getName() + "]"); } } catch (Exception e) { System.out.println("Failed to enumerate ports [" + e.getMessage() + "]"); e.printStackTrace(); } System.out.println("Complete."); } } **************************************************************************** Any suggestions as to what I'm missing? Thanks, Jim Owen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060809/92503a81/attachment-0320.html From tjarvi at qbang.org Thu Aug 10 05:39:36 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 05:39:36 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Message-ID: On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even after > 10000 operations (now I am trying 100,000 :). This is all with the > original RXTX 2.1.7 (final) api's without any of my fixes that I have > been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying the > RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp > and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From oliver.archner at bayceer.uni-bayreuth.de Wed Aug 9 06:13:36 2006 From: oliver.archner at bayceer.uni-bayreuth.de (Oliver Archner) Date: Wed, 09 Aug 2006 14:13:36 +0200 Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() Message-ID: <44D9D170.5020806@bayceer.uni-bayreuth.de> Dear Users, i would like to send a byte to a parallel device. The following piece of code works well but throws an IOException in LPRPort$ParallelOutputStream.write() saying that everything is ok ?! Oliver import java.io.*; import gnu.io.*; public class Test { public static void main(String[] args) { RXTXCommDriver TxPort = new RXTXCommDriver(); ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", CommPortIdentifier.PORT_PARALLEL); OutputStream oStream = null; try { oStream = pPort.getOutputStream(); oStream.write((byte)0x51); } catch (IOException e) { e.printStackTrace(); } finally { try { if (oStream != null) oStream.close(); } catch (IOException e) { e.printStackTrace(); } } } } Output: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Der Vorgang wurde erfolgreich beendet. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at Test.main(Test.java:12) From tjarvi at qbang.org Thu Aug 10 18:12:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 18:12:27 -0600 (MDT) Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() In-Reply-To: <44D9D170.5020806@bayceer.uni-bayreuth.de> References: <44D9D170.5020806@bayceer.uni-bayreuth.de> Message-ID: On Wed, 9 Aug 2006, Oliver Archner wrote: > Dear Users, > > i would like to send a byte to a parallel device. > The following piece of code works well but throws an IOException in > LPRPort$ParallelOutputStream.write() saying that everything is ok ?! > > Oliver > > > import java.io.*; > import gnu.io.*; > > public class Test { > > public static void main(String[] args) { > RXTXCommDriver TxPort = new RXTXCommDriver(); > ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", > CommPortIdentifier.PORT_PARALLEL); > OutputStream oStream = null; > try { > oStream = pPort.getOutputStream(); > oStream.write((byte)0x51); > } catch (IOException e) { > e.printStackTrace(); > } finally { > try { > if (oStream != null) oStream.close(); > } catch (IOException e) { > e.printStackTrace(); > > } > } > > } > } > > Output: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Der Vorgang wurde erfolgreich beendet. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at Test.main(Test.java:12) WriteFile is returning a negative value or 0. I do not know what that exception is saying but it should be an IO Exception. The native code in question is line 405 in ParallelImp.c. If you find the documentation pointing out how the code is wrong, we can fix it. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 08:12:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 09:12:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question Message-ID: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Hello, I'm trying to send data over a serial port using the RXTX libraries. I've got the binaries for Windows XP from qbang.org. On the receiving side, I'm using event notification (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial Ports InputStream. Similarly on the transmist side, I use SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. First question: does this make sense? The code was largely adopted from an existing Windows C++ program and that's more or less how it operated (overlapped io using ReadFile, WriteFile, GetOverlappedResult, Events, etc). Second question: in a small standalone test program I wrote, everything seems to work just fine - whenever SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good chunk of data available (I explicitly set the in/out buffers to 1024 bytes) to read. However, when I pull my "library" into a much larger environment (OSGI framework based, but same JVM/OS/etc), whenever SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a byte or two available. Needless to say, this really kills performance. Everything appears to still operate properly, just really, really slowly. So, has anyone seen this problem before? I haven't dived into the details of RXTX library, and I'm wondering what the mechanism is here? How does the RXTX thread determine when to issue the SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to tweak in RXTX or the JVM to get this to operate more like the small test program? Seems like I want RXTX to call me back _less_ often. Thanks, Pete From tjarvi at qbang.org Fri Aug 11 09:55:23 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 09:55:23 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Hello, > > I'm trying to send data over a serial port using the RXTX > libraries. I've got the binaries for Windows XP from qbang.org. > > On the receiving side, I'm using event notification > (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial > Ports InputStream. Similarly on the transmist side, I use > SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. > > First question: does this make sense? The code was largely adopted > from an existing Windows C++ program and that's more or less how it > operated (overlapped io using ReadFile, WriteFile, > GetOverlappedResult, Events, etc). > > Second question: in a small standalone test program I wrote, > everything seems to work just fine - whenever > SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good > chunk of data available (I explicitly set the in/out buffers to 1024 > bytes) to read. > > However, when I pull my "library" into a much larger environment > (OSGI framework based, but same JVM/OS/etc), whenever > SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a > byte or two available. Needless to say, this really kills > performance. Everything appears to still operate properly, just > really, really slowly. > > So, has anyone seen this problem before? I haven't dived into the > details of RXTX library, and I'm wondering what the mechanism is here? > How does the RXTX thread determine when to issue the > SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to > tweak in RXTX or the JVM to get this to operate more like the small > test program? > Seems like I want RXTX to call me back _less_ often. > Hi Pete RXTX is doing overlapped IO in termios.c. In this file we map the windows functionality to termios (mostly POSIX). From there, we just talk termios to all platforms. What I guess is happening is the eventloop is waiting a specified amount of time. As you application uses more cpu cycles, you observe the difference in behavior. You could go into the C code and change this after looking at the eventLoop() code in serialImp.c and following that to the serial_ioctl() and serial_select() in termios.c Another option is to go into RXTXPort.java and put a sleep in the sendEvent() code. This way you would not have to recompile the native code (not very easy at this point). -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 13:27:36 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:27:36 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > Another option is to go into RXTXPort.java and put a sleep in the > sendEvent() code. This way you would not have to recompile the native > code (not very easy at this point). Are the instructions in the INSTALL file still valid? If so, it wasn't very hard to build it (I already had MinGW installed). Everything seemed to build just fine. Haven't tried to install/use it yet, but it wasn't a big deal (assuming those instructions were correct. Thanks, Pete From pete.flugstad at gmail.com Fri Aug 11 13:42:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:42:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, but there doesn't appear to be a way to select that via RXTX (which appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control is selected). Is there a way I'm not seeing? Thanks, Pete From eddythejekyll at gmail.com Fri Aug 11 15:20:44 2006 From: eddythejekyll at gmail.com (Ed) Date: Fri, 11 Aug 2006 15:20:44 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion Message-ID: I'm trying to read and write a parallel port on a standard (Dell) pc running RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. I'm having problems getting rxtx to return a port enumeration from getPortIdentifiers. I'm using a file PortChooser.java as a test file to get things going. This is from the Java CookBook 2nd edition (Chapter 12). The call // get list of ports available on this particular computer, // by calling static method in CommPortIdentifier. Enumeration pList = CommPortIdentifier.getPortIdentifiers(); returns a null pList; I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and compile without --disable-lockfiles I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ... When I compile with --disable-lockfiles the call to getPortIdentifiers simply returns a null Enumeration. I've read the documention and threads about this issue and I feel like I've tried everything, so at the moment I'm stumped. I can supply any further info that may help. Thanks in advance. Ed -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060811/80c4eeec/attachment-0318.html From tjarvi at qbang.org Fri Aug 11 18:29:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:29:48 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > On 8/11/06, Trent Jarvi wrote: >> Another option is to go into RXTXPort.java and put a sleep in the >> sendEvent() code. This way you would not have to recompile the native >> code (not very easy at this point). > > Are the instructions in the INSTALL file still valid? If so, it > wasn't very hard to build it > (I already had MinGW installed). Everything seemed to build just > fine. Haven't tried to install/use it yet, but it wasn't a big deal > (assuming those instructions were correct. > Hi Pete The instructions are correct. You will want to make sure that the exports worked. If the library does not work properly, then the exports failed. The exports are currently generated with nm, sed and grep in the Makefile which is often commented out. If the def file is old, it will cause problems. You should be good to go then. Look at the serial_select and eventLoop code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:33:32 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:33:32 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > but there doesn't appear to be a way to select that via RXTX (which > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > is selected). > > Is there a way I'm not seeing? > Hi Pete I'm guessing I didn't know the difference. At the time, I really didn't have windows API documentation. I just had some pages I found with altivista/google. Later microsoft made their documentation available on msdn or I learned about it. For rxtx, the calls need to be platform neutral. So if you see how to do each in termios, then we can get it going. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:45:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:45:24 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Fri, 11 Aug 2006, Ed wrote: > I'm trying to read and write a parallel port on a standard (Dell) pc running > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. > > I'm having problems getting rxtx to return a port enumeration from > getPortIdentifiers. I'm using a file > PortChooser.java as a test file to get things going. This is from the Java > CookBook 2nd edition (Chapter 12). The call > > // get list of ports available on this particular computer, > // by calling static method in CommPortIdentifier. > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > returns a null pList; > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and > compile without --disable-lockfiles I get: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > ... > > When I compile with --disable-lockfiles the call to getPortIdentifiers > simply returns a null Enumeration. > > I've read the documention and threads about this issue and I feel like I've > tried everything, so at the moment I'm stumped. > > I can supply any further info that may help. > > Thanks in advance. > > Ed > Hi Ed You may want to check the permissions of /dev/lp*. Also make sure lp or your kernel support for lp is loaded. It should show up in dmesg and lsmod. For my laptop with no printer port enabled in BIOS is see: lp: driver loaded but no devices found in desg |grep lp [] $ ls -l /dev/lp* crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 here root and group lp can read and write. Normal users cannot. Try a simple read as a user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: Permission denied Fix as root [] chmod 666 /dev/lp* [] $ ls -l /dev/lp* crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 Now as user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: No such device or address So this is saying there is no lp0 on my laptop. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:58:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:58:31 -0600 (MDT) Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat In-Reply-To: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> References: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Message-ID: On Wed, 9 Aug 2006, Jim Owen wrote: > Hi All, > > I've run into some difficulties with rxtx that have me baffled and need > some help. > > I have an application that has used earlier versions of rxtx > successfully and on a variety of platforms. We recently needed to deploy > this application into an environment where we could not utilize lock files. > > I pulled down the 2.0.7 pre1 source distribution and executed configure > with --disable-lockfiles. I then executed make and make install. > > When I execute the program, as root, I get the following error: > > ************************************************************************ > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) > # Problematic frame: > # C 0x00001004 > # > # An error report file with more information is saved as hs_err_pid20151.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > **************************************************************************** > > If I execute as a normal user, I get no errors, but no ports listed: > (Using an earlier version, I get a serial and parallel port listed.) > > **************************************************************************** > [jim at linuxDev ingenicoApp]$ java VerifyCommBuild > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Some ports appear to have been found, let's try to enumerate them. > Complete. > **************************************************************************** > > When I built rxtx, there was a warning given of the following: > > **************************************************************************** > conftest.c: In function 'main': > conftest.c:6: warning: incompatible implicit declaration of built-in > function 'printf' > conftest.c:7: warning: incompatible implicit declaration of built-in > function 'exit' > > WARNING: Kernel include files do not match the current kernel > **************************************************************************** > > > uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 > Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux > > JAVA_HOME=/usr/java/j2sdk1.4.2_11 > > javax.comm.properties: Driver=gnu.io.RXTXCommDriver > > Here's the code for VerifyCommBuild.java that I'm using to test: > > > **************************************************************************** > import javax.comm.*; > import java.util.Enumeration; > /** > * A quick app to check that the javax.comm (Serial) Communications > extension has been properly > * installed and configured on this machine. > * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. > */ > public class VerifyCommBuild > { > public static void main(String args[]) > { > Enumeration ports; > System.out.println("Verifying Comm Build Environment"); > try > { > ports = CommPortIdentifier.getPortIdentifiers(); > if (ports == null) > { > System.out.println("No comm ports found!"); > return; > } > System.out.println("Some ports appear to have been found, let's > try to enumerate them."); > while (ports.hasMoreElements()) > { > System.out.println("Here is a port [" + > ((CommPortIdentifier)ports.nextElement()).getName() > + "]"); > } > } catch (Exception e) > { > System.out.println("Failed to enumerate ports [" + > e.getMessage() + "]"); > e.printStackTrace(); > } > System.out.println("Complete."); > } > } > Hi Jim This is a new one to me. Have you tried it on another system. Maybe something isnt sane in your toolchain. -- Trent Jarvi tarvi at qbang.org From eddythejekyll at gmail.com Sat Aug 12 11:45:39 2006 From: eddythejekyll at gmail.com (Ed) Date: Sat, 12 Aug 2006 11:45:39 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Trent, Right after I sent the results indicated below I re-ran the app and it apparently found the parallel port. The difference was that I set the permissions to : /dev: wildcard lp* crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 I'm still not sure how to interpret the dmesg and lsmod before. However I'm thinking that since the user now has permission to access the lp* port, a request to access it loaded the lp and parport modules automatically and allowed me access. Here's the output of lsmod now: ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp lp 5540 0 (autoclean) parport 21608 1 (autoclean) [parport_pc lp] and dmesg: ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp On node 0 totalpages: 161776 lp0: using parport0 (polling). So I think I'm good, and ready to move on the next steps. Thanks Trent! Ed On 8/12/06, Ed wrote: > > Thanks for the reply Trent. > > I'm on a different system today but am trying your suggestons. This is a > debian 3.1r2 system and I'm running jdk 1.5.0_04. > > Take a look below, but I think I have no parallel port support on this > kernel, however I never get the "No such device or address" return from the > cat call as you did so I'm not sure how to interpret the results. > > When I run the test program (PortChooser.java), the getPortIdentifiers > call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is > more than I found on the RedHat system. Incidently --disable-lockfiles has > no effect. > > It looks as though there is no parallel support in this kernel: > falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > On node 0 totalpages: 161776 > falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > > I'm a little confused by the results when I cat to the lp0 device. It > seems from the dmesg output that I don't have parallel printer support, but > when I cat to the lp0 device, I get permission denied if I'm non-root user > and input/output error if I'm root. Apparently this means I have the device, > but no support in the kernel? > > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > ed at falcon:~/src/workspace/EASServer/src$ su > Password: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > > Here's my lp* device permissions. > /dev: > wildcard lp* > crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > If I change it to > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I get: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > falcon:/home/ed/src/workspace/EASServer/src# exit > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > cat: /dev/lp0: Input/output error > ed at falcon:~/src/workspace/EASServer/src$ > > What do you think? Should I recompile the kernel or is it something else? > > By the way, I added the user ed to the lp and uucp groups on this system. > > Thanks again, > > Ed > > On 8/11/06, Trent Jarvi wrote: > > > > On Fri, 11 Aug 2006, Ed wrote: > > > > > I'm trying to read and write a parallel port on a standard (Dell) pc > > running > > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > > gates. > > > > > > I'm having problems getting rxtx to return a port enumeration from > > > getPortIdentifiers. I'm using a file > > > PortChooser.java as a test file to get things going. This is from the > > Java > > > CookBook 2nd edition (Chapter 12). The call > > > > > > // get list of ports available on this particular computer, > > > // by calling static method in CommPortIdentifier. > > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > > > > > returns a null pList; > > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure > > and > > > compile without --disable-lockfiles I get: > > > > > > Stable Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7 > > > Java lib Version = RXTX-2.1-7 > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > ... > > > > > > When I compile with --disable-lockfiles the call to getPortIdentifiers > > > > > simply returns a null Enumeration. > > > > > > I've read the documention and threads about this issue and I feel like > > I've > > > tried everything, so at the moment I'm stumped. > > > > > > I can supply any further info that may help. > > > > > > Thanks in advance. > > > > > > Ed > > > > > > > Hi Ed > > > > You may want to check the permissions of /dev/lp*. Also make sure lp or > > your kernel support for lp is loaded. It should show up in dmesg and > > lsmod. > > > > For my laptop with no printer port enabled in BIOS is see: > > > > lp: driver loaded but no devices found > > > > in desg |grep lp > > > > [] $ ls -l /dev/lp* > > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > here root and group lp can read and write. Normal users cannot. > > > > Try a simple read as a user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > > > > Fix as root > > > > [] chmod 666 /dev/lp* > > [] $ ls -l /dev/lp* > > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > Now as user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: No such device or address > > > > So this is saying there is no lp0 on my laptop. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > > > -- > > Ed > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060812/c2afe1f8/attachment-0317.html From tjarvi at qbang.org Sat Aug 12 14:01:52 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 12 Aug 2006 14:01:52 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Remember that the lp code expects a printer - or something like it. There is a line that specifies the printer is online. If you are doing hobby work, you will need to raise that line or loop it back to something that is raised. If you just try reading a port with no device connected and online, there will be an error while trying to read. This should be addressed in the mail-list archives. On Sat, 12 Aug 2006, Ed wrote: > Trent, > Right after I sent the results indicated below I re-ran the app and it > apparently found the parallel port. The difference was that I set the > permissions to : > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I'm still not sure how to interpret the dmesg and lsmod before. However I'm > thinking that since the user now has permission to access the lp* port, a > request to access it loaded the lp and parport modules automatically and > allowed me access. Here's the output of lsmod now: > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > lp 5540 0 (autoclean) > parport 21608 1 (autoclean) [parport_pc lp] > > and dmesg: > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > On node 0 totalpages: 161776 > lp0: using parport0 (polling). > > So I think I'm good, and ready to move on the next steps. > > Thanks Trent! > > Ed > > > On 8/12/06, Ed wrote: >> >> Thanks for the reply Trent. >> >> I'm on a different system today but am trying your suggestons. This is a >> debian 3.1r2 system and I'm running jdk 1.5.0_04. >> >> Take a look below, but I think I have no parallel port support on this >> kernel, however I never get the "No such device or address" return from the >> cat call as you did so I'm not sure how to interpret the results. >> >> When I run the test program (PortChooser.java), the getPortIdentifiers >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is >> more than I found on the RedHat system. Incidently --disable-lockfiles has >> no effect. >> >> It looks as though there is no parallel support in this kernel: >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp >> On node 0 totalpages: 161776 >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp >> >> I'm a little confused by the results when I cat to the lp0 device. It >> seems from the dmesg output that I don't have parallel printer support, but >> when I cat to the lp0 device, I get permission denied if I'm non-root user >> and input/output error if I'm root. Apparently this means I have the >> device, >> but no support in the kernel? >> >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> >> cat: /dev/lp0: Permission denied >> ed at falcon:~/src/workspace/EASServer/src$ su >> Password: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> >> Here's my lp* device permissions. >> /dev: >> wildcard lp* >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> If I change it to >> /dev: >> wildcard lp* >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> I get: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> falcon:/home/ed/src/workspace/EASServer/src# exit >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> ed at falcon:~/src/workspace/EASServer/src$ >> >> What do you think? Should I recompile the kernel or is it something else? >> >> By the way, I added the user ed to the lp and uucp groups on this system. >> >> Thanks again, >> >> Ed >> >> On 8/11/06, Trent Jarvi wrote: >> > >> > On Fri, 11 Aug 2006, Ed wrote: >> > >> > > I'm trying to read and write a parallel port on a standard (Dell) pc >> > running >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the >> > gates. >> > > >> > > I'm having problems getting rxtx to return a port enumeration from >> > > getPortIdentifiers. I'm using a file >> > > PortChooser.java as a test file to get things going. This is from the >> > Java >> > > CookBook 2nd edition (Chapter 12). The call >> > > >> > > // get list of ports available on this particular computer, >> > > // by calling static method in CommPortIdentifier. >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); >> > > >> > > returns a null pList; >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure >> > and >> > > compile without --disable-lockfiles I get: >> > > >> > > Stable Library >> > > ========================================= >> > > Native lib Version = RXTX-2.1-7 >> > > Java lib Version = RXTX-2.1-7 >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > ... >> > > >> > > When I compile with --disable-lockfiles the call to getPortIdentifiers >> > >> > > simply returns a null Enumeration. >> > > >> > > I've read the documention and threads about this issue and I feel like >> > I've >> > > tried everything, so at the moment I'm stumped. >> > > >> > > I can supply any further info that may help. >> > > >> > > Thanks in advance. >> > > >> > > Ed >> > > >> > >> > Hi Ed >> > >> > You may want to check the permissions of /dev/lp*. Also make sure lp or >> > your kernel support for lp is loaded. It should show up in dmesg and >> > lsmod. >> > >> > For my laptop with no printer port enabled in BIOS is see: >> > >> > lp: driver loaded but no devices found >> > >> > in desg |grep lp >> > >> > [] $ ls -l /dev/lp* >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > here root and group lp can read and write. Normal users cannot. >> > >> > Try a simple read as a user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: Permission denied >> > >> > Fix as root >> > >> > [] chmod 666 /dev/lp* >> > [] $ ls -l /dev/lp* >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > Now as user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: No such device or address >> > >> > So this is saying there is no lp0 on my laptop. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > >> >> >> >> -- >> >> Ed >> > > > > From pete.flugstad at gmail.com Mon Aug 14 07:51:41 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 08:51:41 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: <84d4a6d50608140651h3cb2266ap90c47780abace00@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > On Fri, 11 Aug 2006, Pete Flugstad wrote: > > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > > but there doesn't appear to be a way to select that via RXTX (which > > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > > is selected). > > I'm guessing I didn't know the difference. At the time, I really didn't > have windows API documentation. I just had some pages I found with > altivista/google. Later microsoft made their documentation available on > msdn or I learned about it. > > For rxtx, the calls need to be platform neutral. So if you see how to do > each in termios, then we can get it going. so, RTSCTS_IN/OUT at the COMM API is mapped to HARDWARE_FLOW_CONTROL in the POSIX layer. Which termios.c maps to RTS_CONTROL_HANDSHAKE and fOutxCtsFlow = true. Since termios.c is Windows only anway... Would it work to change the mapping in termios.c to map hardware flow control to RTS_CONTROL_TOGGLE? I just wondering (I'm going to go look, but there's a lot of code in there) if the code does anything special playing with flow control signals? Thanks, Pete From pete.flugstad at gmail.com Mon Aug 14 09:42:48 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 10:42:48 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> On 8/3/06, Trent Jarvi wrote: > On Thu, 3 Aug 2006, Pete Flugstad wrote: > > Okay, I can understand that, but from the PORTMON output, it looks > > like it's opening each port TWICE: > > I think this problem is in RXTXCommDriver.java. I've just not tracked it > down but it should be in the java code, not the native code so easy > enough to track down. Okay, I'm trying to track this down... Looks like the CommPortIdentifier static initializer loads RXTXCommDriver, and then calls RXTXDriver.initialize. But then CommPortIdentifier.getPortIdentifiers does the exact same thing. So that's where the two scans are coming from. I would guess that one or the other can be removed? Probably the one in the CommPortIdentifier.getPortIdentifiers? Doing so removes the 2nd scan. Pete PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) val = System.getProperty("gnu.io.SerialPorts"); Shouldn't the comparison be != null? getProperty returns null if the variable is NOT found, and you only want to assign to val if it IS found, right? Same thing for the parallel port case. End result is the same I guess, since you check for null later, but probably should be fixed. From eddythejekyll at gmail.com Mon Aug 14 11:55:17 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 11:55:17 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: When I try to get the mode with int mode = pPort.getMode(); it returns 0 which isn't any of the valid modes. I tried setting it explicitely with pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced the requested mode in nativeSetSerialPortParams at gnu.io.LPRPort.setLPRMode(Native Method) at gnu.io.LPRPort.setMode(LPRPort.java:87) Except for LPT_MODE_ANY, but the getMode call still failed out with an invalid state. I'm wondering if it's because I don't have the line pulled high like you said. This isn't a printer connected. It's a relay board with pins 2-9 tied to data, and 18-25 to gnd. The rest are open. I looked at a DB25 pinout diagram and I'm not sure which pin I need to tie high, and I looked through the archives, but didn't find a reference to something definitive. Can someone help me with which pin is the "online" pin as Trent mentioned? DB25 spec has ( I hope this formats correctly in this email) BUSY (11), SEL (13) or INIT (16) are candidates, but I'm guessing. Any clues? *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Thanks, Ed On 8/12/06, Trent Jarvi wrote: > > > Remember that the lp code expects a printer - or something like it. There > is a line that specifies the printer is online. If you are doing hobby > work, you will need to raise that line or loop it back to something that > is raised. > > If you just try reading a port with no device connected and online, there > will be an error while trying to read. This should be addressed in the > mail-list archives. > > On Sat, 12 Aug 2006, Ed wrote: > > > Trent, > > Right after I sent the results indicated below I re-ran the app and it > > apparently found the parallel port. The difference was that I set the > > permissions to : > > /dev: > > wildcard lp* > > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > > > I'm still not sure how to interpret the dmesg and lsmod before. However > I'm > > thinking that since the user now has permission to access the lp* port, > a > > request to access it loaded the lp and parport modules automatically and > > allowed me access. Here's the output of lsmod now: > > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > > lp 5540 0 (autoclean) > > parport 21608 1 (autoclean) [parport_pc lp] > > > > and dmesg: > > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > > On node 0 totalpages: 161776 > > lp0: using parport0 (polling). > > > > So I think I'm good, and ready to move on the next steps. > > > > Thanks Trent! > > > > Ed > > > > > > On 8/12/06, Ed wrote: > >> > >> Thanks for the reply Trent. > >> > >> I'm on a different system today but am trying your suggestons. This is > a > >> debian 3.1r2 system and I'm running jdk 1.5.0_04. > >> > >> Take a look below, but I think I have no parallel port support on this > >> kernel, however I never get the "No such device or address" return from > the > >> cat call as you did so I'm not sure how to interpret the results. > >> > >> When I run the test program (PortChooser.java), the getPortIdentifiers > >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this > is > >> more than I found on the RedHat system. Incidently --disable-lockfiles > has > >> no effect. > >> > >> It looks as though there is no parallel support in this kernel: > >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > >> On node 0 totalpages: 161776 > >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > >> > >> I'm a little confused by the results when I cat to the lp0 device. It > >> seems from the dmesg output that I don't have parallel printer support, > but > >> when I cat to the lp0 device, I get permission denied if I'm non-root > user > >> and input/output error if I'm root. Apparently this means I have the > >> device, > >> but no support in the kernel? > >> > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> > >> cat: /dev/lp0: Permission denied > >> ed at falcon:~/src/workspace/EASServer/src$ su > >> Password: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> > >> Here's my lp* device permissions. > >> /dev: > >> wildcard lp* > >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> If I change it to > >> /dev: > >> wildcard lp* > >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> I get: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> falcon:/home/ed/src/workspace/EASServer/src# exit > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> ed at falcon:~/src/workspace/EASServer/src$ > >> > >> What do you think? Should I recompile the kernel or is it something > else? > >> > >> By the way, I added the user ed to the lp and uucp groups on this > system. > >> > >> Thanks again, > >> > >> Ed > >> > >> On 8/11/06, Trent Jarvi wrote: > >> > > >> > On Fri, 11 Aug 2006, Ed wrote: > >> > > >> > > I'm trying to read and write a parallel port on a standard (Dell) > pc > >> > running > >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > >> > gates. > >> > > > >> > > I'm having problems getting rxtx to return a port enumeration from > >> > > getPortIdentifiers. I'm using a file > >> > > PortChooser.java as a test file to get things going. This is from > the > >> > Java > >> > > CookBook 2nd edition (Chapter 12). The call > >> > > > >> > > // get list of ports available on this particular computer, > >> > > // by calling static method in CommPortIdentifier. > >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > >> > > > >> > > returns a null pList; > >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I > configure > >> > and > >> > > compile without --disable-lockfiles I get: > >> > > > >> > > Stable Library > >> > > ========================================= > >> > > Native lib Version = RXTX-2.1-7 > >> > > Java lib Version = RXTX-2.1-7 > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > ... > >> > > > >> > > When I compile with --disable-lockfiles the call to > getPortIdentifiers > >> > > >> > > simply returns a null Enumeration. > >> > > > >> > > I've read the documention and threads about this issue and I feel > like > >> > I've > >> > > tried everything, so at the moment I'm stumped. > >> > > > >> > > I can supply any further info that may help. > >> > > > >> > > Thanks in advance. > >> > > > >> > > Ed > >> > > > >> > > >> > Hi Ed > >> > > >> > You may want to check the permissions of /dev/lp*. Also make sure lp > or > >> > your kernel support for lp is loaded. It should show up in dmesg and > >> > lsmod. > >> > > >> > For my laptop with no printer port enabled in BIOS is see: > >> > > >> > lp: driver loaded but no devices found > >> > > >> > in desg |grep lp > >> > > >> > [] $ ls -l /dev/lp* > >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > here root and group lp can read and write. Normal users cannot. > >> > > >> > Try a simple read as a user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: Permission denied > >> > > >> > Fix as root > >> > > >> > [] chmod 666 /dev/lp* > >> > [] $ ls -l /dev/lp* > >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > Now as user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: No such device or address > >> > > >> > So this is saying there is no lp0 on my laptop. > >> > > >> > -- > >> > Trent Jarvi > >> > tjarvi at qbang.org > >> > > >> > >> > >> > >> -- > >> > >> Ed > >> > > > > > > > > > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/59164078/attachment-0315.html From eddythejekyll at gmail.com Mon Aug 14 14:19:58 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 14:19:58 -0600 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? Message-ID: I'm using the ParallelPort class to drive a relay board. According to Mr. Jarvi, since this board isn't a printer, there will be a read error unless I hold the "printer online" line high in order to make the API think I'm talking to a printer. The problem is, I can't figure out which line is the "printer online". My DB25 spec lists the following: *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Anyone know which one I should tie high? I tried the busy line and it still errored out on the read. Thanks in advance, -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/66cf3c3e/attachment-0315.html From tjarvi at qbang.org Mon Aug 14 18:06:29 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:06:29 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Mon, 14 Aug 2006, Ed wrote: > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > which isn't any of the valid modes. I tried setting it explicitely with > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced > the requested mode in nativeSetSerialPortParams > at gnu.io.LPRPort.setLPRMode(Native Method) > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > invalid state. This is because rxtx only supports the basics. JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } One could program in more support. When I did that I just had a daisy wheel printer to test with and doing any more would have been blind. So that behavior is expected. I'll look to see if the Parallel Complete book mentions which pins you need to raise. If you look in the source code [ParallelImp.c] you can see this code isn't well tested. It has worked for hobby use in the past as I'd guess you are trying to do. But my experience with the code is as is mentioned in the top of the source: /* fear he who enter here. It appears that things have changed. An attempt has been made to put things the way the should be. It compiles and ParallelBlackBox runs. No further guarantees. Well... One.. it will print "Hello World!" on an epson DX 10 printer. you know.. the 10 character per second daisy wheel printer ;) - Trent Jarvi */ That comment is from 1997 or so. Since then some windows support was contributed but it is still very green code. We get about four requests for parallel support a year so its just not a well traveled area. It would be nice to have some documentation for the people trying to hook parallel ports to electronic projects. That appears to be the exclusive use of the Parallel support. The wiki pages are intended to let people share information like this to help each other in their projects as they figure out the details. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Aug 14 18:40:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:40:40 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: > PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): > > if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) > val = System.getProperty("gnu.io.SerialPorts"); > > Shouldn't the comparison be != null? getProperty returns null if the > variable is NOT found, and you only want to assign to val if it IS > found, right? Same thing for the > parallel port case. End result is the same I guess, since you check > for null later, > but probably should be fixed. I think this is just a fallback to the second property. gnu.io.SerialPorts isn't documented but perhaps it is used. It should behave properly as documented in INSTALL. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 14 18:56:55 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 19:56:55 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: <44E11BD7.5030102@gmail.com> Trent Jarvi wrote: >> PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): >> >> if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) >> val = System.getProperty("gnu.io.SerialPorts"); >> > > I think this is just a fallback to the second property. > gnu.io.SerialPorts isn't documented but perhaps it is used. It should > behave properly as documented in INSTALL. Doh - yup, I missed the fact that the property names were different... Pete From berkland at spamcop.net Mon Aug 14 19:58:21 2006 From: berkland at spamcop.net (Doug Berkland) Date: Mon, 14 Aug 2006 21:58:21 -0400 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? In-Reply-To: References: Message-ID: <269e40090608141858g698c2579v8d962deca3f4df53@mail.gmail.com> Based on memory and this page as confirmation, I would say pin 13 is the "Online" pin for SPP (standard parallel port). http://www.quatech.com/support/comm-over-parallel.php On 8/14/06, Ed wrote: > > I'm using the ParallelPort class to drive a relay board. According to Mr. > Jarvi, since this board isn't a printer, there will be a read error unless I > hold the "printer online" line high in order to make the API think I'm > talking to a printer. The problem is, I can't figure out which line is the > "printer online". My DB25 spec lists the following: > > *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and > Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data > Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 > D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select > 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select > In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit > 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 > Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and > Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground > > Anyone know which one I should tie high? I tried the busy line and it > still errored out on the read. > > Thanks in advance, > > -- > Ed > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/842bb770/attachment-0315.html From eddythejekyll at gmail.com Mon Aug 14 20:25:42 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 20:25:42 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Ah, I see. I've seen the caveats about limited Parallel support, but I thought it was mainly about the javax.comm package. The gnu.io is derived from javax.comm package right? That is, is the parallel support in rxtx is a superset of what's in javax.comm? I'm using this not for hobby usage, but for some simple instrumenation and control. If the project mandates it, I'll gladly work on extending the support. In the meantime, I need to get some sanity checks working, and repair my relay board (I smoked the ULN2803 chip, apparently by tying the BUSY (pin 11) to vcc). I guess I'll try the SEL pin next (and a supply of 2803s) with a ~1K pullup. The caveat in the comment block isn't very encouraging (!), but I borrowed an old Epson Stylus Color 600 printer to see what I can do. If I can write out characters to it I'll be happy. Parallel printers aren't easy to find these days. I haven't yet looked at the native source, yet, but I've just imported it into eclipse and I'll surf around a bit. Ed On 8/14/06, Trent Jarvi wrote: > > On Mon, 14 Aug 2006, Ed wrote: > > > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > > which isn't any of the valid modes. I tried setting it explicitely with > > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to > proced > > the requested mode in nativeSetSerialPortParams > > at gnu.io.LPRPort.setLPRMode(Native Method) > > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > > invalid state. > > This is because rxtx only supports the basics. > > JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > jclass jclazz, jint mode) > { > switch(mode) > { > case LPT_MODE_ANY: > break; > case LPT_MODE_SPP: > case LPT_MODE_PS2: > case LPT_MODE_EPP: > case LPT_MODE_ECP: > case LPT_MODE_NIBBLE: > default: > throw_java_exception( env, > UNSUPPORTED_COMM_OPERATION, > "nativeSetSerialPortParams", > "setLPRMode was unable to proced the > requested \ > mode" > ); > } > return(JNI_TRUE); > } > > One could program in more support. When I did that I just had a daisy > wheel printer to test with and doing any more would have been blind. > > So that behavior is expected. I'll look to see if the Parallel Complete > book mentions which pins you need to raise. If you look in the source > code [ParallelImp.c] you can see this code isn't well tested. It has > worked for hobby use in the past as I'd guess you are trying to do. But > my experience with the code is as is mentioned in the top of the source: > > /* > fear he who enter here. It appears that things have changed. An > attempt > has been made to put things the way the should be. > > It compiles and ParallelBlackBox runs. No further guarantees. > > Well... One.. it will print "Hello World!" on an epson DX 10 > printer. > you know.. the 10 character per second daisy wheel printer ;) > > - Trent Jarvi > */ > > That comment is from 1997 or so. > > Since then some windows support was contributed but it is still very green > code. We get about four requests for parallel support a year so its just > not a well traveled area. > > It would be nice to have some documentation for the people trying to hook > parallel ports to electronic projects. That appears to be the exclusive > use of the Parallel support. The wiki pages are intended to let people > share information like this to help each other in their projects as they > figure out the details. > > -- > Trent Jarvi > tjarvi at qbang.org > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/fbb5ddb4/attachment-0315.html From lyon at docjava.com Tue Aug 15 06:06:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 15 Aug 2006 08:06:27 -0400 Subject: [Rxtx] smoking is bad for your health In-Reply-To: References: Message-ID: Hi All, If you are connecting to the parallel port and smoking chips, it is time for extra stuff to buffer the parallel port. You may be want more current, in which case driver transistors are needed, or, if you are using the port as an output only device, you may like to add your own bus transceiver (e.g., 74245), set for output. Do be careful to design this properly; http://www.beyondlogic.org/spp/parallel.htm Some people like to use Octal D-type F.F's with OC outputs, like a 74374, http://upgrade.cntc.ac.kr/data/ttl/74374.html I like this one, as it has the D FF's and can latch the outputs for presentation to slower electronics (like relays). But careful! A relay that needs more current than the family of the device you have selected will look like a short to ground, and you will smoke your bug! And MOBO's do NOT come with the ability to drive any load you like. Check the power specs on your relay and be sure to protect the chip against back EMF with a diode. It is best to smoke test this on a bread board BEFORE hooking it to the computer. And be sure you smoke test the corner points in the ckt for a while, lest it fail in the field. - Doug >Ah, I see. I've seen the caveats about limited >Parallel support, but I thought it was mainly >about the javax.comm package. The >gnu.io is derived from javax.comm >package right? That is, is the parallel support >in rxtx is a superset of what's in javax.comm? > >I'm using this not for hobby usage, but for some >simple instrumenation and control. If the >project mandates it, I'll gladly work on >extending the support. In the meantime, I need >to get some sanity checks working, and repair my >relay board (I smoked the ULN2803 chip, >apparently by tying the BUSY (pin 11) to vcc). I >guess I'll try the SEL pin next (and a supply of >2803s) with a ~1K pullup. > >The caveat in the comment block isn't very >encouraging (!), ?but?I borrowed an old Epson >Stylus Color 600 printer to see what I can do. >?If I can write out characters to it I'll be >happy. Parallel printers aren't easy to find >these days. > > I haven't yet looked at the native source, yet, >but I've just imported it into eclipse and I'll >surf around a bit. > >Ed > >On 8/14/06, Trent Jarvi <tjarvi at qbang.org> wrote: > >On Mon, 14 Aug 2006, Ed wrote: > >> When I try to get the mode with int mode = pPort.getMode(); it returns 0 >> which isn't any of the valid modes. I tried setting it explicitely with >> pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with >> >> gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced >> the requested mode in nativeSetSerialPortParams >> at gnu.io.LPRPort.setLPRMode(Native Method) >> at gnu.io.LPRPort.setMode(LPRPort.java:87) >> >> Except for LPT_MODE_ANY, but the getMode call still failed out with an >> invalid state. > >This is because rxtx only supports the basics. > >JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > ???????jclass jclazz, jint mode) >{ > ???????switch(mode) > ???????{ > ???????????????case LPT_MODE_ANY: > ???????????????????????break; > ???????????????case LPT_MODE_SPP: > ???????????????case LPT_MODE_PS2: > ???????????????case LPT_MODE_EPP: > ???????????????case LPT_MODE_ECP: > ???????????????case LPT_MODE_NIBBLE: > ???????????????default: > ???????????????????????throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, > ???????????????????????????????"nativeSetSerialPortParams", > ???????????????????????????????"setLPRMode was >unable to proced the requested \ > ???????????????????????????????mode" > ???????????????????????); > ???????} > ???????return(JNI_TRUE); >} > >One could program in more support.??When I did that I just had a daisy >wheel printer to test with and doing any more would have been blind. > >So that behavior is expected.??I'll look to see if the Parallel Complete >book mentions which pins you need to raise.??If you look in the source >code [ParallelImp.c] you can see this code isn't well tested.??It has >worked for hobby use in the past as I'd guess you are trying to do.??But >my experience with the code is as is mentioned in the top of the source: > >/* > fear he who enter here.??It appears that things have changed.??An attempt > has been made to put things the way the should be. > > ???????It compiles and ParallelBlackBox runs.??No further guarantees. > > ???????Well... One.. it will print "Hello World!" on an epson DX 10 printer. > ???????you know.. the 10 character per second daisy wheel printer ;) > > ???????- Trent Jarvi >*/ > >That comment is from 1997 or so. > >Since then some windows support was contributed but it is still very green >code.??We get about four requests for parallel support a year so its just >not a well traveled area. > >It would be nice to have some documentation for the people trying to hook >parallel ports to electronic projects.??That appears to be the exclusive >use of the Parallel support.??The wiki pages are intended to let people >share information like this to help each other in their projects as they >figure out the details. > >-- >Trent Jarvi >tjarvi at qbang.org > > > > >-- >Ed > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 15 13:26:16 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 15 Aug 2006 14:26:16 -0500 Subject: [Rxtx] crash with too much memory Message-ID: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded from qbang.org. I'm exercising the RXTX COMM serial interface, both in a small standalone test and with the same code pulled into a large OSGI framework setup. If I use the stock .jar/.dll's, then everything works correctly in both situations. I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 (mingw-special)). If I use my locally built version, then my small test case works just fine, both when run inside Eclipse and when run standalone on the command line. However, when I try and use my locally built .jar/.dll's in the large framework environment, then I get a JVM crash with the attached log. Normally this would lead me to think that I was running out of memory or something in the large environment, and when I try and play with the JVM memory args, some interesting things show up. In our large environment, we have -Xms32M/-Xmx1024M - this appears to be the problem. If I set max to something like 64M, then things work. The cross over point from working to failing seems to be around 32M/110M (works) and 32M/111M (fails). But 128M/128M works while 128M/129M fails. So it seems to have to do with how much memory is actually available, or something like that. The thing that occurs to me is if my GCC is somehow generating something like "near" calls. But when the JVM has a lot of RAM available, it puts the DLL up somehwere in the address space and then the near calls fail - far calls are needed. So, I'm thinking this is probably a difference in the MinGW GCC I'm using and the one that was used to build the stock binaries from qbang, or maybe some command line args were changed? So, I'm hoping someone will have an idea of what's going on here... Thanks, Pete From tjarvi at qbang.org Tue Aug 15 18:54:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 15 Aug 2006 18:54:04 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: On Tue, 15 Aug 2006, Pete Flugstad wrote: > I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded > from qbang.org. > > I'm exercising the RXTX COMM serial interface, both in a small > standalone test and with the same code pulled into a large OSGI > framework setup. > > If I use the stock .jar/.dll's, then everything works correctly in > both situations. > > I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 > (mingw-special)). > > If I use my locally built version, then my small test case works just > fine, both when run inside Eclipse and when run standalone on the > command line. However, when I try and use my locally built > .jar/.dll's in the large framework environment, then I get a JVM crash > with the attached log. > > Normally this would lead me to think that I was running out of memory > or something in the large environment, and when I try and play with > the JVM memory args, some interesting things show up. > > In our large environment, we have -Xms32M/-Xmx1024M - this appears to > be the problem. If I set max to something like 64M, then things work. > The cross over point from working to failing seems to be around > 32M/110M (works) and 32M/111M (fails). > But 128M/128M works while 128M/129M fails. So it seems to have to do > with how much memory is actually available, or something like that. > > The thing that occurs to me is if my GCC is somehow generating > something like "near" calls. But when the JVM has a lot of RAM > available, it puts the DLL up somehwere in the address space and then > the near calls fail - far calls are needed. > > So, I'm thinking this is probably a difference in the MinGW GCC I'm > using and the one that was used to build the stock binaries from > qbang, or maybe some command line args were changed? > > So, I'm hoping someone will have an idea of what's going on here... > Hi Pete The binaries are from the src. They should be reproducable. I did extensive testing of rxtx several years ago using mingw as the compiler. The version was 2.95. I have not changed versions since. There are way too many variables as it is. I have a linux->mingw cross compiler rpm I use for all windows use. If you want a copy of it you can have it. It isn't anything 'special' :) -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Thu Aug 17 11:49:24 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 17 Aug 2006 12:49:24 -0500 Subject: [Rxtx] crash with too much memory In-Reply-To: References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> On 8/15/06, Trent Jarvi wrote: > I did extensive testing of rxtx several years ago using mingw as the > compiler. The version was 2.95. I have not changed versions since. > There are way too many variables as it is. FYI, I believe I've solved this problem by changing how the dll's were built. The original mingw makefile was generating Serial.def, then performing various operations with dlltool and ld. I modified the makefile to create the dll using this page: as a guide. With that, there's no longer any need to deal with Serial.def and the makefile becomes _much_ simpler. This appears to have addressed my problems with crashing. FWIW, GCC 2.95 is _really_ old - you should consider investigating upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is supposed to generate a native binary (i.e. just like MinGW). Thanks, Pete From claretlc at yahoo.com Thu Aug 17 12:34:48 2006 From: claretlc at yahoo.com (Clare Cooley) Date: Thu, 17 Aug 2006 11:34:48 -0700 (PDT) Subject: [Rxtx] parallel port communication Message-ID: <20060817183448.76911.qmail@web53908.mail.yahoo.com> Hi, I'm trying to write a 1 to a bit 15 on a parallel port cable that isn't attached to a printer.(It's a control box for eye-tracking equipment.)I need to do this in Java. I looked at the javax.comm documentation, and it said, "Application programs should not directly create ParallelPortEvent objects." So is there a way to do this with your package? If not, do you have any suggestions of where to look? It really needs to be done in Java. Thanks, Clare Cooley __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From pat at xvalheru.org Thu Aug 17 13:13:52 2006 From: pat at xvalheru.org (pat) Date: Thu, 17 Aug 2006 21:13:52 +0200 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060817190751.M5586@xvalheru.org> Hi there, I've question(s) for you. I need to communicate with scale, I've used the Sun's direver. Now I've switched to Rxtx and the speed of the communication is perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, but the difference between the crash time is 5 second ... . My question is: Is there a stable driver ??? Or what I have to do to have stable enough serial port driver ??? OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. Thanks to all for the help. Pat From tjarvi at qbang.org Fri Aug 18 05:13:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 05:13:42 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> Message-ID: On Thu, 17 Aug 2006, Pete Flugstad wrote: > On 8/15/06, Trent Jarvi wrote: >> I did extensive testing of rxtx several years ago using mingw as the >> compiler. The version was 2.95. I have not changed versions since. >> There are way too many variables as it is. > > FWIW, GCC 2.95 is _really_ old - you should consider investigating > upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is > supposed to generate a native binary (i.e. just like MinGW). > It is really old but also well known like C itself. I have considered upgrading. The ToyBox builds should be gcc 3* cross-compiled. I'm not going to be validating gcc 3* w32 binaries though. It's looking like we will need to focus support on MSFT's toolchain for 64 bit windows support until it is possible for gcc to support w64. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Aug 18 05:32:10 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 07:32:10 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: Hi All, Does anyone know how to produce mac intel binaries on a Fedora Linux box? Thanks! - Doug From tjarvi at qbang.org Fri Aug 18 06:42:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 06:42:05 -0600 (MDT) Subject: [Rxtx] cross compilation for the mac In-Reply-To: References: Message-ID: On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Does anyone know how to produce > mac intel binaries on a Fedora Linux > box? > > Thanks! > - Doug Hi Doug You need to build the cross toolchain which means copying the Darwin/Mac binaries over to fedora. It would be nontrivial but possible. Do the Darwin libraries work with Mac in general? I'm not aware of the licensing issues associated with grabbing Mac binaries. Same with OpenSolaris/Solaris. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Aug 18 08:15:26 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 10:15:26 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> In theory building against Darwin would be sufficient to getting things working on MacOS X. You need to remember that Darwin is the low-level OS, while MacOS X adds the everything else on top. IOKit, which is the I/O API, is available as part of Darwin. The only thing you will need extra are the Java libraries. One thing is that I would recommend that when producing binaries for the Mac, is to ensure they are Universal binaries (PPC+Intel). Andre > > From: Trent Jarvi > Date: 2006/08/18 Fri AM 08:42:05 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] cross compilation for the mac > > On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > > > Hi All, > > Does anyone know how to produce > > mac intel binaries on a Fedora Linux > > box? > > > > Thanks! > > - Doug > > Hi Doug > > You need to build the cross toolchain which means copying the Darwin/Mac > binaries over to fedora. It would be nontrivial but possible. > > Do the Darwin libraries work with Mac in general? I'm not aware of the > licensing issues associated with grabbing Mac binaries. > > Same with OpenSolaris/Solaris. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Aug 18 13:43:16 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 15:43:16 -0400 Subject: [Rxtx] cross compilation for the mac In-Reply-To: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: >In theory building against Darwin would be sufficient to getting >things working on MacOS X. You need to remember that Darwin is the >low-level OS, while MacOS X adds the everything else on top. IOKit, >which is the I/O API, is available as part of Darwin. The only thing >you will need extra are the Java libraries. > >One thing is that I would recommend that when producing binaries for >the Mac, is to ensure they are Universal binaries (PPC+Intel). > >Andre I find the xcode ide for generating a mix of universal binaries and java very difficult to make work. Is there a way to do this with make files? Thanks! - Doug From ajmas at sympatico.ca Fri Aug 18 13:54:55 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 15:54:55 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818195455.PGAP29052.tomts13-srv.bellnexxia.net@smtp1.sympatico.ca> It should be doable. XCode hands off the compilation process to gcc et al, for the compilation of C/C++ code and to javac et al. for the Java side. While ant is the favoured tool for 'automated' Java compilation, make can easily be used. All is needed is someone to volounteer to do the work. Andre "Dr. Douglas Lyon" wrote > > >In theory building against Darwin would be sufficient to getting > >things working on MacOS X. You need to remember that Darwin is the > >low-level OS, while MacOS X adds the everything else on top. IOKit, > >which is the I/O API, is available as part of Darwin. The only thing > >you will need extra are the Java libraries. > > > >One thing is that I would recommend that when producing binaries for > >the Mac, is to ensure they are Universal binaries (PPC+Intel). > > > >Andre > > I find the xcode ide for generating a mix of universal binaries > and java very difficult to make work. Is there a way to do this > with make files? > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Fri Aug 18 16:34:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 16:34:46 -0600 (MDT) Subject: [Rxtx] serial driver newbe question and problem In-Reply-To: <20060817190751.M5586@xvalheru.org> References: <20060817190751.M5586@xvalheru.org> Message-ID: On Thu, 17 Aug 2006, pat wrote: > Hi there, > > I've question(s) for you. I need to communicate with scale, I've used the > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > but the difference between the crash time is 5 second ... . > > My question is: Is there a stable driver ??? Or what I have to do to have > stable enough serial port driver ??? > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > Thanks to all for the help. > > Pat > Could you describe the hardware you have, the version of rxtx and provide the log of the crash? Did you download binaries? I've not been seeing a jvm crash with rxtx -- Trent Jarvi tjarvi at qbang.org From lunareclipse03 at web.de Sat Aug 19 12:11:48 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 19 Aug 2006 20:11:48 +0200 Subject: [Rxtx] Problem solved! Message-ID: <920065539@web.de> Hi everybody, I posted some months ago and asked about some help on my very special problem concerning my win32 port of a communications library. Now I just want to inform you that no further "mindstorming" is needed because I solved the problem by completely rewriting the win32 port of the library. Now everything works fine. Thank you all for your time and patience. --Sven Ahlemann __________________________________________________________________________ Erweitern Sie FreeMail zu einem noch leistungsst?rkeren E-Mail-Postfach! Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131 From ajmas at sympatico.ca Mon Aug 21 09:58:23 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 21 Aug 2006 11:58:23 -0400 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060821155823.TLSM18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Next time that happens, including a copy of the crash log, produced by Windows could probably help too. Andre Trent Jarvi wrote: > > On Thu, 17 Aug 2006, pat wrote: > > > Hi there, > > > > I've question(s) for you. I need to communicate with scale, I've used the > > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > > but the difference between the crash time is 5 second ... . > > > > My question is: Is there a stable driver ??? Or what I have to do to have > > stable enough serial port driver ??? > > > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > > > Thanks to all for the help. > > > > Pat > > > > Could you describe the hardware you have, the version of rxtx and > provide the log of the crash? Did you download binaries? > > I've not been seeing a jvm crash with rxtx > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From adrian.l.parker at gmail.com Thu Aug 24 09:10:39 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Thu, 24 Aug 2006 11:10:39 -0400 Subject: [Rxtx] Portability issues Message-ID: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use RXTX 2.0? Does it provide system librairies that javax.comm does not? I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, or 2000, or server 2003). Can this be done with a single implementation of RXTX? I don't want to have different versions of Java code that have different package names. References: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Message-ID: On Thu, 24 Aug 2006, Adrian Parker wrote: > Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use > RXTX 2.0? Does it provide system librairies that javax.comm does not? > > I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's > OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, > or 2000, or server 2003). Can this be done with a single implementation of > RXTX? I don't want to have different versions of Java code that have > different package names. > Hi Adrian. The native code can support all of the platforms you mention. I've never compiled for unixware or openunix but the patches are in the code. So you would need to compile for that target. >From there you would probably be best off going with rxtx 2.1 so you have all the classes in one package. You can opt to use rxtx 2.0 with Sun's commapi for Solaris v 2. The main differences are rxtx 2.1 comes with all the source/classes and is in package gnu.io while Sun's requires rxtx for some platforms but is in package javax.comm. The low level code is the same in either case as far as rxtx is concerned. -- Trent Jarvi tarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 04:12:52 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 06:12:52 -0400 Subject: [Rxtx] Serial.addEventListener bug? Message-ID: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on OpenServer 5.0.7). Its what Sun packages. I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an exception. It seems to throw the exception if no listener was previously declared (although I've not had chance to verify). Is this desireable behaviour? Sun's original API doesn't mention anything about an exception on this function, http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) Of course this is an old version of RXTX, so perhaps this has been changed. -- Adrian Parker Simulation Software Developer DLCSPM 4-4-3 (c) Building A31, CFB Kingston Tel: (613) 541-5010 x3020 CSN: 271-3020 Email: parker at lsec.dnd.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/22e2ea57/attachment-0305.html From tjarvi at qbang.org Fri Aug 25 05:15:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 25 Aug 2006 05:15:44 -0600 (MDT) Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: On Fri, 25 Aug 2006, Adrian Parker wrote: > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > OpenServer 5.0.7). Its what Sun packages. > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > exception. It seems to throw the exception if no listener was previously > declared (although I've not had chance to verify). > > Is this desireable behaviour? Sun's original API doesn't mention anything > about an exception on this function, > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > Of course this is an old version of RXTX, so perhaps this has been changed. > > > What exception was thrown? You can replace 1.4-8 with 2.0 for testing purposes. They are the same package. I doubt Sun shipped or packaged that. I think Caldera/SCOx/... did at one point. There may still be updates on their pages. I recall them sending patches here which are in current rxtx. -- Trent Jarvi tjarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 05:28:32 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 07:28:32 -0400 Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: <7da71e910608250428q32b86632g9a67b1b4efe69830@mail.gmail.com> On 8/25/06, Trent Jarvi wrote: > > On Fri, 25 Aug 2006, Adrian Parker wrote: > > > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > > OpenServer 5.0.7). Its what Sun packages. > > > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > > exception. It seems to throw the exception if no listener was > previously > > declared (although I've not had chance to verify). > > > > Is this desireable behaviour? Sun's original API doesn't mention > anything > > about an exception on this function, > > > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > > > Of course this is an old version of RXTX, so perhaps this has been > changed. > > > > > > > > What exception was thrown? Its weird. I catch an Exception. But when on that exception I call getClass().getName() I end up with a NullPointerException. You can replace 1.4-8 with 2.0 for testing > purposes. They are the same package. > > I doubt Sun shipped or packaged that. Doh! I meant to say SCO sorry. I was surfing Sun's site when I wrote that :) Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/e43aed3a/attachment-0305.html From sjudd at seas.upenn.edu Sat Aug 26 16:42:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Sat, 26 Aug 2006 18:42:09 -0400 Subject: [Rxtx] Mac commapi Message-ID: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? If so, where do I get it? Sun has various versions at http://www.sun.com/download/products.xml?id=43208d3d but they are for SolarisSparc, SolarisX86, Linux, and Generic. Do I use the Generic one? If so, read on; otherwise redirect me. While using the Generic version, my attempt to run the BlackBox sample program elicits a message saying it "can't find javax.comm.properties". I found a note in the rxtx.org HowTo (for Linux) saying to create this thing in /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties but where should it go on the Mac? After reading many versions of documentation around, and updates and revisions and re-authorings, I have worked my way into a state of confusion and high uncertainty. Please release me. sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060826/02d6b163/attachment-0244.html From tod at todbot.com Sat Aug 26 17:08:33 2006 From: tod at todbot.com (Tod E. Kurt) Date: Sat, 26 Aug 2006 16:08:33 -0700 Subject: [Rxtx] Mac commapi In-Reply-To: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Message-ID: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> You don't need Sun's CommAPI. You just need RXTX. Once you download RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and the native library is ("librxtxSerial.jnilib" on Mac OS X) via the standard methods. For instance, if you've placed those two files in a directory called 'rxtxlib' and you want to run a Java class called HelloWorld in the current directory, do the following: % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar HelloWorld On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? > If so, where do I get it? Sun has various versions at > http://www.sun.com/download/products.xml?id=43208d3d > but they are for SolarisSparc, SolarisX86, Linux, and Generic. > Do I use the Generic one? > If so, read on; otherwise redirect me. > > While using the Generic version, my attempt to run the BlackBox > sample program > elicits a message saying it "can't find javax.comm.properties". > I found a note in the rxtx.org HowTo (for Linux) saying to create > this thing in > /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties > but where should it go on the Mac? > > After reading many versions of documentation around, and updates > and revisions > and re-authorings, I have worked my way into a state of confusion > and high > uncertainty. Please release me. > > sj > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From sjudd at seas.upenn.edu Sun Aug 27 22:55:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Mon, 28 Aug 2006 00:55:09 -0400 Subject: [Rxtx] Mac commapi In-Reply-To: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> Message-ID: This was immensely helpful. Thank you, Tod. I wish it had been explicit somewhere in the documentation; it would have saved me 2 days of grief. One hugely valuable thing like this little set of instructions is that it implicitly lists all the hundreds of things you DON"T have to do. I know it seems obvious to those in the know, but every little bit of help on an arcane topic like this opens up the product to an exponentially wider group of dilettantes. I managed to get the SerialDemo program (from Sun) to work too. Hurrah! However, it required changing all the javax.comm references to gnu.io which I had heard of due to all my rambling readings. Is there not a demo program on rxtx.org already available that would not have needed this? BTW, the link on the Projects page for jPIC[Source] sends a *.hex file to a PIC 16F877 or similar chip... takes me to nowhere useful. I do not understand what the name "Toybox" is meant to imply. Thanks, sj On 2006 Aug 26, at 7:08 PM, Tod E. Kurt wrote: > You don't need Sun's CommAPI. You just need RXTX. Once you download > RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and > the native library is ("librxtxSerial.jnilib" on Mac OS X) via the > standard methods. > > For instance, if you've placed those two files in a directory called > 'rxtxlib' and you want to run a Java class called HelloWorld in the > current directory, do the following: > > % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar > HelloWorld > > > On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > >> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? >> If so, where do I get it? Sun has various versions at >> http://www.sun.com/download/products.xml?id=43208d3d >> but they are for SolarisSparc, SolarisX86, Linux, and Generic. >> Do I use the Generic one? >> If so, read on; otherwise redirect me. >> >> While using the Generic version, my attempt to run the BlackBox >> sample program >> elicits a message saying it "can't find javax.comm.properties". >> I found a note in the rxtx.org HowTo (for Linux) saying to create >> this thing in >> /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties >> but where should it go on the Mac? >> >> After reading many versions of documentation around, and updates >> and revisions and re-authorings, I have worked my way into a state >> of confusion and high uncertainty. Please release me. >> >> sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060827/b80d6389/attachment-0275.html From pete.flugstad at gmail.com Mon Aug 28 12:38:27 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 13:38:27 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE Message-ID: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Okay, my understanding is that originally, RTS meant "Request to Send" - the DTE (the PC) would assert this and the DCE (modem) would assert "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send data. This really only provided uni-directional flow control, from the PC to the modem. Now, as I understand it, the more modern usage of RTS is that it is used for the DTE to assert flow control back to the DCE - basically it means "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) raises this, then the DCE(modem) is free to send data to the DTE - this allows the DTE(PC) to exert flow control back towards the DCE(modem). This discussion is based on the Serial HOWTO from: and lots of other reading... Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which is defined as: > Enables RTS flow-control handshaking. The driver raises the RTS line, > enabling the DCE to send, when the input buffer has enough room to > receive data. The driver lowers the RTS line, preventing the DCE to > send, when the input buffer does not have enough room to receive > data. If this value is used, it is an error for the application to adjust > the line with EscapeCommFunction. which clearly reflects the newer usage style - it keeps the RTS line high as long as there is space to _receive_ data. And takes it low when the receive/input buffer is getting full to stop the modem from sending it data. Does this jive with other peoples understanding of RTS usage? Unfortunately, the hardware I'm trying to talk to wants to use the OLD style of RTS line usage. An existing Windows C++ program uses RTS_CONTROL_TOGGLE, which documentation states: > Specifies that the RTS line will be high if bytes are available for transmission. > After all buffered bytes have been sent, the RTS line will be low. If this value is > set, it would be an error for an application to adjust the line with > EscapeCommFunction. This value is ignored in Windows 95; it causes the > driver to act as if RTS_CONTROL_ENABLE were specified. This seems to be the OLD RTS behavior, right? So, what I seem to need is to be able to control the RTS line, either using TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS when getting ready to TX and clear it when the output buffer is empty). Does this make sense, or am I off in the weeds? Thanks, Pete From tjarvi at qbang.org Mon Aug 28 18:21:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 28 Aug 2006 18:21:10 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: On Mon, 28 Aug 2006, Pete Flugstad wrote: > Okay, my understanding is that originally, RTS meant "Request to Send" > - the DTE (the PC) would assert this and the DCE (modem) would assert > "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send > data. This really only provided uni-directional flow control, from the PC to > the modem. > > Now, as I understand it, the more modern usage of RTS is that it is used > for the DTE to assert flow control back to the DCE - basically it means > "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) > raises this, then the DCE(modem) is free to send data to the DTE - this > allows the DTE(PC) to exert flow control back towards the DCE(modem). > > This discussion is based on the Serial HOWTO from: > > > > and lots of other reading... > > Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > is defined as: > >> Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > > which clearly reflects the newer usage style - it keeps the RTS line high > as long as there is space to _receive_ data. And takes it low when the > receive/input buffer is getting full to stop the modem from sending it data. > > Does this jive with other peoples understanding of RTS usage? > > Unfortunately, the hardware I'm trying to talk to wants to use the OLD > style of RTS line usage. An existing Windows C++ program uses > RTS_CONTROL_TOGGLE, which documentation states: > >> Specifies that the RTS line will be high if bytes are available for transmission. >> After all buffered bytes have been sent, the RTS line will be low. If this value is >> set, it would be an error for an application to adjust the line with >> EscapeCommFunction. This value is ignored in Windows 95; it causes the >> driver to act as if RTS_CONTROL_ENABLE were specified. > > This seems to be the OLD RTS behavior, right? > > So, what I seem to need is to be able to control the RTS line, either using > TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS > when getting ready to TX and clear it when the output buffer is empty). > > Does this make sense, or am I off in the weeds? > Hi Pete OK. That sounds right. I do not know how you would communicate the difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through CommAPI as it stands. I take it you did not find anything either? Perhaps the best thing to do for your code is to toggle the RTS yourself. This could be a feature in the future JSR API perhaps. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 28 20:54:34 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 21:54:34 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <44F3AC6A.10908@gmail.com> Trent Jarvi wrote: > OK. That sounds right. I do not know how you would communicate the > difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through > CommAPI as it stands. I take it you did not find anything either? > > Perhaps the best thing to do for your code is to toggle the > RTS yourself. This could be a feature in the future JSR API perhaps. Yeah, this is what I ended up doing. I had to modify the dll in order to be able to set hardware flow control (which I do want), but leave the RTS flow control at RS_CONTROL_ENABLE. After that I just toggle setRTS(true) when I'm ready to send and setRTS(false) when I get a OUTPUT_BUFFER_EMPTY notification. Haven't tested with real hardware yet, but it seems to work OK. Thanks for the feedback! Pete From Bob_Jacobsen at lbl.gov Tue Aug 29 08:49:02 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 29 Aug 2006 07:49:02 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >is defined as: > > > Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > >which clearly reflects the newer usage style - it keeps the RTS line high >as long as there is space to _receive_ data. And takes it low when the >receive/input buffer is getting full to stop the modem from sending it data. > >Does this jive with other peoples understanding of RTS usage? Can you point to any devices that actually implement this "new" understanding? I think the person who wrote that documentation paragraph is just confused. The original "RTS/CTS" handshaking was extended to input (from DCE to DTE) handshaking via the DTR (Data Terminal Ready) line. I think the person who wrote the double-quoted paragraph above was just confused between the directions, and mixed them up. If you change "RTS" to "DTR" in that paragraph, you get: > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > enabling the DCE to send, when the input buffer has enough room to > > receive data. The driver lowers the DTR line, preventing the DCE to > > send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. which describes how dozens of devices actually work for controlling flow into the DTE (computer). This then leaves RTS/CTS (with RTS usually just stuck high) for controlling flow into the DCE (peripheral). Again, lots of hardware devices actually do this. I don't work on Windows, so can't be sure of what happens. But on the MacOS X version of RXTX, CTS low stops transmission, exactly as the "old" style would expect. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From mschned at basis.com Tue Aug 29 12:57:45 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 12:57:45 -0600 Subject: [Rxtx] Porting to AIX Message-ID: <01f201c6cb9d$034d4f20$341416ac@basis.com> Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar From mschned at basis.com Tue Aug 29 13:58:05 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 13:58:05 -0600 Subject: [Rxtx] Porting to AIX References: <01f201c6cb9d$034d4f20$341416ac@basis.com> Message-ID: <024901c6cba5$714c3560$341416ac@basis.com> After looking through the build messages closer, there is an error building SerialImp.c: gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type Looks like B57600 is not defined and there are no definitions for DEVICEDIR and LOCKDIR on AIX. Can I just a the following to SerialImp.h? #if defined(__aix__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __aix__ */ Mark Schnedar ----- Original Message ----- From: "Mark E. Schnedar" To: Sent: Tuesday, August 29, 2006 12:57 PM Subject: [Rxtx] Porting to AIX Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 29 15:25:35 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 29 Aug 2006 16:25:35 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <84d4a6d50608291425i1fb819d3i615cf9b85b1e9617@mail.gmail.com> On 8/29/06, Bob Jacobsen wrote: > Can you point to any devices that actually implement this "new" understanding? > > I think the person who wrote that documentation paragraph is just confused. The paragraph is from the Windows documentation of its DCB structure which is used to configure the Serial Device. This is what RXTX uses internally. My version is from MSDN, and Google finds the same text here: (search for fRtsControl). I have not seen any mention anywhere of it being incorrect (and yes, I did look, because I thought the same thing). My discussion is based on trying to use RXTX to talk to a device that used the old style of one-way flow control (RTS is raised to SEND data from the PC to the device). An existing VC++ app use the old-style RTS_CONTROL_TOGGLE. RXTX did not - it used the newer style RTS_CONTROL_HANDSHAKE, so things didn't work - the device was seeing RTS HIGH all the time, so it was thinking that the PC was ready to TX all the time. When I switch RXTX to using RTS_CONTROL_ENABLED and manually control RTS, then things work correctly. The behavior is consistent with this understanding if I hook two serial ports on Windows XP in lookback (via null modem). I'd be very surprised if this had not been corrected by M$ by this time. The same structure has been around since WinNT (mid 1990's) - their documentation is typically pretty good. > > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > > enabling the DCE to send, when the input buffer has enough room to > > > receive data. The driver lowers the DTR line, preventing the DCE to > > > send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. There is a seperate field, fDtrControl, which you can set to DTR_CONTROL_HANDSHAKE, that appears to do exactly this. > This then leaves RTS/CTS (with RTS usually just stuck high) for > controlling flow into the DCE (peripheral). Again, lots of hardware > devices actually do this. > > I don't work on Windows, so can't be sure of what happens. But on > the MacOS X version of RXTX, CTS low stops transmission, exactly as > the "old" style would expect. Well, the Linux Serial HOWTO is where I got most of my information. And yes, I thought it was wrong as well, but it's apparently how things are implemented: Donno - but it works for me... Pete From tjarvi at qbang.org Tue Aug 29 19:11:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 29 Aug 2006 19:11:40 -0600 (MDT) Subject: [Rxtx] Porting to AIX In-Reply-To: <024901c6cba5$714c3560$341416ac@basis.com> References: <01f201c6cb9d$034d4f20$341416ac@basis.com> <024901c6cba5$714c3560$341416ac@basis.com> Message-ID: Hi Mark That should do it. You can put ifdef around the B57600 as we did with higher baudrates. You may want to use tip, minicom, kermit or some other serial application on the AIX to confirm that the lockfiles created are correct. Neat stuff. On Tue, 29 Aug 2006, Mark E. Schnedar wrote: > After looking through the build messages closer, > there is an error building SerialImp.c: > > gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o > /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type > > Looks like B57600 is not defined and there are no > definitions for DEVICEDIR and LOCKDIR on AIX. > > Can I just a the following to SerialImp.h? > > #if defined(__aix__) > # define DEVICEDIR "/dev/" > # define LOCKDIR "/var/lock" > # define LOCKFILEPREFIX "LCK.." > # define FHS > #endif /* __aix__ */ > > Mark Schnedar > > > ----- Original Message ----- > From: "Mark E. Schnedar" > To: > Sent: Tuesday, August 29, 2006 12:57 PM > Subject: [Rxtx] Porting to AIX > > > Hi, > > I'm new to rxtx. Currently my company has an interpreter product > that uses rxtx on Windows and Linux. I am trying to get rxtx to > build on AIX. I downloaded rxtx, ran ./configure and make. When > I run make I get the following error: > > libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object > make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 > > Do you have any suggestions on how to fix this problem? > > I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error > on both systems). I did have our system administrator load > automake, autoconf, make (gnu), and gcc. Here are the versions: > > AIX 4.3.3 AIX 5.3.0 > rxtx: 2.1-7r2 2.1-7r2 > autoconf: 2.53 2.59 > automake: 1.5 1.8.5 > make: 3.79.1 3.80 > gcc: (used native cc) 4.0.0 > > Any help would be appreciated. > > Mark Schnedar > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From guille at sms.nl Wed Aug 30 01:14:32 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 09:14:32 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <7.0.1.0.0.20060830091204.03652de0@sms.nl> At 16:49 29/08/2006, Bob Jacobsen wrote: >At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > > > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >is defined as: > > > > > Enables RTS flow-control handshaking. The driver raises the RTS line, > >> enabling the DCE to send, when the input buffer has enough room to > >> receive data. The driver lowers the RTS line, preventing the DCE to > >> send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. > > > >which clearly reflects the newer usage style - it keeps the RTS line high > >as long as there is space to _receive_ data. And takes it low when the > >receive/input buffer is getting full to stop the modem from sending it data. > > > >Does this jive with other peoples understanding of RTS usage? > >Can you point to any devices that actually implement this "new" understanding? Many (most) of the embedded devices we work with implement this kind of flow control. The host (DTE) raises RTS when it can receive data, and lowers it when the input buffers are full. In turn it watches the CTS line to see whether it can send data to the DCE. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From tjarvi at qbang.org Wed Aug 30 01:23:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 30 Aug 2006 01:23:46 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830091204.03652de0@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 16:49 29/08/2006, Bob Jacobsen wrote: >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: >>> >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >>> is defined as: >>> >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, >>>> enabling the DCE to send, when the input buffer has enough room to >>>> receive data. The driver lowers the RTS line, preventing the DCE to >>>> send, when the input buffer does not have enough room to receive >>>> data. If this value is used, it is an error for the application to adjust >>>> the line with EscapeCommFunction. >>> >>> which clearly reflects the newer usage style - it keeps the RTS line high >>> as long as there is space to _receive_ data. And takes it low when the >>> receive/input buffer is getting full to stop the modem from sending it data. >>> >>> Does this jive with other peoples understanding of RTS usage? >> >> Can you point to any devices that actually implement this "new" understanding? > > Many (most) of the embedded devices we work with implement this kind of flow > control. The host (DTE) raises RTS when it can receive data, and lowers it > when the input buffers are full. In turn it watches the CTS line to see > whether it can send data to the DCE. > I think this explains some hardware control 'bugs' I've seen. -- Trent Jarvi tjarvi at qbang.org From guille at sms.nl Wed Aug 30 02:01:35 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 10:01:35 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> At 09:23 30/08/2006, Trent Jarvi wrote: >On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > > > At 16:49 29/08/2006, Bob Jacobsen wrote: > >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >>> > >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >>> is defined as: > >>> > >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, > >>>> enabling the DCE to send, when the input buffer has enough room to > >>>> receive data. The driver lowers the RTS line, preventing the DCE to > >>>> send, when the input buffer does not have enough room to receive > >>>> data. If this value is used, it is an error for the > application to adjust > >>>> the line with EscapeCommFunction. > >>> > >>> which clearly reflects the newer usage style - it keeps the RTS line high > >>> as long as there is space to _receive_ data. And takes it low when the > >>> receive/input buffer is getting full to stop the modem from > sending it data. > >>> > >>> Does this jive with other peoples understanding of RTS usage? > >> > >> Can you point to any devices that actually implement this "new" > understanding? > > > > Many (most) of the embedded devices we work with implement this > kind of flow > > control. The host (DTE) raises RTS when it can receive data, and lowers it > > when the input buffers are full. In turn it watches the CTS line to see > > whether it can send data to the DCE. > > > >I think this explains some hardware control 'bugs' I've seen. I think the above is the most widespread use, but that may just mean it is the most widespread use in our specific segment (embedded systems). Some UART chips (e.g. from Exar) implement this kind of flow control directly in hardware. For example the Exar can be configured to suspend transmission when it sees CTS low, and resume transmission when it sees CTS high. This is also consistent with our experience. Maybe this helps clarify: http://www.tldp.org/HOWTO/Text-Terminal-HOWTO-10.html#ss10.7 Note the "Old RTS/CTS handshaking is different" section, which refers to "older terminals" whereas newer equipment would use RTS/CTS flow control (or equivalently DTR/DTS) as described above. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From Bob_Jacobsen at lbl.gov Wed Aug 30 07:55:31 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 30 Aug 2006 06:55:31 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> <7.0.1.0.0.20060830095557.0374ff28@sms.nl> Message-ID: I think we all agree that CTS inactive means "Send no more from DTE to DCE". The question is how to express the other direction, "Send no more from DCE to DTE". There are two parts to this question: What do various DTE-like devices do, and what do various DCE-like devices expect? Electrically, the lines that go that direction are DTR, DCD, and RTS (plus some special-purpose lines that are rarely present). All three devices I work most with respect the DTR lead. On the other hand, the FTDI chips for doing serial over USB provide either (RTS and CTS) or (DTR and DSR) as the two leads. What we're probably seeing is two different approaches, that have propagated separately. That's a problem. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From Pawan.Kharbanda at dot.state.co.us Wed Aug 30 09:07:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 30 Aug 2006 09:07:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0455E5E5@hqexchange3.dot.state.co.us> Trent, Sorry for not responding earlier to your email. I was actually waiting for the release of our software on the new Hardware. As I mentioned in my previous emails, RXTX crashes and locks up serial ports with the older version of Redhat (Linux 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:28:55 EDT 2005 i686 i686 i386 GNU/Linux), it might work ok if you are using one or 2 ports but anything more than that it has issues. I was using JDK1.5.0_06 and older firmwares of Digi boxes. Let me know if you need any more specific information of the older system. Thanks Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Thursday, August 10, 2006 5:40 AM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even > after 10000 operations (now I am trying 100,000 :). This is all with > the original RXTX 2.1.7 (final) api's without any of my fixes that I > have been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying > the RXTX saying the suggested kernel for Redhat Linux is > 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Aug 1 01:11:30 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 1 Aug 2006 09:11:30 +0200 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <34B6BC40-1405-4A13-8054-0FC6CE10466A@buechse.de> This is a problem with lock files. You should find it somewhere in the documentation... On 01.08.2006, at 03:53, Richard P. Welty wrote: > trying to get my app running on a Mac OS X powerbook, when > the following is executed as the first thing inside the > run method of a Thread: > > > try { > port = (SerialPort) selectedPort.open( > this.getClass().getName(), 2000); > } catch ( PortInUseException ex){ > ex.printStackTrace(); > return; > } > > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java: > 354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run > (ScaleWatcher.java:143) > > i've not seen any documentation suggesting that rxtx would be finicky > about application names... > > thanks for any suggestions, > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From rwelty at suespammers.org Tue Aug 1 05:37:53 2006 From: rwelty at suespammers.org (Richard P. Welty) Date: Tue, 01 Aug 2006 07:37:53 -0400 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <44CF3D11.9060108@suespammers.org> Richard P. Welty wrote: > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) Aha, a confusing error message. it's really a lock file problem; the code is trying to fill in the application name but when it's getting "Unknown Application" and filling that in... richard From ajmas at sympatico.ca Tue Aug 1 13:10:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:10:59 -0400 Subject: [Rxtx] Application Name? Message-ID: <20060801191059.HFCD18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> You need the source code in CVS. The forth coming 2.18 will correct this, but currently the only place to find the correction is in CVS. No idea when 2.18 is due. > > From: "Richard P. Welty" > Date: 2006/08/01 Tue AM 07:37:53 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Application Name? > > Richard P. Welty wrote: > > > i get the following: > > > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > at > > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) > > Aha, a confusing error message. it's really a lock file problem; the > code is trying to fill in the application name but when it's getting > "Unknown Application" and filling that in... > > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:15:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:15:57 -0400 Subject: [Rxtx] Do interfaces break backwards compatibility? Message-ID: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> It is the class that decides to add serializable that needs to worry about those issues. For the most part serial ports and their connection states should be considered as transient, since there is no guarantee they will still be present or that their state will be, especially in a USB world. What you can store is the port settings and port id and then simply test for port availability next time. Nothing else should be assumed. > > From: Gregg Wonderly > Date: 2006/07/31 Mon PM 01:21:19 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Do interfaces break backwards compatibility? > > Doug Berkland wrote: > > As far as I can tell, nothing in either RXTX or Sun's JavaCOMM > > implements Serializable. Therefore, there are no worries from that > > either. (I can't think of a reason anything in JavaCOMM should > > implement Serializable either.) > > Any interface in javax.comm can become implemented by a serializable object. > Thus, if someone wants to provide remote access to a serial port, then they > might (and I think this is not wise) choose to subclass and add Serializable to > the interface list. > > It's that kind of Serialization compatibility that I'm talking about. > > Gregg Wonderly > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:18:11 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:18:11 -0400 Subject: [Rxtx] precompiled for Intel Mac? Message-ID: <20060801191811.FLJY27612.tomts16-srv.bellnexxia.net@smtp1.sympatico.ca> > > From: Joachim Buechse > There will be. However not before we have figured out some remaining issues. What issues are remaining? Andre From Pawan.Kharbanda at dot.state.co.us Tue Aug 1 16:55:08 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 1 Aug 2006 16:55:08 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Hi, I am also experiencing occasional JVM crash thru the native code. I am attaching the log from the crash. Any ideas what might be causing it???? Regards Pawan Kharbanda # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # --------------- T H R E A D --------------- Current thread (0x8d000480): JavaThread "Thread-119" [_thread_in_native, id=111 51] siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba Registers: EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 Top of Stack: (sp=0x8d3482b8) 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 0x8d348308: 00000000 00000002 00000000 00000000 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 Instructions: (pc=0xb75e39b2) 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~StubRoutines::call_stub V [libjvm.so+0x2607ec] V [libjvm.so+0x423828] V [libjvm.so+0x260045] V [libjvm.so+0x2600de] V [libjvm.so+0x2d7745] V [libjvm.so+0x4c2ba3] V [libjvm.so+0x424338] C [libpthread.so.0+0x4dd8] 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 ) =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, id=11026] 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, id=11023] From tjarvi at qbang.org Tue Aug 1 18:46:21 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 1 Aug 2006 18:46:21 -0600 (MDT) Subject: [Rxtx] JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Message-ID: On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) > C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] > 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, > id=11034] > 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, > id=11033] > 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, > id=11032] > 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, > id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] > 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, > id=11028] > 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, > id=11027] > 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, > id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] > 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- Index: termios.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/termios.c,v retrieving revision 1.9.2.57 diff -u -r1.9.2.57 termios.c --- termios.c 4 Jun 2006 02:50:01 -0000 1.9.2.57 +++ termios.c 11 Jun 2006 21:51:10 -0000 @@ -1048,26 +1048,29 @@ if ( !first_tl ) { port->prev = NULL; + port->next = NULL; first_tl = port; } else { - while ( index->next ) + while ( ( index->fd < port->fd ) && index->next ) index = index->next; - if ( port == first_tl ) + if ( index->fd > port->fd ) { - port->prev = NULL; - port->next = first_tl; - first_tl->prev = port; - first_tl = port; + /* inserting previously closed fd */ + port->prev = index->prev; + port->next=index + index->prev->next = port; + index->prev = port; } else { + /* adding to end of list */ port->prev = index; + port->next = NULL; index->next = port; } } - port->next = NULL; LEAVE( "add_port" ); return port; From gergg at cox.net Tue Aug 1 23:25:19 2006 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 02 Aug 2006 00:25:19 -0500 Subject: [Rxtx] Do interfaces break backwards compatibility? In-Reply-To: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <44D0373F.7020600@cox.net> Andre-John Mas wrote: > It is the class that decides to add serializable that needs to worry about those issues. > For the most part serial ports and their connection states should be considered as > transient, since there is no guarantee they will still be present or that their state > will be, especially in a USB world. Right, but when you provide an interface as the standard, that opens the doors for a lot more interpretation and variation. An abstract class can indicate a lot more about what the expected implementation is. Gregg Wonderly From lyon at docjava.com Wed Aug 2 06:02:15 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:02:15 -0400 Subject: [Rxtx] jsr spec and license issues Message-ID: Hi All, Trent and I have been discussing the license issues of the JSR spec and code that we develop, as a community. Here is what we have come up with: >During the development, the new JSR spec that we derive >will be >covered under the LGPL license. Since it is >just interfaces, any contributions will come back to me, for inclusion >into the specification. The goal is to provide a detailed set of >interfaces that >document the present state of our reference model. I am using >the RXTX as the reference model. If there is something missing from >the reference model, or if the reference model has something that should >not be there, we will need to discuss it. > >After Sun accepts the JSR, I, as the copyright holder, can issue >a version with a JSR compatible license. > >The goal is to migrate the interfaces into javax.comm. Does this sound like a reasonable plan to everyone? Thanks! - Doug From joachim at buechse.de Wed Aug 2 06:21:03 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 14:21:03 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Good day, quite frankly I think that this is a very bad idea. This specification (!) should be in the public domain and nowhere else. Defining a spec under the (L)GPL makes absolutely no sense. After all it is a specification not an implementation. There is no or only trivial code attached to it. So while nothing can be gained by putting it under the LGPL, a lot can be lost - for example the contribution of companies that do not like to open source their implementations. Furthermore you are plain wrong assuming you will be the copyright holder to additions made by other people. Best regards, Joachim On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for >> inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that >> should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Aug 2 06:39:28 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:39:28 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Hi All, I don't know anything about licensing issues. The below sounds reasonable. If we make this public domain, will that be compatible with Sun's JSR? Thanks! - DL P.S. I really don't care what we do, as long as there is some sort of collective agreement. >Good day, > >quite frankly I think that this is a very bad idea. This specification >(!) should be in the public domain and nowhere else. > >Defining a spec under the (L)GPL makes absolutely no sense. After all? >it is a specification not an implementation. There is no or only? >trivial code attached to it. So while nothing can be gained by? >putting it under the LGPL, a lot can be lost - for example the? >contribution of companies that do not like to open source their? >implementations. > >Furthermore you are plain wrong assuming you will be the copyright? >holder to additions made by other people. > >Best regards, >Joachim > > >On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for? >>> inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that? >>> should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> >> Does this sound like a reasonable plan to everyone? >> >> Thanks! >> - Doug >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 07:50:09 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 10:50:09 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D0AD91.4080103@gmail.com> Hi, I have been searching the web and here it is: http://jcp.org/en/resources/license_reference Here there is a list of the licenses that are compatible with the JCP for JSR submitting. I think that Apache, CDDL, CPL and OSL are the one that are compatible with our needs. But I think that Apache is the best for us, Doug why do not make a votation? Regards, Manuel > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. > >> Good day, >> >> quite frankly I think that this is a very bad idea. This specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From lyon at docjava.com Wed Aug 2 08:10:55 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 10:10:55 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D0AD91.4080103@gmail.com> References: <44D0AD91.4080103@gmail.com> Message-ID: Hi All, I have no objection to an Apache license for the JSR interfaces that we produce. Would anyone care to comment? Joachim: Does this address your public domain concerns? How does this impact the reference implementation (i.e. RXTX)? Thanks! - DL >Hi, >I have been searching the web and here it is: >http://jcp.org/en/resources/license_reference >Here there is a list of the licenses that are compatible with the JCP >for JSR submitting. >I think that Apache, CDDL, CPL and OSL are the one that are compatible >with our needs. >But I think that Apache is the best for us, Doug why do not make a votation? >Regards, >Manuel > >> Hi All, >> I don't know anything about licensing issues. >> The below sounds reasonable. If we make this public domain, >> will that be compatible with Sun's JSR? >> Thanks! >> - DL >> P.S. I really don't care what we do, as long as there is >> some sort of collective agreement. >>?? >>> Good day, >>> >>> quite frankly I think that this is a very bad idea. This specification >>> (!) should be in the public domain and nowhere else. >>> >>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>> it is a specification not an implementation. There is no or only >>> trivial code attached to it. So while nothing can be gained by >>> putting it under the LGPL, a lot can be lost - for example the >>> contribution of companies that do not like to open source their >>> implementations. >>> >>> Furthermore you are plain wrong assuming you will be the copyright >>> holder to additions made by other people. >>> >>> Best regards, > >> Joachim >>> >>> >>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>> >>>???? >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>?????? >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for >>>>> inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that >>>>> should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>>>???????? >>>> Does this sound like a reasonable plan to everyone? >>>> >>>> Thanks! >>>> - Doug >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>?????? >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>???? >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 08:20:29 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 11:20:29 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D0AD91.4080103@gmail.com> Message-ID: <44D0B4AD.2050106@gmail.com> Doug; > How does this impact the reference implementation (i.e. RXTX)? > Fuck I have not thinked about that, we would need that everyone who had colaborated with RXTX and have putted code on it to agree a license chaging. Or start from sractch. I don't know if Trent have the right to do that. Regards, Manuel > > >> Hi, >> I have been searching the web and here it is: >> http://jcp.org/en/resources/license_reference >> Here there is a list of the licenses that are compatible with the JCP >> for JSR submitting. >> I think that Apache, CDDL, CPL and OSL are the one that are compatible >> with our needs. >> But I think that Apache is the best for us, Doug why do not make a votation? >> Regards, >> Manuel >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> >> >> Joachim >> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 08:21:15 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 16:21:15 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Putting something in the public domain means, that it can be used by anyone for whatever (s)he thinks is appropriate. The authors define no restriction regarding it's use. That's how any specification should be. Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From berkland at spamcop.net Wed Aug 2 08:50:50 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 10:50:50 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> You may want to consider making it available under two separate licenses. 1 - LGPL as it is today The LGPL can be used by anyone wanting to extend the current functionality, as long as they provide code for anything they change. 2 - Sun Community Source License (SCSL) http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf The SCSL will allow anyone who wants to do a closed source implementation from the ground up to do so, if I'm reading it correctly, as long as they don't use any of the code from the Reference Implementation. This will satisfy any company that wants to have a closed-source implementation, but not help them out very much. On 8/2/06, Joachim Buechse wrote: > Putting something in the public domain means, that it can be used by > anyone for whatever (s)he thinks is appropriate. The authors define > no restriction regarding it's use. That's how any specification > should be. > > Best regards, > Joachim > > > On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > > > Hi All, > > I don't know anything about licensing issues. > > The below sounds reasonable. If we make this public domain, > > will that be compatible with Sun's JSR? > > Thanks! > > - DL > > P.S. I really don't care what we do, as long as there is > > some sort of collective agreement. > >> Good day, > >> > >> quite frankly I think that this is a very bad idea. This > >> specification > >> (!) should be in the public domain and nowhere else. > >> > >> Defining a spec under the (L)GPL makes absolutely no sense. After all > >> it is a specification not an implementation. There is no or only > >> trivial code attached to it. So while nothing can be gained by > >> putting it under the LGPL, a lot can be lost - for example the > >> contribution of companies that do not like to open source their > >> implementations. > >> > >> Furthermore you are plain wrong assuming you will be the copyright > >> holder to additions made by other people. > >> > >> Best regards, > >> Joachim > >> > >> > >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> > >>> Hi All, > >>> Trent and I have been discussing the license issues of the > >>> JSR spec and code that we develop, as a community. > >>> Here is what we have come up with: > >>> > >>>> During the development, the new JSR spec that we derive > >>>> will be > >>>> covered under the LGPL license. Since it is > >>>> just interfaces, any contributions will come back to me, for > >>>> inclusion > >>>> into the specification. The goal is to provide a detailed set of > >>>> interfaces that > >>>> document the present state of our reference model. I am using > >>>> the RXTX as the reference model. If there is something missing > >>>> from > >>>> the reference model, or if the reference model has something that > >>>> should > >>>> not be there, we will need to discuss it. > >>>> > >>>> After Sun accepts the JSR, I, as the copyright holder, can issue > >>>> a version with a JSR compatible license. > >>>> > >>>> The goal is to migrate the interfaces into javax.comm. > >>> > >>> Does this sound like a reasonable plan to everyone? > >>> > >>> Thanks! > >>> - Doug > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From naranjo.manuel at gmail.com Wed Aug 2 09:03:02 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 12:03:02 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> References: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> Message-ID: <44D0BEA6.2040408@gmail.com> Or even better, you can use Apache v2, which allows both Open Source and Closed Source forms ;-) > You may want to consider making it available under two separate licenses. > > 1 - LGPL as it is today > > The LGPL can be used by anyone wanting to extend the current > functionality, as long as they provide code for anything they change. > > 2 - Sun Community Source License (SCSL) > http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf > > The SCSL will allow anyone who wants to do a closed source > implementation from the ground up to do so, if I'm reading it > correctly, as long as they don't use any of the code from the > Reference Implementation. This will satisfy any company that wants to > have a closed-source implementation, but not help them out very much. > > On 8/2/06, Joachim Buechse wrote: > >> Putting something in the public domain means, that it can be used by >> anyone for whatever (s)he thinks is appropriate. The authors define >> no restriction regarding it's use. That's how any specification >> should be. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This >>>> specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> Joachim >>>> >>>> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing >>>>>> from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 09:46:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 17:46:25 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> I assume that javax.comm/RXTX is to be redefined using Interfaces. In this case we should separate 2 things: 1) The specification and it's incarnation in the form of java classes defining the interfaces. 2) The actual implementation of the functionality. It is possible that 1) may contain some trivial code in abstract or none abstract classes (ie PortFactory, PortRegistry, etc). Doug's original question was regarding 1) - unless I misunderstood. I personally think that 1) should be in the public domain. It should not be covered by any restrictions what-so-ever. Let it be free as in "totally free in any respect". I do not care under which license 2) is released. Why? Because it is in my very interest that all/almost all vendors include implementations with their distributions. Which will only happen if they do not need to respect open source licenses. (javax.comm is not nearly as important as the Apache web server or MySql, so nobody will take licensing risks). Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ssbello at gmail.com Wed Aug 2 10:28:30 2006 From: ssbello at gmail.com (Simone) Date: Wed, 2 Aug 2006 18:28:30 +0200 Subject: [Rxtx] pocketPC 2003 Message-ID: <39ed505d0608020928k6ceb01aen470c2e6a78c5a6b0@mail.gmail.com> Does anyone know if the Rxtx works on PocketPc 2003? If yes, could you, please, give me some suggestion. Thanks, Simone Bell? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/72e0fb87/attachment-0328.html From berkland at spamcop.net Wed Aug 2 13:00:10 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 15:00:10 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> Message-ID: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> How about these for the "Business Terms" of the new JSR: > The specification will be released in accordance with standard terms > as specified by the JCP process. > > The reference implementation (RI) will be delivered in binary form > free of charge from http://rxtx.org. Licensing details are expected to > be under the Binary Code License (BCL). > > The source for the reference implementation is expected to be > delivered via the Limited GNU Public License (LGPL) and available free > of charge. > > The TCK will be made available free of charge to all J2SE and J2EE licensees. > > The TCK will be offered for license at no charge, without support or > any trademark license rights, to qualified not-for-profit entities > (including not-for-profit) academic institutions) and qualified > individuals engaged in efforts to create compatible implementations of > the Specification. From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 13:13:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 13:13:33 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E495@hqexchange3.dot.state.co.us> Trent, I didn't exactly get it. Again I am not a C guy, maybe its very simple for you but I don't see any checks for FD (as written in the patch for termios.c) in the initialise_event_info_struct, I see some checks in the interruptEventLoop call. Second as you explained I open three("/dev/cuf01","/dev/cuf01","/dev/cuf01") ports, I close the 2nd ("/dev/cuf02", the other 2 are still open) , I never try to open the third ("/dev/cuf03") port again if it is already open. Are you planning to have a fix for this in the next release 2.1.8. Its very important for me to have a fix for this, its causing some major headaches for our project. I know you have your regular job too, I will appreciate any help. Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, August 01, 2006 6:46 PM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java > VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic > frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) C [librxtxSerial.so+0x69b2] > initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] > Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" > [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: > /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread > "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 > JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon > [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" > daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread > "AdapterThread" daemon [_thread_blocked, id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, > id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Wed Aug 2 13:14:20 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 16:14:20 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> Message-ID: <44D0F98C.1070600@gmail.com> +1 Agree > How about these for the "Business Terms" of the new JSR: > > >> The specification will be released in accordance with standard terms >> as specified by the JCP process. >> >> The reference implementation (RI) will be delivered in binary form >> free of charge from http://rxtx.org. Licensing details are expected to >> be under the Binary Code License (BCL). >> >> The source for the reference implementation is expected to be >> delivered via the Limited GNU Public License (LGPL) and available free >> of charge. >> >> The TCK will be made available free of charge to all J2SE and J2EE licensees. >> >> The TCK will be offered for license at no charge, without support or >> any trademark license rights, to qualified not-for-profit entities >> (including not-for-profit) academic institutions) and qualified >> individuals engaged in efforts to create compatible implementations of >> the Specification. >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From savagobr at yahoo.com Wed Aug 2 13:40:42 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:40:42 -0700 (PDT) Subject: [Rxtx] jsr spec and license issues Message-ID: <20060802194042.83599.qmail@web53807.mail.yahoo.com> Friends Apache seems ok... if I get it right, does it *almost* equals to BSD? Regarding public domain: I think that the good people that spent so much time on this library will like to keep some rights over its own work, don't you think? Best regards Savago --------------------------------- Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/79abdfd5/attachment-0328.html From savagobr at yahoo.com Wed Aug 2 13:58:04 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:58:04 -0700 (PDT) Subject: [Rxtx] JVM Crashing Message-ID: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago --------------------------------- Groups are talking. We´re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/47d561ae/attachment-0328.html From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 14:09:18 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 14:09:18 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E4AD@hqexchange3.dot.state.co.us> Thank You :) ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adenilson Cavalcanti Sent: Wednesday, August 02, 2006 1:58 PM To: rxtx at qbang.org Subject: Re: [Rxtx] JVM Crashing Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago ________________________________ Groups are talking. We?re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/b4eb22cf/attachment-0328.html From tjarvi at qbang.org Wed Aug 2 20:23:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 20:23:42 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > Hi Doug As mentioned off the list, the important point in my mind is that everyone is on the same base more than what license is decided upon. These things are just best addressed early so there isn't confusion. The Apache license is fairly standard in the Open Source community vs several of the relatively unknown [and obviously redundat even by their descriptions] offerings by Sun. Perhaps one option here that would kill a few birds with one stone is to dual license the interface as Apache and LGPL. This would allow everyone to use the interfaces without needing to do wastefull work for internal license requirements. Projects could choose between the two the license that best suits their needs. If there is a software shop doing Java that isn't familiar with the Apache license, they must be doing some strange Java. I do think it is foolhearty to blindly travel in public domain but nobody is trying to undermine the spec files. The intent is to use the work for a JSR submission that everyone can use without confusion later on down the line. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 21:01:16 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 20:01:16 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D166FC.9090005@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> Does this sound like a reasonable plan to everyone? >> > > Hi Doug > > As mentioned off the list, the important point in my mind is that everyone > is on the same base more than what license is decided upon. These things > are just best addressed early so there isn't confusion. > > The Apache license is fairly standard in the Open Source community vs > several of the relatively unknown [and obviously redundat even by > their descriptions] offerings by Sun. The JCP is a reasonable process for what the RxTx project intends to achieve by evolving the API. There isn't much to lose by going the JSR route. The community will benefit from a fair API like so many other that have undergone the process. Sun isn't going to own the API or manipulate it into anything weird anymore than anyone else is. I think your fears are rather vague and unfounded. Which isn't to say that I am a well-informed representative of the JCP, I've only sat through one JSR process and we ended up with javax.usb, and IBM got what it wanted out of the deal and the community got a very nice standard. Paul > > Perhaps one option here that would kill a few birds with one stone is to > dual license the interface as Apache and LGPL. This would allow everyone > to use the interfaces without needing to do wastefull work for internal > license requirements. Projects could choose between the two the license > that best suits their needs. If there is a software shop doing Java that > isn't familiar with the Apache license, they must be doing some strange > Java. > > I do think it is foolhearty to blindly travel in public domain but nobody > is trying to undermine the spec files. The intent is to use the work for > a JSR submission that everyone can use without confusion later on down the > line. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Aug 2 22:10:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 22:10:48 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D166FC.9090005@sun.com> References: <44D166FC.9090005@sun.com> Message-ID: On Wed, 2 Aug 2006, Paul Klissner wrote: > Trent Jarvi wrote: >> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> Does this sound like a reasonable plan to everyone? >>> >> >> Hi Doug >> >> As mentioned off the list, the important point in my mind is that everyone >> is on the same base more than what license is decided upon. These things >> are just best addressed early so there isn't confusion. >> >> The Apache license is fairly standard in the Open Source community vs >> several of the relatively unknown [and obviously redundat even by >> their descriptions] offerings by Sun. > > The JCP is a reasonable process for what the RxTx project intends > to achieve by evolving the API. > > There isn't much to lose by going the JSR route. The community will > benefit from a fair API like so many other that have undergone > the process. Sun isn't going to own the API or manipulate it > into anything weird anymore than anyone else is. I think your > fears are rather vague and unfounded. > > Which isn't to say that I am a well-informed representative > of the JCP, I've only sat through one JSR process and we ended > up with javax.usb, and IBM got what it wanted out of the deal > and the community got a very nice standard. > Hi Paul The JCP should work fine. As our intentions are in line, licensing so that everyone can use the interface code should not be a problem. Note that the current default right now is that the interfaces are copyrighted and no license for distribution is included. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 22:33:51 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 21:33:51 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D166FC.9090005@sun.com> Message-ID: <44D17CAF.1090802@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Paul Klissner wrote: > >> Trent Jarvi wrote: >>> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>> Does this sound like a reasonable plan to everyone? >>>> >>> Hi Doug >>> >>> As mentioned off the list, the important point in my mind is that everyone >>> is on the same base more than what license is decided upon. These things >>> are just best addressed early so there isn't confusion. >>> >>> The Apache license is fairly standard in the Open Source community vs >>> several of the relatively unknown [and obviously redundat even by >>> their descriptions] offerings by Sun. >> The JCP is a reasonable process for what the RxTx project intends >> to achieve by evolving the API. >> >> There isn't much to lose by going the JSR route. The community will >> benefit from a fair API like so many other that have undergone >> the process. Sun isn't going to own the API or manipulate it >> into anything weird anymore than anyone else is. I think your >> fears are rather vague and unfounded. >> >> Which isn't to say that I am a well-informed representative >> of the JCP, I've only sat through one JSR process and we ended >> up with javax.usb, and IBM got what it wanted out of the deal >> and the community got a very nice standard. >> > > Hi Paul > > The JCP should work fine. As our intentions are in line, licensing so > that everyone can use the interface code should not be a problem. Sorry, looks like my concerns were unfounded. I haven't been following the threads closely this week, as work got busy with an escalated issue and new project. Sorry about that. > > Note that the current default right now is that the interfaces are > copyrighted and no license for distribution is included. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Aug 3 03:45:56 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 03 Aug 2006 05:45:56 -0400 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: Hi All, I have been waiting a day for things to cool down. Licensing appears to be a hot-button topic. I have no objection to dual license the interfaces as both Apache and LGPL. Some thoughts: Goal: developers wish to work together on a common piece of code that the team needs. It makes sense that the code base they work on should be Apache-licensed. That makes it possible for the team to use and develop common code, even if the end result is LGPL'd as a whole. If we combine licenses, we must follow the terms of both licenses when distributing the combined work. Thus, the dual license contains the super set of terms in the licenses of Apached and LGPL. This should address concern about using Apache-licensed code within LGPL projects due to the FSF's claim that they are incompatible. Here is a draft statement for RXSL: The RXTX Specification Library (RXSL) uses a dual license strategy for the source code. These licenses are the GNU Lesser General Public License (LGPL) and the Apache License. I strongly encourage users to use the LGPL license and participate fully in the free software community. Dual licensing of the RXSL source code provides open and free access to the technology both for the GPL community and for other developers or companies that cannot use the GPL. Dual license is common practice in open source projects like OpenOffice, Perl and Mozilla. Through the combined use of LGPL and Apache license, developers will have a high degree of freedom yet compatibility and interoperability will be preserved. You can freely modify, extend, and improve the RXSL source code. The only question is whether or not you must provide the source code and contribute modifications to the community. The GNU and Apache licenses allow different ranges of flexibility in this regard, but in the end, regardless of the license used, any and all incompatible changes must be published openly. Note that there is the RXTX Reference Model that uses the org.rxtx package, which itself is protected by the LGPL. This may be part of the distribution, however, it can not be redistributed using a different license. Is everybody OK with this? Thanks Trent, great idea! - Doug From joachim at buechse.de Thu Aug 3 04:15:44 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 3 Aug 2006 12:15:44 +0200 Subject: [Rxtx] JVM Crashing In-Reply-To: <20060802195804.70935.qmail@web53812.mail.yahoo.com> References: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Message-ID: <6ABA2AB2-CECE-4C4B-A7D6-0CDF8B9C95A8@buechse.de> I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of > rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jvermillard at archean.fr Thu Aug 3 04:26:48 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Thu, 03 Aug 2006 12:26:48 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <1154600808.16732.18.camel@localhost.localdomain> Hi, I'm a developer of the Apache MINA framework. It's a network application framework which helps users develop high performance and high scalability network applications easily. http://directory.apache.org/subprojects/mina/index.html . I would like to integrate serial connection to the framework (actualy supporting TCP, UDP (broadcast) and in VM communications), but LGPL is an issue for me. An Apache License would be pretty usefull for me and integrate rxtx functionnalities easly. Thanks, Julien Le jeudi 03 ao?t 2006 ? 05:45 -0400, Dr. Douglas Lyon a ?crit : > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/755cca7f/smime-0328.bin From pascal at quies.net Thu Aug 3 04:32:35 2006 From: pascal at quies.net (Pascal S. de Kloe) Date: Thu, 3 Aug 2006 12:32:35 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <200608031232.35838.pascal@quies.net> Hi Doug, The Apache license is unnessesary complex. It puts all kinds of limitations on the usage. Is there a particular reason why people chose this or was it just the familiar name? I agree with Joachim (again) that the specification and the interfaces should be public domain. However, if we realy need a license then have a look at the X11 license because that one is compatible with the GPL and suits our needs: http://www.fsf.org/licensing/licenses/index_html http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3 ---- start: implementation Copyright (C) 2006 Sun Microsystems, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Sun Microsystems shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Sun Microsystems. Java is a trademark of Sun Microsystems, Inc. ---- end Op donderdag 3 augustus 2006 11:45, schreef Dr. Douglas Lyon: > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Aug 3 05:17:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 05:17:07 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154600808.16732.18.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: On Thu, 3 Aug 2006, Julien Vermillard wrote: > Hi, > > I'm a developer of the Apache MINA framework. It's a network application > framework which helps users develop high performance and high > scalability network applications easily. > http://directory.apache.org/subprojects/mina/index.html . I would like > to integrate serial connection to the framework (actualy supporting TCP, > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > An Apache License would be pretty usefull for me and integrate rxtx > functionnalities easly. > > Thanks, > > Julien > Hi Julien The rxtx license itself will not change. This is just the interface. You would be free to implement an rxtx replacement if the LGPL low level code is a problem for you. These licensing details would make it possible to take the interface code instead of needing to recode them for a new project. You are probably confusing the license problems with the GPL not the LGPL though you can share links to concerns off the list if you would like to go through them. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 11:59:48 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 11:59:48 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E516@hqexchange3.dot.state.co.us> Joachim, I think my both problems (JVM crashing & Port Locking) are being caused by the corruption of "Event Info Struct / EIS" I have noticed with in EIS my "FD" and "Closing" value being overwritten. The problem is definitely in SerialImp.c file. I am trying to understand what the code does and try to pin point the problem by trying few other options. I will keep everybody posted. Regards Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Joachim Buechse Sent: Thursday, August 03, 2006 4:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Thu Aug 3 13:50:07 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 14:50:07 -0500 Subject: [Rxtx] slow startup Message-ID: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete From brian at mbari.org Thu Aug 3 14:05:57 2006 From: brian at mbari.org (Brian Schlining) Date: Thu, 3 Aug 2006 13:05:57 -0700 Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> References: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Message-ID: Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B > Greetings, > I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/ > qbang.org). > > In testing things out, I ran the list ports example from the Wiki, > and it seems to take quite a while for the library to initialize? > Like on the order of 30+ seconds or so after startup (and the RXTX > banner prints), and before the application starts running. > > Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then > I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ > terminal server) and I'm wondering if they are not responding properly > and this is causing the slow startup? Or is this a known problem of > some kind, or maybe something on my system is screwy? > > Thanks, > Pete > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/6123f730/attachment-0327.html From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 14:13:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 14:13:47 -0600 Subject: [Rxtx] slow startup Message-ID: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Hi Pete, RXTX does open and close the ports in Windows. Try downloading utility like PORTMON(only for windows) and you can see that whenever you load RXTX it tries to register all the available COMM ports in the system. It is a little slow if you have virtual ports, we use digi as a terminal server, Its going to get worst of you have comm ports in 100's Thanks Pawan Kharbanda ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Brian Schlining Sent: Thursday, August 03, 2006 2:06 PM To: RXTX Developers and Users Subject: Re: [Rxtx] slow startup Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/94fd105d/attachment-0327.html From pete.flugstad at gmail.com Thu Aug 3 14:32:04 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 15:32:04 -0500 Subject: [Rxtx] slow startup In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Message-ID: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> On 8/3/06, Kharbanda, Pawan wrote: > RXTX does open and close the ports in Windows. Try downloading utility > like PORTMON(only for windows) and you can see that whenever you load RXTX > it tries to register all the available COMM ports in the system. It is a > little slow if you have virtual ports, we use digi as a terminal server, Its > going to get worst of you have comm ports in 100's Okay, I can understand that, but from the PORTMON output, it looks like it's opening each port TWICE: 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS ... 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS Also, assuming instead of listing the ports I wanted to just open one, I'm still seeing the 30 second delay, so it's scanning at startup regardless of what the Java code is going to do. Probably necessary, but annoying. I know, I know, contribute patches... :-) Thanks, Pete From tjarvi at qbang.org Thu Aug 3 15:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 15:04:42 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: On Thu, 3 Aug 2006, Pete Flugstad wrote: > On 8/3/06, Kharbanda, Pawan wrote: >> RXTX does open and close the ports in Windows. Try downloading utility >> like PORTMON(only for windows) and you can see that whenever you load RXTX >> it tries to register all the available COMM ports in the system. It is a >> little slow if you have virtual ports, we use digi as a terminal server, Its >> going to get worst of you have comm ports in 100's > > Okay, I can understand that, but from the PORTMON output, it looks > like it's opening each port TWICE: > > 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > ... > 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > > Also, assuming instead of listing the ports I wanted to just open one, > I'm still seeing the 30 second delay, so it's scanning at startup > regardless of what the Java code is going to do. Probably necessary, > but annoying. > > I know, I know, contribute patches... :-) > I think this problem is in RXTXCommDriver.java. I've just not tracked it down but it should be in the java code, not the native code so easy enough to track down. -- Trent Jarvi tjarvi at qbang.org From jvermillard at archean.fr Fri Aug 4 03:43:28 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:43:28 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: <1154684608.6181.4.camel@localhost.localdomain> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > Hi, > > > > I'm a developer of the Apache MINA framework. It's a network application > > framework which helps users develop high performance and high > > scalability network applications easily. > > http://directory.apache.org/subprojects/mina/index.html . I would like > > to integrate serial connection to the framework (actualy supporting TCP, > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > An Apache License would be pretty usefull for me and integrate rxtx > > functionnalities easly. > > > > Thanks, > > > > Julien > > > > Hi Julien > > The rxtx license itself will not change. This is just the interface. > You would be free to implement an rxtx replacement if the LGPL low level > code is a problem for you. These licensing details would make it possible > to take the interface code instead of needing to recode them for a new > project. > > You are probably confusing the license problems with the GPL not the LGPL > though you can share links to concerns off the list if you would like to > go through them. > > -- > Trent Jarvi > tjarvi at qbang.org Hi, I'm not a license expert but some guys at ASF said me you can't call LGPLed libs from java. some peoples interprete that as static linking and not dynamic linking (no idea why). So ASF/BSD licensied interface willl solve the license probleme. If you got some questions about the ASL and the way you can dual license LGPL/ASL you can ask it on legal-discuss at apache.org Julien -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/8d46c0aa/smime-0327.bin From jvermillard at archean.fr Fri Aug 4 03:51:30 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:51:30 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <1154685091.6181.6.camel@localhost.localdomain> erm from java -> from ASLed Java code Le vendredi 04 ao?t 2006 ? 11:43 +0200, Julien Vermillard a ?crit : > Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > Hi, > > I'm not a license expert but some guys at ASF said me you can't call > LGPLed libs from java. some peoples interprete that as static linking > and not dynamic linking (no idea why). So ASF/BSD licensied interface > willl solve the license probleme. > > If you got some questions about the ASL and the way you can dual license > LGPL/ASL you can ask it on legal-discuss at apache.org > > Julien > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dcc29d70/smime-0327.bin From guille at sms.nl Fri Aug 4 04:35:24 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Fri, 04 Aug 2006 12:35:24 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <7.0.1.0.0.20060804123322.036dc748@sms.nl> At 11:43 04/08/2006, Julien Vermillard wrote: >Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > >Hi, > >I'm not a license expert but some guys at ASF said me you can't call >LGPLed libs from java. some peoples interprete that as static linking >and not dynamic linking (no idea why). This interpretation is wrong. See the official position of the FSF regarding the LGPL and Java: http://www.gnu.org/licenses/lgpl-java.html http://www.fsf.org/licensing/licenses/lgpl-java.html Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From hambyiii at hotmail.com Fri Aug 4 04:52:47 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 10:52:47 +0000 Subject: [Rxtx] error getting InputStream Message-ID: Hi, I have written a program in Java for Windows xp using RXTX (which is why I am using this mailing list :). However, I am getting a problem. I am connecting to a serial port, like so: private CommPortIdentifier portID; private boolean openPort(String selectedPort) { boolean portFound = false; Enumeration portList; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portID.getName().equals(selectedPort)) { portFound = true; break; } } } return portFound; } and then I try and get the serial port input stream (leaving out the try and catch for the sake of space): SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); InputStream inputStream = serialPort.getInputStream(); but on the getInputStream() I get the following error message: Bad file descriptor in nativeavailable I cannot figure out where it is going wrong...anyone any ideas. A quick answer would be wonderful, as I am kinda under the hammer to get this fixed quickly Thanks in Advance Keith From tjarvi at qbang.org Fri Aug 4 05:13:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 05:13:19 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <7.0.1.0.0.20060804123322.036dc748@sms.nl> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> <7.0.1.0.0.20060804123322.036dc748@sms.nl> Message-ID: On Fri, 4 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 11:43 04/08/2006, Julien Vermillard wrote: >> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : >>> On Thu, 3 Aug 2006, Julien Vermillard wrote: >>> >>>> Hi, >>>> >>>> I'm a developer of the Apache MINA framework. It's a network application >>>> framework which helps users develop high performance and high >>>> scalability network applications easily. >>>> http://directory.apache.org/subprojects/mina/index.html . I would like >>>> to integrate serial connection to the framework (actualy supporting TCP, >>>> UDP (broadcast) and in VM communications), but LGPL is an issue for me. >>>> >>>> An Apache License would be pretty usefull for me and integrate rxtx >>>> functionnalities easly. >>>> >>>> Thanks, >>>> >>>> Julien >>>> >>> >>> Hi Julien >>> >>> The rxtx license itself will not change. This is just the interface. >>> You would be free to implement an rxtx replacement if the LGPL low level >>> code is a problem for you. These licensing details would make it possible >>> to take the interface code instead of needing to recode them for a new >>> project. >>> >>> You are probably confusing the license problems with the GPL not the LGPL >>> though you can share links to concerns off the list if you would like to >>> go through them. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >> >> Hi, >> >> I'm not a license expert but some guys at ASF said me you can't call >> LGPLed libs from java. some peoples interprete that as static linking >> and not dynamic linking (no idea why). > > This interpretation is wrong. See the official position of the FSF regarding > the LGPL and Java: > > http://www.gnu.org/licenses/lgpl-java.html > > http://www.fsf.org/licensing/licenses/lgpl-java.html > What I do with legal groups that go down that rat hole is give them a copy of the rxtx 2.0 license. Since the confused legal folks are going in a direction that does not represent the intent of the license or authors at that point and are confused about basic things in our industry that most consider facts, the discussions are very short. The rxtx 2.0 license just adds the following and has for 6 years or so. Not because the lawyers are right. They get confused about intent and even facts. The following is added to make confused lawyers that cant understand intent go far away and never come back. period. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. From hambyiii at hotmail.com Fri Aug 4 05:42:21 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 11:42:21 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Okay, I made a little mistake in my last message. The error is not occuring where I thought it was. Instead it is occuring when I do the following: byte[] readBuffer = new byte[128]; try { int numBytes = 0; try { Thread.sleep(500); } catch (InterruptedException e) {} while (inputStream.available() > 0) { numBytes = inputStream.read(readBuffer); } processReceivedData(readBuffer, numBytes); } catch (IOException e) { System.out.println(e.getMessage()); } So I guess the error is happening on the inputStream.read(readBuffer) again, any help is appreciated and again, thanks in advance Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 10:52:47 +0000 > >Hi, > >I have written a program in Java for Windows xp using RXTX (which is why I >am using this mailing list :). However, I am getting a problem. I am >connecting to a serial port, like so: > private CommPortIdentifier portID; > > private boolean openPort(String selectedPort) > { > boolean portFound = false; > Enumeration portList; > > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portID.getName().equals(selectedPort)) > { > portFound = true; > break; > } > } > } > > return portFound; > } > >and then I try and get the serial port input stream (leaving out the try >and >catch for the sake of space): > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >InputStream inputStream = serialPort.getInputStream(); > >but on the getInputStream() I get the following error message: > >Bad file descriptor in nativeavailable > >I cannot figure out where it is going wrong...anyone any ideas. A quick >answer would be wonderful, as I am kinda under the hammer to get this fixed >quickly > >Thanks in Advance >Keith > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From hambyiii at hotmail.com Fri Aug 4 07:08:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:08:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Hi, I know I am replying to myself a lot at the moment, but more information has come to light (These errors are actually happening on a client machine, on software that has worked for the past month, and only now has started to fail, which is why I am a little slow finding things out) The errors I have already written about are only symptoms of an orignal error. The original error occurs the first time I try to WRITE thte OutputStream: OutputStream oStream = serialPort.getOutputStream(); serialPort.notifyOnOutputEmpty(true); byte[] bs = encodeMessage(configString.toString()); oStream.write(bs); oStream.flush(); The error occurs on oStream.write(bs); and is: Input/output error in writeArray Now writeArray is native code, so I have no idea what is going on there. Any help would be appreciated Thanks Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 11:42:21 +0000 > >Okay, I made a little mistake in my last message. > >The error is not occuring where I thought it was. Instead it is occuring >when I do the following: > >byte[] readBuffer = new byte[128]; > >try { > > int numBytes = 0; > try { > Thread.sleep(500); > } > catch (InterruptedException e) > {} > > while (inputStream.available() > 0) > { > numBytes = inputStream.read(readBuffer); > } > > processReceivedData(readBuffer, numBytes); >} >catch (IOException e) >{ > System.out.println(e.getMessage()); >} > >So I guess the error is happening on the inputStream.read(readBuffer) > >again, any help is appreciated and again, thanks in advance >Keith > > >From: "Keith Thorne" > >Reply-To: RXTX Developers and Users > >To: rxtx at qbang.org > >Subject: [Rxtx] error getting InputStream > >Date: Fri, 04 Aug 2006 10:52:47 +0000 > > > >Hi, > > > >I have written a program in Java for Windows xp using RXTX (which is why >I > >am using this mailing list :). However, I am getting a problem. I am > >connecting to a serial port, like so: > > private CommPortIdentifier portID; > > > > private boolean openPort(String selectedPort) > > { > > boolean portFound = false; > > Enumeration portList; > > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > > while (portList.hasMoreElements()) > > { > > portID = (CommPortIdentifier) portList.nextElement(); > > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > > { > > if (portID.getName().equals(selectedPort)) > > { > > portFound = true; > > break; > > } > > } > > } > > > > return portFound; > > } > > > >and then I try and get the serial port input stream (leaving out the try > >and > >catch for the sake of space): > > > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); > >InputStream inputStream = serialPort.getInputStream(); > > > >but on the getInputStream() I get the following error message: > > > >Bad file descriptor in nativeavailable > > > >I cannot figure out where it is going wrong...anyone any ideas. A quick > >answer would be wonderful, as I am kinda under the hammer to get this >fixed > >quickly > > > >Thanks in Advance > >Keith > > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Aug 4 07:26:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: Hi Keith Can you tell us more about the physical serial port? Might it be 'vanishing?' On Fri, 4 Aug 2006, Keith Thorne wrote: > Hi, > > I know I am replying to myself a lot at the moment, but more information has > come to light (These errors are actually happening on a client machine, on > software that has worked for the past month, and only now has started to > fail, which is why I am a little slow finding things out) > > The errors I have already written about are only symptoms of an orignal > error. The original error occurs the first time I try to WRITE thte > OutputStream: > > OutputStream oStream = serialPort.getOutputStream(); > serialPort.notifyOnOutputEmpty(true); > > byte[] bs = encodeMessage(configString.toString()); > > oStream.write(bs); > oStream.flush(); > > The error occurs on oStream.write(bs); and is: > > Input/output error in writeArray > > Now writeArray is native code, so I have no idea what is going on there. Any > help would be appreciated > Thanks > Keith > > >> From: "Keith Thorne" >> Reply-To: RXTX Developers and Users >> To: rxtx at qbang.org >> Subject: Re: [Rxtx] error getting InputStream >> Date: Fri, 04 Aug 2006 11:42:21 +0000 >> >> Okay, I made a little mistake in my last message. >> >> The error is not occuring where I thought it was. Instead it is occuring >> when I do the following: >> >> byte[] readBuffer = new byte[128]; >> >> try { >> >> int numBytes = 0; >> try { >> Thread.sleep(500); >> } >> catch (InterruptedException e) >> {} >> >> while (inputStream.available() > 0) >> { >> numBytes = inputStream.read(readBuffer); >> } >> >> processReceivedData(readBuffer, numBytes); >> } >> catch (IOException e) >> { >> System.out.println(e.getMessage()); >> } >> >> So I guess the error is happening on the inputStream.read(readBuffer) >> >> again, any help is appreciated and again, thanks in advance >> Keith >> >>> From: "Keith Thorne" >>> Reply-To: RXTX Developers and Users >>> To: rxtx at qbang.org >>> Subject: [Rxtx] error getting InputStream >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 >>> >>> Hi, >>> >>> I have written a program in Java for Windows xp using RXTX (which is why >> I >>> am using this mailing list :). However, I am getting a problem. I am >>> connecting to a serial port, like so: >>> private CommPortIdentifier portID; >>> >>> private boolean openPort(String selectedPort) >>> { >>> boolean portFound = false; >>> Enumeration portList; >>> >>> portList = CommPortIdentifier.getPortIdentifiers(); >>> >>> while (portList.hasMoreElements()) >>> { >>> portID = (CommPortIdentifier) portList.nextElement(); >>> if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) >>> { >>> if (portID.getName().equals(selectedPort)) >>> { >>> portFound = true; >>> break; >>> } >>> } >>> } >>> >>> return portFound; >>> } >>> >>> and then I try and get the serial port input stream (leaving out the try >>> and >>> catch for the sake of space): >>> >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >>> InputStream inputStream = serialPort.getInputStream(); >>> >>> but on the getInputStream() I get the following error message: >>> >>> Bad file descriptor in nativeavailable >>> >>> I cannot figure out where it is going wrong...anyone any ideas. A quick >>> answer would be wonderful, as I am kinda under the hammer to get this >> fixed >>> quickly >>> >>> Thanks in Advance >>> Keith >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From hambyiii at hotmail.com Fri Aug 4 07:52:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:52:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more information >has > > come to light (These errors are actually happening on a client machine, >on > > software that has worked for the past month, and only now has started to > > fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an orignal > > error. The original error occurs the first time I try to WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); > >> } > >> catch (IOException e) > >> { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance > >> Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I am > >>> connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Fri Aug 4 08:21:07 2006 From: gergg at cox.net (Gregg Wonderly) Date: Fri, 04 Aug 2006 09:21:07 -0500 Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: <44D357D3.40303@cox.net> Keith Thorne wrote: > Okay, I made a little mistake in my last message. > > The error is not occuring where I thought it was. Instead it is occuring > when I do the following: > > byte[] readBuffer = new byte[128]; > > try { > > } > catch (IOException e) > { > System.out.println(e.getMessage()); > } > > So I guess the error is happening on the inputStream.read(readBuffer) This is one of the most frustrating things to see over and over. The exception tells you exactly which line the error is occuring on, if you will use it to see where. In Java, these days, every class should do the following. import java.util.logging.*; public class MyClass { Logger log = Logger.getLogger( getClass().getName() ); ...in some method... { String data = ...; // any extra data like addresses or // ports which might be wrong and // cause an exception. try { ... } catch( SomeException ex ) { log.log( Level.SEVERE, ex.toString()+": "+data, ex ); } } } By default, you will see all of the appropriate details of any exception logged at the WARNING or SEVERE level. You can read the javadocs about logging to get more information too. Once you do this, people can then turn up logging and get more information, or otherwise manage it with a logging configuration file or other tools such as JMX or my http://logman.dev.java.net project. Gregg Wonderly From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 09:15:24 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 09:15:24 -0600 Subject: [Rxtx] error getting InputStream Message-ID: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Keith, Please send the full stack trace of the exception, may be I can help you. On Trent's question regarding physical 'Serial Port', do you mean you have a USB(Connected to Client Machine) to 9 Pin Serial cable(Connected to H/W device)? Also please mention which java version you are using? Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Keith Thorne Sent: Friday, August 04, 2006 7:52 AM To: rxtx at qbang.org Subject: Re: [Rxtx] error getting InputStream The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more > > information >has > > come to light (These errors are actually happening on a client > > machine, >on > > software that has worked for the past month, and only now has > > started to fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an > > orignal error. The original error occurs the first time I try to > > WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); } catch (IOException > >> e) { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the > >> inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which > >>> is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I > >>> am connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out > >>> the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get > >>> this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 14:36:16 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 14:36:16 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Trent, As discussed over the phone yesterday, I am emailing you all the details of the bugs I have been experiencing. We do not use Serial Ports like most of the applications. Our application uses approx 80 -100 serial ports (attached thru Digi boxes) which are opened and closed every 20 sec to 1 minute depending upon the type of device. Some Serial ports are left opened all the time and receive event based serial calls while other devices uses polling (request and reply) to collect data. So the opening and closing of the Serial Ports is not really in a sequential order as you mentioned in our conversation yesterday. Also 2 same serial ports can never be opened at one time we have business locks to prevent that from happening. Our findings so far (of course with the help of RXTX user group): The real culprit is in the SerialImp.c file, somehow the other the Event Info Structure in the Linked List gets damaged and loses references to the original EIS structure. I believe both the problems are caused because of the corruption of EIS packet. I have noticed that the link list traversal of EIS in the following methods under SerialImp.c : 1)initialise_event_info_struct 2)finalize_event_info_struct 3)interruptEventLoop So culprit code might be in one of these methods. I am currently using JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and Fedora Core 5). I am also attaching a Test Class to replicate the problem. You need to modify the class and add your systems Serial ports into the code and execute. java TestOpenClosePort 100 It will open and close all the serial ports 100 times in there own thread. Please let me know, I will be available thru out this weekend and can help you as much as I can with testing. Regards Pawan Kharbanda CDOT-ITS 303-478-2991 (cell) 303-985-4350 (home) -------------- next part -------------- A non-text attachment was scrubbed... Name: TestOpenClosePort.java Type: application/octet-stream Size: 6139 bytes Desc: TestOpenClosePort.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dd3754d9/TestOpenClosePort-0326.obj From tjarvi at qbang.org Fri Aug 4 15:43:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 15:43:09 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: Thanks, I'll look at it tomorrow morning. I don't know when I'll find the solution but you may check email tomorrow afternoon to see if I think I found it. On Fri, 4 Aug 2006, Kharbanda, Pawan wrote: > Trent, > As discussed over the phone yesterday, I am emailing you all the > details of the bugs I have been experiencing. We do not use Serial Ports > like most of the applications. Our application uses approx 80 -100 > serial ports (attached thru Digi boxes) which are opened and closed > every 20 sec to 1 minute depending upon the type of device. Some Serial > ports are left opened all the time and receive event based serial calls > while other devices uses polling (request and reply) to collect data. So > the opening and closing of the Serial Ports is not really in a > sequential order as you mentioned in our conversation yesterday. Also 2 > same serial ports can never be opened at one time we have business locks > to prevent that from happening. > > Our findings so far (of course with the help of RXTX user group): > > The real culprit is in the SerialImp.c file, somehow the other the Event > Info Structure in the Linked List gets damaged and loses references to > the original EIS structure. I believe both the problems are caused > because of the corruption of EIS packet. I have noticed that the link > list traversal of EIS in the following methods under SerialImp.c : > > 1)initialise_event_info_struct > 2)finalize_event_info_struct > 3)interruptEventLoop > > So culprit code might be in one of these methods. I am currently using > JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and > Fedora Core 5). > > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > > Regards > Pawan Kharbanda > CDOT-ITS > 303-478-2991 (cell) > 303-985-4350 (home) > > > > > > > > > > From tjarvi at qbang.org Sat Aug 5 12:32:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:32:40 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:34:27 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:34:27 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> You need to run it few times. More the number of ports, more frequently you can reproduce. With just 2 ports it will be hard to reproduce frequently. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:33 PM To: Kharbanda, Pawan Cc: tjarvi at qbang.org; RXTX Developers and Users Subject: Re: Port Locking / JVM Crashing > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Aug 5 12:52:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:52:26 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> Message-ID: Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more frequently > you can reproduce. With just 2 ports it will be hard to reproduce > frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:57:49 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:57:49 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Trent, I have 5 ports of Digi and I can reproduce almost every time. Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX version -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:52 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more > frequently you can reproduce. With just 2 ports it will be hard to > reproduce frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need >> to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From tjarvi at qbang.org Sat Aug 5 13:06:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:06:07 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Message-ID: You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few thousand > iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:07:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:07:33 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E659@hqexchange3.dot.state.co.us> We use our own locks but I haven't turned off the RXTX locks. I am still using the RXTX locks that might be the difference. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:13:22 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:13:22 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Trent, How can you turn off the lock files? I can try using that. I never tried that, I thought you can't turn off the file locking. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From tjarvi at qbang.org Sat Aug 5 13:18:53 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:18:53 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Message-ID: Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java > -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except lockfiles > are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:31:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:31:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Trent, I am able to constantly replicate almost everytime even when I have locks disabled. Don't know the reason why you are not able to on your environment. Any suggestions??????? Cycle No (Thread ::: /dev/cuf04) ::::::: 7 Cycle No (Thread ::: /dev/cuf01) ::::::: 7 Cycle No (Thread ::: /dev/cuf02) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) Exiting Thread ::: /dev/cuf03 Cycle No (Thread ::: /dev/cuf03) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent Port /dev/cuf01 is Opened 0x01 Sent Port /dev/cub01 is Opened 0x01 Sent Port /dev/cuf01 is Closed Port /dev/cuf02 is Closed Port /dev/cuf03 is Closed Port /dev/cuf04 is Closed Port /dev/cub01 is Closed Exiting Thread ::: /dev/cuf03 Exiting Thread ::: /dev/cuf02 Cycle No (Thread ::: /dev/cuf03) ::::::: 8 Cycle No (Thread ::: /dev/cuf02) ::::::: 8 Exiting Thread ::: /dev/cuf04 Exiting Thread ::: /dev/cuf01 Cycle No (Thread ::: /dev/cuf01) ::::::: 8 Cycle No (Thread ::: /dev/cuf04) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened 0x01 Sent Port /dev/cuf01 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 # # An error report file with more information is saved as hs_err_pid21386.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:19 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) > 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux > java -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except > lockfiles are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code >>>> and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm >>> running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From tjarvi at qbang.org Sat Aug 5 14:14:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 14:14:49 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: I'd stick a couple $15 dual port serial boards in the machine to see if its kernel driver specific. I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more problematic. They do not get the same number of eyes looking for problems. You could try putting #undef TIOCSERGETLSR #undef TIOCGICOUNT in the very top of SerialImp.h or one or the other to flip bits of code off and on. The kernel here is 2.6.11.4-20a-smp from Suse. glibc is 2.3.4-23.4 from Suse the jre is 1.5.0_06-b05 from Sun. The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC ram. You should be able to reproduce what I'm seeing then go from there. I don't think I'm going to see this problem without having the same cornercase hardware you have. Maybe we can work that out off the list but I doubt I'm going to find it in rxtx at this point. I have seen problems in the past were kernel structs don't match user space struct and bad things happen but I was including a kernel struct to get functionality that had not made its way into user space at the time. The only thing I may be missing is that when I write 0x01 out the port, nothing comes back. That was not specified but you could easily disconnect anything connected to the ports to see if that changes anything. rxtx is far from bug free but I do not see anything yet. On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I am able to constantly replicate almost everytime even when I have > locks disabled. Don't know the reason why you are not able to on your > environment. Any suggestions??????? > > > Cycle No (Thread ::: /dev/cuf04) ::::::: 7 > Cycle No (Thread ::: /dev/cuf01) ::::::: 7 > Cycle No (Thread ::: /dev/cuf02) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > Exiting Thread ::: /dev/cuf03 > Cycle No (Thread ::: /dev/cuf03) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > Port /dev/cuf01 is Opened > 0x01 Sent > Port /dev/cub01 is Opened > 0x01 Sent > Port /dev/cuf01 is Closed > Port /dev/cuf02 is Closed > Port /dev/cuf03 is Closed > Port /dev/cuf04 is Closed > Port /dev/cub01 is Closed > Exiting Thread ::: /dev/cuf03 > Exiting Thread ::: /dev/cuf02 > Cycle No (Thread ::: /dev/cuf03) ::::::: 8 > Cycle No (Thread ::: /dev/cuf02) ::::::: 8 > Exiting Thread ::: /dev/cuf04 > Exiting Thread ::: /dev/cuf01 > Cycle No (Thread ::: /dev/cuf01) ::::::: 8 > Cycle No (Thread ::: /dev/cuf04) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > 0x01 Sent > Port /dev/cuf01 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 > # > # An error report file with more information is saved as > hs_err_pid21386.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > Aborted > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:19 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Lockfiles are a compile time option. I've turned them on now, corrected > a mistake resulting in only 3 ports being used and now have it going > through a few hundred iterations again without a crash. > > To disable lockfiles.. > > ./configure --disable-lockfiles && make install > > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > Port /dev/ttyS5 is Closed > Exiting Thread ::: /dev/ttyS1 > Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: > /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting > Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port > /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS1 is Closed > Port /dev/ttyS4 is Closed > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > > > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, How can you turn off the lock files? I can try using that. I >> never tried that, I thought you can't turn off the file locking. >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:06 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> You may try 4 ports instead of 5 to make sure thats not the issue. >> >> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >> 2.6.11.4-20a-smp >> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >> java -version java version "1.5.0_06" >> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >> >> I'm using rxtx 2.1-7 (final) with default configuration except >> lockfiles are disabled. I gathered that you are doing your own > resource locking. >> >> ... >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> ... >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>> version >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:52 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> Whats a few times? I've got 4 ports here and have run it a few >>> thousand iterations. >>> >>> Is that true for you if you run it with just four of your DIGI ports? >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> You need to run it few times. More the number of ports, more >>>> frequently you can reproduce. With just 2 ports it will be hard to >>>> reproduce frequently. >>>> >>>> ~pk >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:33 PM >>>> To: Kharbanda, Pawan >>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>> Subject: Re: Port Locking / JVM Crashing >>>> >>>>> I am also attaching a Test Class to replicate the problem. You need > >>>>> to >>>> >>>>> modify the class and add your systems Serial ports into the code >>>>> and >> >>>>> execute. >>>>> >>>>> java TestOpenClosePort 100 >>>>> >>>>> It will open and close all the serial ports 100 times in there own >>>>> thread. >>>>> >>>>> Please let me know, I will be available thru out this weekend and >>>>> can >>> >>>>> help you as much as I can with testing. >>>>> >>>> >>>> How reproducable is the problem with the above testcase? I'm >>>> running >> >>>> 100's of iterations without reproducing the problem. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> >>> >> > From rtlane01 at comcast.net Tue Aug 1 19:22:03 2006 From: rtlane01 at comcast.net (Randall T. Lane) Date: Tue, 01 Aug 2006 21:22:03 -0400 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] Message-ID: <44CFFE3B.90001@comcast.net> Rxtx Community: Please see my e-mail to Trent. Does anyone have any experience using rxtx to successfully communicate with hardware via USB? Thanks. Randy Lane -------------- next part -------------- An embedded message was scrubbed... From: Trent Jarvi Subject: Re: Help with RxTx for USB Communication Date: Tue, 1 Aug 2006 18:49:13 -0600 (MDT) Size: 3300 Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060801/9bbbc255/HelpwithRxTxforUSBCommunication-0324.mht From naranjo.manuel at gmail.com Sun Aug 6 16:59:28 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Sun, 06 Aug 2006 19:59:28 -0300 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44CFFE3B.90001@comcast.net> References: <44CFFE3B.90001@comcast.net> Message-ID: <44D67450.8010100@gmail.com> Randy: I have been able to communicate to AIRcable USB Bluetooth Dongle, with success. I'm not sure which are the options that you have to send to RXTX library, but you can indeed. Check that you do not have the port avaible for much long. I have heard of a problem with WinXP that it simply turn off virtual ports when they are too much long with out activity. If you want I can send you my code, because it is avaible under GPL, the new release is not avaible at AIRcable web site, but it should in short time. Regards, Manu > Rxtx Community: > > Please see my e-mail to Trent. Does anyone have any experience using > rxtx to successfully communicate with hardware via USB? > > Thanks. > > Randy Lane > > ------------------------------------------------------------------------ > > Asunto: > Re: Help with RxTx for USB Communication > De: > Trent Jarvi > Fecha: > Tue, 1 Aug 2006 18:49:13 -0600 (MDT) > Para: > "Randall T. Lane" > > Para: > "Randall T. Lane" > CC: > taj at www.linux.org.uk > > > On Tue, 1 Aug 2006, Randall T. Lane wrote: > >> Trent, >> >> I am working on a project written in Java (1.5) and need to >> communicate to an external device via a USB port. >> >> I have downloaded rxtx-2.1-7-bins-r2.zip from www.rxtx.org and setup >> a Java test project to learn how to use rxtx. I am able to list the >> serial ports available, however rxtx does not recognize my USB port. >> I am running on Windows XP. Here is some output from my test project >> ... >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> COM1 - Serial >> COM3 - Serial >> LPT1 - Parallel >> >> I would appreciate any help you could provide in getting rxtx to >> allow me to communicate via my USB port. >> >> Here is my code, if that would help. >> >> public static void main(String[] args) { >> listPorts(); >> // The listPorts() and getPortTypeName() methods are used for >> port identification. >> static void listPorts() >> { >> Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); >> while ( portEnum.hasMoreElements() ) >> { >> CommPortIdentifier portIdentifier = (CommPortIdentifier) >> portEnum.nextElement(); >> System.out.println(portIdentifier.getName() + " - " + >> getPortTypeName(portIdentifier.getPortType()) ); >> } } >> static String getPortTypeName ( int portType ) >> { >> switch ( portType ) >> { >> case CommPortIdentifier.PORT_I2C: >> return "I2C"; >> case CommPortIdentifier.PORT_PARALLEL: >> return "Parallel"; >> case CommPortIdentifier.PORT_RAW: >> return "Raw"; >> case CommPortIdentifier.PORT_RS485: >> return "RS485"; >> case CommPortIdentifier.PORT_SERIAL: >> return "Serial"; >> default: >> return "unknown type"; >> } >> } >> >> Thanks. >> >> Randy Lane >> > > Hi Randy > > The rxtx mail list is a better place to ask as there are more eyes. > I'm swamped with work. > > Be sure to look to see that your serial port dongle shows up as a > serial port in device manager and no other applications have it open. > USB serial dongles do work with rxtx. Some are less complete than > others. > > -- > Trent Jarvi > tjarvi at qbang.org > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From eddythejekyll at gmail.com Sun Aug 6 23:31:45 2006 From: eddythejekyll at gmail.com (Ed) Date: Sun, 6 Aug 2006 23:31:45 -0600 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? Message-ID: I have written a simple client server (RMI) application without using RxTx where the server controls a parallel port simply by addressing the port and banging the bits in order to drive a relay. It also reads the port's. I am doing this by making Runtime.exec calls to a binary that actually does the parallel port bit banging and reading. However, I'd like to use RxTx so it is a pure Java application, and I've so far installed and figured out how to discover the ports, but I'm having trouble finding good examples or some howto type documentation for this. I did find the two examples on the Wiki: one for serial IO and the other to discover the ports on a system. As I said, I have so far installed RxTx and gotten it to compile and run and I can identify the ports. When I run the server I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found Ports! Found port COM1 Found port COM3 Found port LPT1 LPT1 Not Currently owned EASSwitch Server starting. EASSwitch is bound. Server Ready. So it looks like thing are installed and working, but I feel all dressed up and no idea how to proceed. Basically, I just want to be able to toggle the data lines on the parallel port and read them. Very simple. No parallel printer type usage. Are there any examples I can work off of? If so, please advise. Thank you. -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060806/c7e39898/attachment-0324.html From hambyiii at hotmail.com Sun Aug 6 23:53:54 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Mon, 07 Aug 2006 05:53:54 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Message-ID: Hi, sorry I took the weekend to reply, but I was away for the last couple of days. Unfortunately I cannot send the full stack trace yet. The problem is not, unfortunately, happening on my computer, but on a clients computer, which I will go and visit today. I will hopefully be able to get a stack trace then. As to the physical connection, tt is indeed a USB from the computer, connected to a 9 pin serial device that connects to the hard-ware. My java version is 1.5.06 >From: "Kharbanda, Pawan" >Reply-To: RXTX Developers and Users >To: "RXTX Developers and Users" >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 09:15:24 -0600 > >Keith, > Please send the full stack trace of the exception, may be I can help >you. On Trent's question regarding physical 'Serial Port', do you mean >you have a USB(Connected to Client Machine) to 9 Pin Serial >cable(Connected to H/W device)? > >Also please mention which java version you are using? > >Thanks >Pawan Kharbanda > > >-----Original Message----- >From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >Of Keith Thorne >Sent: Friday, August 04, 2006 7:52 AM >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream > >The physical serial port is actually a USB connection that is then >changed to a "virtual serial port", so I can use the serial port >protocols to connect to it. The other end of the connection is a >hardware device that is constantly turned on. I am not sure about the >port 'vanishing'...we have another piece of software that came with the >hardware device, which we can test the device (and with it the virtual >serial port) with. This has no problem connecting to the serial port or >writing to/reading from the device. >It is only when my software is run, that the error occurs. Like I have >said, my software (using rxtx) is connecting to the serial port >successfully, but it is when I try and write to the serial port that I >get the error. > >Although to be truthful, I am not absolutely certain if the error is >happening on the oStream.write() or the oStream.flush(). I only think it >is the write(), because that is where the writeArray() function is >called. > >thanks >Keith > > > >From: Trent Jarvi > >Reply-To: RXTX Developers and Users > >To: RXTX Developers and Users > >Subject: Re: [Rxtx] error getting InputStream > >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > > > > >Hi Keith > > > >Can you tell us more about the physical serial port? Might it be > >'vanishing?' > > > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > > > Hi, > > > > > > I know I am replying to myself a lot at the moment, but more > > > information > >has > > > come to light (These errors are actually happening on a client > > > machine, > >on > > > software that has worked for the past month, and only now has > > > started to fail, which is why I am a little slow finding things out) > > > > > > The errors I have already written about are only symptoms of an > > > orignal error. The original error occurs the first time I try to > > > WRITE thte > > > OutputStream: > > > > > > OutputStream oStream = serialPort.getOutputStream(); > > > serialPort.notifyOnOutputEmpty(true); > > > > > > byte[] bs = encodeMessage(configString.toString()); > > > > > > oStream.write(bs); > > > oStream.flush(); > > > > > > The error occurs on oStream.write(bs); and is: > > > > > > Input/output error in writeArray > > > > > > Now writeArray is native code, so I have no idea what is going on >there. > >Any > > > help would be appreciated > > > Thanks > > > Keith > > > > > > > > >> From: "Keith Thorne" > > >> Reply-To: RXTX Developers and Users > > >> To: rxtx at qbang.org > > >> Subject: Re: [Rxtx] error getting InputStream > > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > > >> > > >> Okay, I made a little mistake in my last message. > > >> > > >> The error is not occuring where I thought it was. Instead it is > >occuring > > >> when I do the following: > > >> > > >> byte[] readBuffer = new byte[128]; > > >> > > >> try { > > >> > > >> int numBytes = 0; > > >> try { > > >> Thread.sleep(500); > > >> } > > >> catch (InterruptedException e) > > >> {} > > >> > > >> while (inputStream.available() > 0) > > >> { > > >> numBytes = inputStream.read(readBuffer); > > >> } > > >> > > >> processReceivedData(readBuffer, numBytes); } catch (IOException > > >> e) { > > >> System.out.println(e.getMessage()); > > >> } > > >> > > >> So I guess the error is happening on the > > >> inputStream.read(readBuffer) > > >> > > >> again, any help is appreciated and again, thanks in advance Keith > > >> > > >>> From: "Keith Thorne" > > >>> Reply-To: RXTX Developers and Users > > >>> To: rxtx at qbang.org > > >>> Subject: [Rxtx] error getting InputStream > > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > > >>> > > >>> Hi, > > >>> > > >>> I have written a program in Java for Windows xp using RXTX (which > > >>> is > >why > > >> I > > >>> am using this mailing list :). However, I am getting a problem. I > > >>> am connecting to a serial port, like so: > > >>> private CommPortIdentifier portID; > > >>> > > >>> private boolean openPort(String selectedPort) > > >>> { > > >>> boolean portFound = false; > > >>> Enumeration portList; > > >>> > > >>> portList = CommPortIdentifier.getPortIdentifiers(); > > >>> > > >>> while (portList.hasMoreElements()) > > >>> { > > >>> portID = (CommPortIdentifier) portList.nextElement(); > > >>> if (portID.getPortType() == > >CommPortIdentifier.PORT_SERIAL) > > >>> { > > >>> if (portID.getName().equals(selectedPort)) > > >>> { > > >>> portFound = true; > > >>> break; > > >>> } > > >>> } > > >>> } > > >>> > > >>> return portFound; > > >>> } > > >>> > > >>> and then I try and get the serial port input stream (leaving out > > >>> the > >try > > >>> and > > >>> catch for the sake of space): > > >>> > > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", > >2000); > > >>> InputStream inputStream = serialPort.getInputStream(); > > >>> > > >>> but on the getInputStream() I get the following error message: > > >>> > > >>> Bad file descriptor in nativeavailable > > >>> > > >>> I cannot figure out where it is going wrong...anyone any ideas. A > >quick > > >>> answer would be wonderful, as I am kinda under the hammer to get > > >>> this > > >> fixed > > >>> quickly > > >>> > > >>> Thanks in Advance > > >>> Keith > > >>> > > >>> > > >>> _______________________________________________ > > >>> Rxtx mailing list > > >>> Rxtx at qbang.org > > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > > >> > > >> > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Aug 7 06:22:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:22:03 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: Hmm.. I left the test running went I went home Saturday. It looks like something did show up after ~30k iterations. I'll look at it more in my free time. Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS5 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 29417 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 29417 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 29417 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00002aab14c2ec63, pid=20573, tid=1095125344 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6c63] initialise_event_info_struct+0x63 # [thread 1087756640 also had an error] Port /dev/ttyS5 is Opened 0x01 Sent [thread 1089861984 also had an error] Port /dev/ttyS4 is Opened 0x01 Sent [thread 1090914656 also had an error] # An error report file with more information is saved as [thread 1090914656 also had an error] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted On Sat, 5 Aug 2006, Trent Jarvi wrote: > > I'd stick a couple $15 dual port serial boards in the machine to see if its > kernel driver specific. > > I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more > problematic. They do not get the same number of eyes looking for problems. > > You could try putting > > #undef TIOCSERGETLSR > #undef TIOCGICOUNT > > in the very top of SerialImp.h or one or the other to flip bits of code off > and on. > > The kernel here is 2.6.11.4-20a-smp from Suse. > glibc is 2.3.4-23.4 from Suse > the jre is 1.5.0_06-b05 from Sun. > > The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC > ram. > > You should be able to reproduce what I'm seeing then go from there. I don't > think I'm going to see this problem without having the same cornercase > hardware you have. Maybe we can work that out off the list but I doubt I'm > going to find it in rxtx at this point. > > I have seen problems in the past were kernel structs don't match user space > struct and bad things happen but I was including a kernel struct to get > functionality that had not made its way into user space at the time. > > The only thing I may be missing is that when I write 0x01 out the port, > nothing comes back. That was not specified but you could easily disconnect > anything connected to the ports to see if that changes anything. > > rxtx is far from bug free but I do not see anything yet. > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, >> I am able to constantly replicate almost everytime even when I have >> locks disabled. Don't know the reason why you are not able to on your >> environment. Any suggestions??????? >> >> >> Cycle No (Thread ::: /dev/cuf04) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> Exiting Thread ::: /dev/cuf03 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> Port /dev/cuf01 is Opened >> 0x01 Sent >> Port /dev/cub01 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Closed >> Port /dev/cuf02 is Closed >> Port /dev/cuf03 is Closed >> Port /dev/cuf04 is Closed >> Port /dev/cub01 is Closed >> Exiting Thread ::: /dev/cuf03 >> Exiting Thread ::: /dev/cuf02 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 8 >> Exiting Thread ::: /dev/cuf04 >> Exiting Thread ::: /dev/cuf01 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf04) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 >> # >> # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 >> # >> # An error report file with more information is saved as >> hs_err_pid21386.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> Aborted >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:19 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Lockfiles are a compile time option. I've turned them on now, corrected >> a mistake resulting in only 3 ports being used and now have it going >> through a few hundred iterations again without a crash. >> >> To disable lockfiles.. >> >> ./configure --disable-lockfiles && make install >> >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> Port /dev/ttyS5 is Closed >> Exiting Thread ::: /dev/ttyS1 >> Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: >> /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting >> Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port >> /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> >> >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, How can you turn off the lock files? I can try using that. I >>> never tried that, I thought you can't turn off the file locking. >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 1:06 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> You may try 4 ports instead of 5 to make sure thats not the issue. >>> >>> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >>> 2.6.11.4-20a-smp >>> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >>> java -version java version "1.5.0_06" >>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >>> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >>> >>> I'm using rxtx 2.1-7 (final) with default configuration except >>> lockfiles are disabled. I gathered that you are doing your own >> resource locking. >>> >>> ... >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> Port /dev/ttyS4 is Closed >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> ... >>> >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>>> version >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:52 PM >>>> To: Kharbanda, Pawan >>>> Cc: Trent Jarvi; RXTX Developers and Users >>>> Subject: RE: Port Locking / JVM Crashing >>>> >>>> >>>> Whats a few times? I've got 4 ports here and have run it a few >>>> thousand iterations. >>>> >>>> Is that true for you if you run it with just four of your DIGI ports? >>>> >>>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>>> >>>>> You need to run it few times. More the number of ports, more >>>>> frequently you can reproduce. With just 2 ports it will be hard to >>>>> reproduce frequently. >>>>> >>>>> ~pk >>>>> >>>>> -----Original Message----- >>>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>>> Sent: Saturday, August 05, 2006 12:33 PM >>>>> To: Kharbanda, Pawan >>>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>>> Subject: Re: Port Locking / JVM Crashing >>>>> >>>>>> I am also attaching a Test Class to replicate the problem. You need >> >>>>>> to >>>>> >>>>>> modify the class and add your systems Serial ports into the code >>>>>> and >>> >>>>>> execute. >>>>>> >>>>>> java TestOpenClosePort 100 >>>>>> >>>>>> It will open and close all the serial ports 100 times in there own >>>>>> thread. >>>>>> >>>>>> Please let me know, I will be available thru out this weekend and >>>>>> can >>>> >>>>>> help you as much as I can with testing. >>>>>> >>>>> >>>>> How reproducable is the problem with the above testcase? I'm >>>>> running >>> >>>>> 100's of iterations without reproducing the problem. >>>>> >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> >>>> >>> >> > From iinjlv01 at gmail.com Mon Aug 7 06:22:07 2006 From: iinjlv01 at gmail.com (J LV) Date: Mon, 7 Aug 2006 14:22:07 +0200 Subject: [Rxtx] Data lost or Slow sampling Message-ID: Hello I am using RXTX to comm with a motion controller using Serial Port and i can write the commands using SerialPort or RXTXPort without problems, but when i try write and read at high sampling rate, for example to know the position and speed at every moment of a trajectory, i obtain a very irregular response times. I am using the most simple algorimth: 1-Write the command "is trajectory finished?" and wait for SerialPortEvent.DATA_AVAILABLE 2-Read the InputStreamReader of serial port while not empty 3-If trajectory finished then stop program, else, continue 4-Read actual time using System.currentTimeMillis() (t0) 5-Write the command "give me position" and wait for SerialPortEvent.DATA_AVAILABLE 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) 7-Read the InputStreamReader of serial port while not empty 8-Save position in Vector or ArrayList and repeat from 1 I don't know if the problem is the RXTX, my program or the motion controller hardware but i have response times from 16 millis to 78 millis at 19200 bauds!. I am using SwingWorked to threading SerialPort reading/writing process. Any idea or similar data leak problem? Thanks for RXTX project and sorry for my badde english! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/909a4cb3/attachment-0324.html From tjarvi at qbang.org Mon Aug 7 06:50:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:50:10 -0600 (MDT) Subject: [Rxtx] Data lost or Slow sampling In-Reply-To: References: Message-ID: On Mon, 7 Aug 2006, J LV wrote: > Hello > > I am using RXTX to comm with a motion controller using Serial Port and i can > write the commands using SerialPort or RXTXPort without problems, but when i > try write and read at high sampling rate, for example to know the position > and speed at every moment of a trajectory, i obtain a very irregular > response times. I am using the most simple algorimth: > 1-Write the command "is trajectory finished?" and wait for > SerialPortEvent.DATA_AVAILABLE > 2-Read the InputStreamReader of serial port while not empty > 3-If trajectory finished then stop program, else, continue > 4-Read actual time using System.currentTimeMillis() (t0) > 5-Write the command "give me position" and wait for > SerialPortEvent.DATA_AVAILABLE > 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) > 7-Read the InputStreamReader of serial port while not empty > 8-Save position in Vector or ArrayList and repeat from 1 > > > I don't know if the problem is the RXTX, my program or the motion controller > hardware but i have response times from 16 millis to 78 millis at 19200 > bauds!. I am using SwingWorked to threading SerialPort reading/writing > process. > > Any idea or similar data leak problem? > > Thanks for RXTX project and sorry for my badde english! > This can be platform dependant. What you may do for a starting point is use a loopback connection and time the same thing at 19200. Write the date, wait for data available, read the data. I would expect from write to data available to take around 10 ms from past experiences. You can experiment with turning on and off buffering in the port settings of the OS, if the OS supports more realtime like interrupts, that could help. You have a java schedual and the kernel schedual. Serial interrupts traditionally have very high priority but modern OSs tend to realize thats not good for GUIs, ... and delay responding to the interrupts. You should be able to have usec response times in a realtime OS. Windows and Linux are not typically setup as realtime OSs. For comparison, the last time I looked which was about 5 years ago, windows NT4 came back with data available in 8 ms and Linux came back in 10 ms. I would be interested in seeing what you get today. -- Trent Jarvi tjarvi at qbang.org From gergg at cox.net Mon Aug 7 09:21:56 2006 From: gergg at cox.net (Gregg Wonderly) Date: Mon, 07 Aug 2006 10:21:56 -0500 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? In-Reply-To: References: Message-ID: <44D75A94.9030205@cox.net> Ed wrote: > Are there any examples I can work off of? If so, please advise. Just read the javax.comm javadocs. You need to take the parallel port and write values to it based on which bits of which lines you want on and off. Gregg Wonderly From pete.flugstad at gmail.com Mon Aug 7 09:36:19 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 7 Aug 2006 10:36:19 -0500 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44D67450.8010100@gmail.com> References: <44CFFE3B.90001@comcast.net> <44D67450.8010100@gmail.com> Message-ID: <84d4a6d50608070836v97e9a29q96e98441ea903ac7@mail.gmail.com> FYI, I'm talking to a USB<->Serial dongle just fine under Windows XP Pro. I did have to install a driver for the thing - Windows XP by default, did not recognize it. Once installed, it just showed up as another COM port, and I've been pushing data over it with no problems. Pete From savagobr at yahoo.com Mon Aug 7 10:13:06 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Mon, 7 Aug 2006 09:13:06 -0700 (PDT) Subject: [Rxtx] Port Locking / JVM Crashing: 2 ports (Serial + usb) Message-ID: <20060807161306.9648.qmail@web53803.mail.yahoo.com> Trent This is curious, since I did reproduced the aformentioned bug using only 2 ports: /dev/ttyS0 and /dev/ttyUSB0. It only need to run for 500 times: $ java -cp . TestOpenClosePort 500 500 Port /dev/ttyS0 is Closed Excpetion ::: Thread ::: /dev/ttyUSB0null Exiting Thread ::: /dev/ttyUSB0 Cycle No (Thread ::: /dev/ttyUSB0) ::::::: 227 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 184 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x203d2044, pid=32368, tid=2986859424 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing) # Problematic frame: # C 0x203d2044 # # An error report file with more information is saved as /tmp/hs_err_pid32368.log # # If you would like to submit a bug report, please visit: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Best regards Savago ps: Test environment $ uname -a Linux localhost.localdomain 2.6.15-1.2054_FC5 #1 Tue Mar 14 15:48:33 EST 2006 i686 i686 i386 GNU/Linux $ java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) $gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.1 20060525 (Red Hat 4.1.1-1) --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/c6ca8094/attachment-0323.html From Pawan.Kharbanda at dot.state.co.us Mon Aug 7 17:23:25 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 7 Aug 2006 17:23:25 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Trent, I think I got the problem fixed after some code changes in the C (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the staging environment (with 10 devices) with real time data and haven't seen a JVM lock/ Port locking since last night. I am going to do further stress testing and will send all my code changes and my findings in next few days. I believe the problem was causing due to the digi drivers and how the Linux kernel talked to it, so after making some code changes and synchronization fixes, I got it to work. I am keeping my fingers crossed :) Thanks for all your help. You have been a great help. Will keep you posted. Cheers ~pk PS : We are going to test my new RXTX changes with the 2.6 Red Hat kernel (currently using 2.4.21-37.ELsmp) too. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 5:08 PM To: Kharbanda, Pawan Subject: RE: Port Locking / JVM Crashing Hi Pawan As mentioned I did reproduce the error but after several hours of cycles. I'm looking at RXTXPort.java and thinking about what may be happening. The error is in the C layer but it may be preventable in the java code. lets say two closes are overlapping or an operation is trying to happen while another port is closing. The structure may be out of sync by the time the code using the structure in another thread gets to the event info struct. So I'm wondering if synchronization in RXTXPort() and close() may help you. A second thing that may help is you can put printf("got here\n"); in each of the lines in initialize event info struct to verify that the problem is in walking the linked list. Thats my suspicion. So a properly timed close() while calling the constructor may be catching rxtx off guard. You can synchronize to test that and it may do away with the problem. From tjarvi at qbang.org Mon Aug 7 18:01:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 18:01:54 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Message-ID: Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do further > stress testing and will send all my code changes and my findings in next > few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to happen > while another port is closing. The structure may be out of sync by the > time the code using the structure in another thread gets to the event > info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may do > away with the problem. > From Pawan.Kharbanda at dot.state.co.us Tue Aug 8 13:49:14 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 8 Aug 2006 13:49:14 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Trent, I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and have absolutely no problem with JVM crashing or Port Locking even after 10000 operations (now I am trying 100,000 :). This is all with the original RXTX 2.1.7 (final) api's without any of my fixes that I have been trying for last 2-3 weeks. I will suggest that we update the INSTALL or Readme file accompnying the RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: 82000685_G 02/02/2006). This should helped everybody using the RXTX API's with RedHat Linux atleast. Regards Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 6:02 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do > further stress testing and will send all my code changes and my > findings in next few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers > crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to > happen while another port is closing. The structure may be out of > sync by the time the code using the structure in another thread gets > to the event info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may > do away with the problem. > From jimo at earthlink.net Wed Aug 9 21:21:00 2006 From: jimo at earthlink.net (Jim Owen) Date: Wed, 9 Aug 2006 20:21:00 -0700 Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat Message-ID: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Hi All, I've run into some difficulties with rxtx that have me baffled and need some help. I have an application that has used earlier versions of rxtx successfully and on a variety of platforms. We recently needed to deploy this application into an environment where we could not utilize lock files. I pulled down the 2.0.7 pre1 source distribution and executed configure with --disable-lockfiles. I then executed make and make install. When I execute the program, as root, I get the following error: ************************************************************************ Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) # Problematic frame: # C 0x00001004 # # An error report file with more information is saved as hs_err_pid20151.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # **************************************************************************** If I execute as a normal user, I get no errors, but no ports listed: (Using an earlier version, I get a serial and parallel port listed.) **************************************************************************** [jim at linuxDev ingenicoApp]$ java VerifyCommBuild Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Some ports appear to have been found, let's try to enumerate them. Complete. **************************************************************************** When I built rxtx, there was a warning given of the following: **************************************************************************** conftest.c: In function 'main': conftest.c:6: warning: incompatible implicit declaration of built-in function 'printf' conftest.c:7: warning: incompatible implicit declaration of built-in function 'exit' WARNING: Kernel include files do not match the current kernel **************************************************************************** uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux JAVA_HOME=/usr/java/j2sdk1.4.2_11 javax.comm.properties: Driver=gnu.io.RXTXCommDriver Here's the code for VerifyCommBuild.java that I'm using to test: **************************************************************************** import javax.comm.*; import java.util.Enumeration; /** * A quick app to check that the javax.comm (Serial) Communications extension has been properly * installed and configured on this machine. * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. */ public class VerifyCommBuild { public static void main(String args[]) { Enumeration ports; System.out.println("Verifying Comm Build Environment"); try { ports = CommPortIdentifier.getPortIdentifiers(); if (ports == null) { System.out.println("No comm ports found!"); return; } System.out.println("Some ports appear to have been found, let's try to enumerate them."); while (ports.hasMoreElements()) { System.out.println("Here is a port [" + ((CommPortIdentifier)ports.nextElement()).getName() + "]"); } } catch (Exception e) { System.out.println("Failed to enumerate ports [" + e.getMessage() + "]"); e.printStackTrace(); } System.out.println("Complete."); } } **************************************************************************** Any suggestions as to what I'm missing? Thanks, Jim Owen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060809/92503a81/attachment-0321.html From tjarvi at qbang.org Thu Aug 10 05:39:36 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 05:39:36 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Message-ID: On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even after > 10000 operations (now I am trying 100,000 :). This is all with the > original RXTX 2.1.7 (final) api's without any of my fixes that I have > been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying the > RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp > and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From oliver.archner at bayceer.uni-bayreuth.de Wed Aug 9 06:13:36 2006 From: oliver.archner at bayceer.uni-bayreuth.de (Oliver Archner) Date: Wed, 09 Aug 2006 14:13:36 +0200 Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() Message-ID: <44D9D170.5020806@bayceer.uni-bayreuth.de> Dear Users, i would like to send a byte to a parallel device. The following piece of code works well but throws an IOException in LPRPort$ParallelOutputStream.write() saying that everything is ok ?! Oliver import java.io.*; import gnu.io.*; public class Test { public static void main(String[] args) { RXTXCommDriver TxPort = new RXTXCommDriver(); ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", CommPortIdentifier.PORT_PARALLEL); OutputStream oStream = null; try { oStream = pPort.getOutputStream(); oStream.write((byte)0x51); } catch (IOException e) { e.printStackTrace(); } finally { try { if (oStream != null) oStream.close(); } catch (IOException e) { e.printStackTrace(); } } } } Output: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Der Vorgang wurde erfolgreich beendet. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at Test.main(Test.java:12) From tjarvi at qbang.org Thu Aug 10 18:12:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 18:12:27 -0600 (MDT) Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() In-Reply-To: <44D9D170.5020806@bayceer.uni-bayreuth.de> References: <44D9D170.5020806@bayceer.uni-bayreuth.de> Message-ID: On Wed, 9 Aug 2006, Oliver Archner wrote: > Dear Users, > > i would like to send a byte to a parallel device. > The following piece of code works well but throws an IOException in > LPRPort$ParallelOutputStream.write() saying that everything is ok ?! > > Oliver > > > import java.io.*; > import gnu.io.*; > > public class Test { > > public static void main(String[] args) { > RXTXCommDriver TxPort = new RXTXCommDriver(); > ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", > CommPortIdentifier.PORT_PARALLEL); > OutputStream oStream = null; > try { > oStream = pPort.getOutputStream(); > oStream.write((byte)0x51); > } catch (IOException e) { > e.printStackTrace(); > } finally { > try { > if (oStream != null) oStream.close(); > } catch (IOException e) { > e.printStackTrace(); > > } > } > > } > } > > Output: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Der Vorgang wurde erfolgreich beendet. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at Test.main(Test.java:12) WriteFile is returning a negative value or 0. I do not know what that exception is saying but it should be an IO Exception. The native code in question is line 405 in ParallelImp.c. If you find the documentation pointing out how the code is wrong, we can fix it. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 08:12:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 09:12:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question Message-ID: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Hello, I'm trying to send data over a serial port using the RXTX libraries. I've got the binaries for Windows XP from qbang.org. On the receiving side, I'm using event notification (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial Ports InputStream. Similarly on the transmist side, I use SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. First question: does this make sense? The code was largely adopted from an existing Windows C++ program and that's more or less how it operated (overlapped io using ReadFile, WriteFile, GetOverlappedResult, Events, etc). Second question: in a small standalone test program I wrote, everything seems to work just fine - whenever SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good chunk of data available (I explicitly set the in/out buffers to 1024 bytes) to read. However, when I pull my "library" into a much larger environment (OSGI framework based, but same JVM/OS/etc), whenever SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a byte or two available. Needless to say, this really kills performance. Everything appears to still operate properly, just really, really slowly. So, has anyone seen this problem before? I haven't dived into the details of RXTX library, and I'm wondering what the mechanism is here? How does the RXTX thread determine when to issue the SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to tweak in RXTX or the JVM to get this to operate more like the small test program? Seems like I want RXTX to call me back _less_ often. Thanks, Pete From tjarvi at qbang.org Fri Aug 11 09:55:23 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 09:55:23 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Hello, > > I'm trying to send data over a serial port using the RXTX > libraries. I've got the binaries for Windows XP from qbang.org. > > On the receiving side, I'm using event notification > (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial > Ports InputStream. Similarly on the transmist side, I use > SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. > > First question: does this make sense? The code was largely adopted > from an existing Windows C++ program and that's more or less how it > operated (overlapped io using ReadFile, WriteFile, > GetOverlappedResult, Events, etc). > > Second question: in a small standalone test program I wrote, > everything seems to work just fine - whenever > SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good > chunk of data available (I explicitly set the in/out buffers to 1024 > bytes) to read. > > However, when I pull my "library" into a much larger environment > (OSGI framework based, but same JVM/OS/etc), whenever > SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a > byte or two available. Needless to say, this really kills > performance. Everything appears to still operate properly, just > really, really slowly. > > So, has anyone seen this problem before? I haven't dived into the > details of RXTX library, and I'm wondering what the mechanism is here? > How does the RXTX thread determine when to issue the > SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to > tweak in RXTX or the JVM to get this to operate more like the small > test program? > Seems like I want RXTX to call me back _less_ often. > Hi Pete RXTX is doing overlapped IO in termios.c. In this file we map the windows functionality to termios (mostly POSIX). From there, we just talk termios to all platforms. What I guess is happening is the eventloop is waiting a specified amount of time. As you application uses more cpu cycles, you observe the difference in behavior. You could go into the C code and change this after looking at the eventLoop() code in serialImp.c and following that to the serial_ioctl() and serial_select() in termios.c Another option is to go into RXTXPort.java and put a sleep in the sendEvent() code. This way you would not have to recompile the native code (not very easy at this point). -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 13:27:36 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:27:36 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > Another option is to go into RXTXPort.java and put a sleep in the > sendEvent() code. This way you would not have to recompile the native > code (not very easy at this point). Are the instructions in the INSTALL file still valid? If so, it wasn't very hard to build it (I already had MinGW installed). Everything seemed to build just fine. Haven't tried to install/use it yet, but it wasn't a big deal (assuming those instructions were correct. Thanks, Pete From pete.flugstad at gmail.com Fri Aug 11 13:42:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:42:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, but there doesn't appear to be a way to select that via RXTX (which appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control is selected). Is there a way I'm not seeing? Thanks, Pete From eddythejekyll at gmail.com Fri Aug 11 15:20:44 2006 From: eddythejekyll at gmail.com (Ed) Date: Fri, 11 Aug 2006 15:20:44 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion Message-ID: I'm trying to read and write a parallel port on a standard (Dell) pc running RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. I'm having problems getting rxtx to return a port enumeration from getPortIdentifiers. I'm using a file PortChooser.java as a test file to get things going. This is from the Java CookBook 2nd edition (Chapter 12). The call // get list of ports available on this particular computer, // by calling static method in CommPortIdentifier. Enumeration pList = CommPortIdentifier.getPortIdentifiers(); returns a null pList; I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and compile without --disable-lockfiles I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ... When I compile with --disable-lockfiles the call to getPortIdentifiers simply returns a null Enumeration. I've read the documention and threads about this issue and I feel like I've tried everything, so at the moment I'm stumped. I can supply any further info that may help. Thanks in advance. Ed -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060811/80c4eeec/attachment-0319.html From tjarvi at qbang.org Fri Aug 11 18:29:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:29:48 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > On 8/11/06, Trent Jarvi wrote: >> Another option is to go into RXTXPort.java and put a sleep in the >> sendEvent() code. This way you would not have to recompile the native >> code (not very easy at this point). > > Are the instructions in the INSTALL file still valid? If so, it > wasn't very hard to build it > (I already had MinGW installed). Everything seemed to build just > fine. Haven't tried to install/use it yet, but it wasn't a big deal > (assuming those instructions were correct. > Hi Pete The instructions are correct. You will want to make sure that the exports worked. If the library does not work properly, then the exports failed. The exports are currently generated with nm, sed and grep in the Makefile which is often commented out. If the def file is old, it will cause problems. You should be good to go then. Look at the serial_select and eventLoop code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:33:32 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:33:32 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > but there doesn't appear to be a way to select that via RXTX (which > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > is selected). > > Is there a way I'm not seeing? > Hi Pete I'm guessing I didn't know the difference. At the time, I really didn't have windows API documentation. I just had some pages I found with altivista/google. Later microsoft made their documentation available on msdn or I learned about it. For rxtx, the calls need to be platform neutral. So if you see how to do each in termios, then we can get it going. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:45:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:45:24 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Fri, 11 Aug 2006, Ed wrote: > I'm trying to read and write a parallel port on a standard (Dell) pc running > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. > > I'm having problems getting rxtx to return a port enumeration from > getPortIdentifiers. I'm using a file > PortChooser.java as a test file to get things going. This is from the Java > CookBook 2nd edition (Chapter 12). The call > > // get list of ports available on this particular computer, > // by calling static method in CommPortIdentifier. > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > returns a null pList; > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and > compile without --disable-lockfiles I get: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > ... > > When I compile with --disable-lockfiles the call to getPortIdentifiers > simply returns a null Enumeration. > > I've read the documention and threads about this issue and I feel like I've > tried everything, so at the moment I'm stumped. > > I can supply any further info that may help. > > Thanks in advance. > > Ed > Hi Ed You may want to check the permissions of /dev/lp*. Also make sure lp or your kernel support for lp is loaded. It should show up in dmesg and lsmod. For my laptop with no printer port enabled in BIOS is see: lp: driver loaded but no devices found in desg |grep lp [] $ ls -l /dev/lp* crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 here root and group lp can read and write. Normal users cannot. Try a simple read as a user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: Permission denied Fix as root [] chmod 666 /dev/lp* [] $ ls -l /dev/lp* crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 Now as user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: No such device or address So this is saying there is no lp0 on my laptop. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:58:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:58:31 -0600 (MDT) Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat In-Reply-To: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> References: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Message-ID: On Wed, 9 Aug 2006, Jim Owen wrote: > Hi All, > > I've run into some difficulties with rxtx that have me baffled and need > some help. > > I have an application that has used earlier versions of rxtx > successfully and on a variety of platforms. We recently needed to deploy > this application into an environment where we could not utilize lock files. > > I pulled down the 2.0.7 pre1 source distribution and executed configure > with --disable-lockfiles. I then executed make and make install. > > When I execute the program, as root, I get the following error: > > ************************************************************************ > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) > # Problematic frame: > # C 0x00001004 > # > # An error report file with more information is saved as hs_err_pid20151.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > **************************************************************************** > > If I execute as a normal user, I get no errors, but no ports listed: > (Using an earlier version, I get a serial and parallel port listed.) > > **************************************************************************** > [jim at linuxDev ingenicoApp]$ java VerifyCommBuild > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Some ports appear to have been found, let's try to enumerate them. > Complete. > **************************************************************************** > > When I built rxtx, there was a warning given of the following: > > **************************************************************************** > conftest.c: In function 'main': > conftest.c:6: warning: incompatible implicit declaration of built-in > function 'printf' > conftest.c:7: warning: incompatible implicit declaration of built-in > function 'exit' > > WARNING: Kernel include files do not match the current kernel > **************************************************************************** > > > uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 > Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux > > JAVA_HOME=/usr/java/j2sdk1.4.2_11 > > javax.comm.properties: Driver=gnu.io.RXTXCommDriver > > Here's the code for VerifyCommBuild.java that I'm using to test: > > > **************************************************************************** > import javax.comm.*; > import java.util.Enumeration; > /** > * A quick app to check that the javax.comm (Serial) Communications > extension has been properly > * installed and configured on this machine. > * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. > */ > public class VerifyCommBuild > { > public static void main(String args[]) > { > Enumeration ports; > System.out.println("Verifying Comm Build Environment"); > try > { > ports = CommPortIdentifier.getPortIdentifiers(); > if (ports == null) > { > System.out.println("No comm ports found!"); > return; > } > System.out.println("Some ports appear to have been found, let's > try to enumerate them."); > while (ports.hasMoreElements()) > { > System.out.println("Here is a port [" + > ((CommPortIdentifier)ports.nextElement()).getName() > + "]"); > } > } catch (Exception e) > { > System.out.println("Failed to enumerate ports [" + > e.getMessage() + "]"); > e.printStackTrace(); > } > System.out.println("Complete."); > } > } > Hi Jim This is a new one to me. Have you tried it on another system. Maybe something isnt sane in your toolchain. -- Trent Jarvi tarvi at qbang.org From eddythejekyll at gmail.com Sat Aug 12 11:45:39 2006 From: eddythejekyll at gmail.com (Ed) Date: Sat, 12 Aug 2006 11:45:39 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Trent, Right after I sent the results indicated below I re-ran the app and it apparently found the parallel port. The difference was that I set the permissions to : /dev: wildcard lp* crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 I'm still not sure how to interpret the dmesg and lsmod before. However I'm thinking that since the user now has permission to access the lp* port, a request to access it loaded the lp and parport modules automatically and allowed me access. Here's the output of lsmod now: ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp lp 5540 0 (autoclean) parport 21608 1 (autoclean) [parport_pc lp] and dmesg: ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp On node 0 totalpages: 161776 lp0: using parport0 (polling). So I think I'm good, and ready to move on the next steps. Thanks Trent! Ed On 8/12/06, Ed wrote: > > Thanks for the reply Trent. > > I'm on a different system today but am trying your suggestons. This is a > debian 3.1r2 system and I'm running jdk 1.5.0_04. > > Take a look below, but I think I have no parallel port support on this > kernel, however I never get the "No such device or address" return from the > cat call as you did so I'm not sure how to interpret the results. > > When I run the test program (PortChooser.java), the getPortIdentifiers > call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is > more than I found on the RedHat system. Incidently --disable-lockfiles has > no effect. > > It looks as though there is no parallel support in this kernel: > falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > On node 0 totalpages: 161776 > falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > > I'm a little confused by the results when I cat to the lp0 device. It > seems from the dmesg output that I don't have parallel printer support, but > when I cat to the lp0 device, I get permission denied if I'm non-root user > and input/output error if I'm root. Apparently this means I have the device, > but no support in the kernel? > > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > ed at falcon:~/src/workspace/EASServer/src$ su > Password: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > > Here's my lp* device permissions. > /dev: > wildcard lp* > crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > If I change it to > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I get: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > falcon:/home/ed/src/workspace/EASServer/src# exit > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > cat: /dev/lp0: Input/output error > ed at falcon:~/src/workspace/EASServer/src$ > > What do you think? Should I recompile the kernel or is it something else? > > By the way, I added the user ed to the lp and uucp groups on this system. > > Thanks again, > > Ed > > On 8/11/06, Trent Jarvi wrote: > > > > On Fri, 11 Aug 2006, Ed wrote: > > > > > I'm trying to read and write a parallel port on a standard (Dell) pc > > running > > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > > gates. > > > > > > I'm having problems getting rxtx to return a port enumeration from > > > getPortIdentifiers. I'm using a file > > > PortChooser.java as a test file to get things going. This is from the > > Java > > > CookBook 2nd edition (Chapter 12). The call > > > > > > // get list of ports available on this particular computer, > > > // by calling static method in CommPortIdentifier. > > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > > > > > returns a null pList; > > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure > > and > > > compile without --disable-lockfiles I get: > > > > > > Stable Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7 > > > Java lib Version = RXTX-2.1-7 > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > ... > > > > > > When I compile with --disable-lockfiles the call to getPortIdentifiers > > > > > simply returns a null Enumeration. > > > > > > I've read the documention and threads about this issue and I feel like > > I've > > > tried everything, so at the moment I'm stumped. > > > > > > I can supply any further info that may help. > > > > > > Thanks in advance. > > > > > > Ed > > > > > > > Hi Ed > > > > You may want to check the permissions of /dev/lp*. Also make sure lp or > > your kernel support for lp is loaded. It should show up in dmesg and > > lsmod. > > > > For my laptop with no printer port enabled in BIOS is see: > > > > lp: driver loaded but no devices found > > > > in desg |grep lp > > > > [] $ ls -l /dev/lp* > > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > here root and group lp can read and write. Normal users cannot. > > > > Try a simple read as a user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > > > > Fix as root > > > > [] chmod 666 /dev/lp* > > [] $ ls -l /dev/lp* > > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > Now as user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: No such device or address > > > > So this is saying there is no lp0 on my laptop. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > > > -- > > Ed > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060812/c2afe1f8/attachment-0318.html From tjarvi at qbang.org Sat Aug 12 14:01:52 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 12 Aug 2006 14:01:52 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Remember that the lp code expects a printer - or something like it. There is a line that specifies the printer is online. If you are doing hobby work, you will need to raise that line or loop it back to something that is raised. If you just try reading a port with no device connected and online, there will be an error while trying to read. This should be addressed in the mail-list archives. On Sat, 12 Aug 2006, Ed wrote: > Trent, > Right after I sent the results indicated below I re-ran the app and it > apparently found the parallel port. The difference was that I set the > permissions to : > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I'm still not sure how to interpret the dmesg and lsmod before. However I'm > thinking that since the user now has permission to access the lp* port, a > request to access it loaded the lp and parport modules automatically and > allowed me access. Here's the output of lsmod now: > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > lp 5540 0 (autoclean) > parport 21608 1 (autoclean) [parport_pc lp] > > and dmesg: > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > On node 0 totalpages: 161776 > lp0: using parport0 (polling). > > So I think I'm good, and ready to move on the next steps. > > Thanks Trent! > > Ed > > > On 8/12/06, Ed wrote: >> >> Thanks for the reply Trent. >> >> I'm on a different system today but am trying your suggestons. This is a >> debian 3.1r2 system and I'm running jdk 1.5.0_04. >> >> Take a look below, but I think I have no parallel port support on this >> kernel, however I never get the "No such device or address" return from the >> cat call as you did so I'm not sure how to interpret the results. >> >> When I run the test program (PortChooser.java), the getPortIdentifiers >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is >> more than I found on the RedHat system. Incidently --disable-lockfiles has >> no effect. >> >> It looks as though there is no parallel support in this kernel: >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp >> On node 0 totalpages: 161776 >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp >> >> I'm a little confused by the results when I cat to the lp0 device. It >> seems from the dmesg output that I don't have parallel printer support, but >> when I cat to the lp0 device, I get permission denied if I'm non-root user >> and input/output error if I'm root. Apparently this means I have the >> device, >> but no support in the kernel? >> >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> >> cat: /dev/lp0: Permission denied >> ed at falcon:~/src/workspace/EASServer/src$ su >> Password: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> >> Here's my lp* device permissions. >> /dev: >> wildcard lp* >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> If I change it to >> /dev: >> wildcard lp* >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> I get: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> falcon:/home/ed/src/workspace/EASServer/src# exit >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> ed at falcon:~/src/workspace/EASServer/src$ >> >> What do you think? Should I recompile the kernel or is it something else? >> >> By the way, I added the user ed to the lp and uucp groups on this system. >> >> Thanks again, >> >> Ed >> >> On 8/11/06, Trent Jarvi wrote: >> > >> > On Fri, 11 Aug 2006, Ed wrote: >> > >> > > I'm trying to read and write a parallel port on a standard (Dell) pc >> > running >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the >> > gates. >> > > >> > > I'm having problems getting rxtx to return a port enumeration from >> > > getPortIdentifiers. I'm using a file >> > > PortChooser.java as a test file to get things going. This is from the >> > Java >> > > CookBook 2nd edition (Chapter 12). The call >> > > >> > > // get list of ports available on this particular computer, >> > > // by calling static method in CommPortIdentifier. >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); >> > > >> > > returns a null pList; >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure >> > and >> > > compile without --disable-lockfiles I get: >> > > >> > > Stable Library >> > > ========================================= >> > > Native lib Version = RXTX-2.1-7 >> > > Java lib Version = RXTX-2.1-7 >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > ... >> > > >> > > When I compile with --disable-lockfiles the call to getPortIdentifiers >> > >> > > simply returns a null Enumeration. >> > > >> > > I've read the documention and threads about this issue and I feel like >> > I've >> > > tried everything, so at the moment I'm stumped. >> > > >> > > I can supply any further info that may help. >> > > >> > > Thanks in advance. >> > > >> > > Ed >> > > >> > >> > Hi Ed >> > >> > You may want to check the permissions of /dev/lp*. Also make sure lp or >> > your kernel support for lp is loaded. It should show up in dmesg and >> > lsmod. >> > >> > For my laptop with no printer port enabled in BIOS is see: >> > >> > lp: driver loaded but no devices found >> > >> > in desg |grep lp >> > >> > [] $ ls -l /dev/lp* >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > here root and group lp can read and write. Normal users cannot. >> > >> > Try a simple read as a user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: Permission denied >> > >> > Fix as root >> > >> > [] chmod 666 /dev/lp* >> > [] $ ls -l /dev/lp* >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > Now as user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: No such device or address >> > >> > So this is saying there is no lp0 on my laptop. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > >> >> >> >> -- >> >> Ed >> > > > > From pete.flugstad at gmail.com Mon Aug 14 07:51:41 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 08:51:41 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: <84d4a6d50608140651h3cb2266ap90c47780abace00@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > On Fri, 11 Aug 2006, Pete Flugstad wrote: > > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > > but there doesn't appear to be a way to select that via RXTX (which > > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > > is selected). > > I'm guessing I didn't know the difference. At the time, I really didn't > have windows API documentation. I just had some pages I found with > altivista/google. Later microsoft made their documentation available on > msdn or I learned about it. > > For rxtx, the calls need to be platform neutral. So if you see how to do > each in termios, then we can get it going. so, RTSCTS_IN/OUT at the COMM API is mapped to HARDWARE_FLOW_CONTROL in the POSIX layer. Which termios.c maps to RTS_CONTROL_HANDSHAKE and fOutxCtsFlow = true. Since termios.c is Windows only anway... Would it work to change the mapping in termios.c to map hardware flow control to RTS_CONTROL_TOGGLE? I just wondering (I'm going to go look, but there's a lot of code in there) if the code does anything special playing with flow control signals? Thanks, Pete From pete.flugstad at gmail.com Mon Aug 14 09:42:48 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 10:42:48 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> On 8/3/06, Trent Jarvi wrote: > On Thu, 3 Aug 2006, Pete Flugstad wrote: > > Okay, I can understand that, but from the PORTMON output, it looks > > like it's opening each port TWICE: > > I think this problem is in RXTXCommDriver.java. I've just not tracked it > down but it should be in the java code, not the native code so easy > enough to track down. Okay, I'm trying to track this down... Looks like the CommPortIdentifier static initializer loads RXTXCommDriver, and then calls RXTXDriver.initialize. But then CommPortIdentifier.getPortIdentifiers does the exact same thing. So that's where the two scans are coming from. I would guess that one or the other can be removed? Probably the one in the CommPortIdentifier.getPortIdentifiers? Doing so removes the 2nd scan. Pete PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) val = System.getProperty("gnu.io.SerialPorts"); Shouldn't the comparison be != null? getProperty returns null if the variable is NOT found, and you only want to assign to val if it IS found, right? Same thing for the parallel port case. End result is the same I guess, since you check for null later, but probably should be fixed. From eddythejekyll at gmail.com Mon Aug 14 11:55:17 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 11:55:17 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: When I try to get the mode with int mode = pPort.getMode(); it returns 0 which isn't any of the valid modes. I tried setting it explicitely with pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced the requested mode in nativeSetSerialPortParams at gnu.io.LPRPort.setLPRMode(Native Method) at gnu.io.LPRPort.setMode(LPRPort.java:87) Except for LPT_MODE_ANY, but the getMode call still failed out with an invalid state. I'm wondering if it's because I don't have the line pulled high like you said. This isn't a printer connected. It's a relay board with pins 2-9 tied to data, and 18-25 to gnd. The rest are open. I looked at a DB25 pinout diagram and I'm not sure which pin I need to tie high, and I looked through the archives, but didn't find a reference to something definitive. Can someone help me with which pin is the "online" pin as Trent mentioned? DB25 spec has ( I hope this formats correctly in this email) BUSY (11), SEL (13) or INIT (16) are candidates, but I'm guessing. Any clues? *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Thanks, Ed On 8/12/06, Trent Jarvi wrote: > > > Remember that the lp code expects a printer - or something like it. There > is a line that specifies the printer is online. If you are doing hobby > work, you will need to raise that line or loop it back to something that > is raised. > > If you just try reading a port with no device connected and online, there > will be an error while trying to read. This should be addressed in the > mail-list archives. > > On Sat, 12 Aug 2006, Ed wrote: > > > Trent, > > Right after I sent the results indicated below I re-ran the app and it > > apparently found the parallel port. The difference was that I set the > > permissions to : > > /dev: > > wildcard lp* > > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > > > I'm still not sure how to interpret the dmesg and lsmod before. However > I'm > > thinking that since the user now has permission to access the lp* port, > a > > request to access it loaded the lp and parport modules automatically and > > allowed me access. Here's the output of lsmod now: > > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > > lp 5540 0 (autoclean) > > parport 21608 1 (autoclean) [parport_pc lp] > > > > and dmesg: > > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > > On node 0 totalpages: 161776 > > lp0: using parport0 (polling). > > > > So I think I'm good, and ready to move on the next steps. > > > > Thanks Trent! > > > > Ed > > > > > > On 8/12/06, Ed wrote: > >> > >> Thanks for the reply Trent. > >> > >> I'm on a different system today but am trying your suggestons. This is > a > >> debian 3.1r2 system and I'm running jdk 1.5.0_04. > >> > >> Take a look below, but I think I have no parallel port support on this > >> kernel, however I never get the "No such device or address" return from > the > >> cat call as you did so I'm not sure how to interpret the results. > >> > >> When I run the test program (PortChooser.java), the getPortIdentifiers > >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this > is > >> more than I found on the RedHat system. Incidently --disable-lockfiles > has > >> no effect. > >> > >> It looks as though there is no parallel support in this kernel: > >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > >> On node 0 totalpages: 161776 > >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > >> > >> I'm a little confused by the results when I cat to the lp0 device. It > >> seems from the dmesg output that I don't have parallel printer support, > but > >> when I cat to the lp0 device, I get permission denied if I'm non-root > user > >> and input/output error if I'm root. Apparently this means I have the > >> device, > >> but no support in the kernel? > >> > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> > >> cat: /dev/lp0: Permission denied > >> ed at falcon:~/src/workspace/EASServer/src$ su > >> Password: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> > >> Here's my lp* device permissions. > >> /dev: > >> wildcard lp* > >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> If I change it to > >> /dev: > >> wildcard lp* > >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> I get: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> falcon:/home/ed/src/workspace/EASServer/src# exit > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> ed at falcon:~/src/workspace/EASServer/src$ > >> > >> What do you think? Should I recompile the kernel or is it something > else? > >> > >> By the way, I added the user ed to the lp and uucp groups on this > system. > >> > >> Thanks again, > >> > >> Ed > >> > >> On 8/11/06, Trent Jarvi wrote: > >> > > >> > On Fri, 11 Aug 2006, Ed wrote: > >> > > >> > > I'm trying to read and write a parallel port on a standard (Dell) > pc > >> > running > >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > >> > gates. > >> > > > >> > > I'm having problems getting rxtx to return a port enumeration from > >> > > getPortIdentifiers. I'm using a file > >> > > PortChooser.java as a test file to get things going. This is from > the > >> > Java > >> > > CookBook 2nd edition (Chapter 12). The call > >> > > > >> > > // get list of ports available on this particular computer, > >> > > // by calling static method in CommPortIdentifier. > >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > >> > > > >> > > returns a null pList; > >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I > configure > >> > and > >> > > compile without --disable-lockfiles I get: > >> > > > >> > > Stable Library > >> > > ========================================= > >> > > Native lib Version = RXTX-2.1-7 > >> > > Java lib Version = RXTX-2.1-7 > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > ... > >> > > > >> > > When I compile with --disable-lockfiles the call to > getPortIdentifiers > >> > > >> > > simply returns a null Enumeration. > >> > > > >> > > I've read the documention and threads about this issue and I feel > like > >> > I've > >> > > tried everything, so at the moment I'm stumped. > >> > > > >> > > I can supply any further info that may help. > >> > > > >> > > Thanks in advance. > >> > > > >> > > Ed > >> > > > >> > > >> > Hi Ed > >> > > >> > You may want to check the permissions of /dev/lp*. Also make sure lp > or > >> > your kernel support for lp is loaded. It should show up in dmesg and > >> > lsmod. > >> > > >> > For my laptop with no printer port enabled in BIOS is see: > >> > > >> > lp: driver loaded but no devices found > >> > > >> > in desg |grep lp > >> > > >> > [] $ ls -l /dev/lp* > >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > here root and group lp can read and write. Normal users cannot. > >> > > >> > Try a simple read as a user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: Permission denied > >> > > >> > Fix as root > >> > > >> > [] chmod 666 /dev/lp* > >> > [] $ ls -l /dev/lp* > >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > Now as user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: No such device or address > >> > > >> > So this is saying there is no lp0 on my laptop. > >> > > >> > -- > >> > Trent Jarvi > >> > tjarvi at qbang.org > >> > > >> > >> > >> > >> -- > >> > >> Ed > >> > > > > > > > > > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/59164078/attachment-0316.html From eddythejekyll at gmail.com Mon Aug 14 14:19:58 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 14:19:58 -0600 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? Message-ID: I'm using the ParallelPort class to drive a relay board. According to Mr. Jarvi, since this board isn't a printer, there will be a read error unless I hold the "printer online" line high in order to make the API think I'm talking to a printer. The problem is, I can't figure out which line is the "printer online". My DB25 spec lists the following: *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Anyone know which one I should tie high? I tried the busy line and it still errored out on the read. Thanks in advance, -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/66cf3c3e/attachment-0316.html From tjarvi at qbang.org Mon Aug 14 18:06:29 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:06:29 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Mon, 14 Aug 2006, Ed wrote: > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > which isn't any of the valid modes. I tried setting it explicitely with > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced > the requested mode in nativeSetSerialPortParams > at gnu.io.LPRPort.setLPRMode(Native Method) > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > invalid state. This is because rxtx only supports the basics. JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } One could program in more support. When I did that I just had a daisy wheel printer to test with and doing any more would have been blind. So that behavior is expected. I'll look to see if the Parallel Complete book mentions which pins you need to raise. If you look in the source code [ParallelImp.c] you can see this code isn't well tested. It has worked for hobby use in the past as I'd guess you are trying to do. But my experience with the code is as is mentioned in the top of the source: /* fear he who enter here. It appears that things have changed. An attempt has been made to put things the way the should be. It compiles and ParallelBlackBox runs. No further guarantees. Well... One.. it will print "Hello World!" on an epson DX 10 printer. you know.. the 10 character per second daisy wheel printer ;) - Trent Jarvi */ That comment is from 1997 or so. Since then some windows support was contributed but it is still very green code. We get about four requests for parallel support a year so its just not a well traveled area. It would be nice to have some documentation for the people trying to hook parallel ports to electronic projects. That appears to be the exclusive use of the Parallel support. The wiki pages are intended to let people share information like this to help each other in their projects as they figure out the details. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Aug 14 18:40:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:40:40 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: > PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): > > if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) > val = System.getProperty("gnu.io.SerialPorts"); > > Shouldn't the comparison be != null? getProperty returns null if the > variable is NOT found, and you only want to assign to val if it IS > found, right? Same thing for the > parallel port case. End result is the same I guess, since you check > for null later, > but probably should be fixed. I think this is just a fallback to the second property. gnu.io.SerialPorts isn't documented but perhaps it is used. It should behave properly as documented in INSTALL. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 14 18:56:55 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 19:56:55 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: <44E11BD7.5030102@gmail.com> Trent Jarvi wrote: >> PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): >> >> if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) >> val = System.getProperty("gnu.io.SerialPorts"); >> > > I think this is just a fallback to the second property. > gnu.io.SerialPorts isn't documented but perhaps it is used. It should > behave properly as documented in INSTALL. Doh - yup, I missed the fact that the property names were different... Pete From berkland at spamcop.net Mon Aug 14 19:58:21 2006 From: berkland at spamcop.net (Doug Berkland) Date: Mon, 14 Aug 2006 21:58:21 -0400 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? In-Reply-To: References: Message-ID: <269e40090608141858g698c2579v8d962deca3f4df53@mail.gmail.com> Based on memory and this page as confirmation, I would say pin 13 is the "Online" pin for SPP (standard parallel port). http://www.quatech.com/support/comm-over-parallel.php On 8/14/06, Ed wrote: > > I'm using the ParallelPort class to drive a relay board. According to Mr. > Jarvi, since this board isn't a printer, there will be a read error unless I > hold the "printer online" line high in order to make the API think I'm > talking to a printer. The problem is, I can't figure out which line is the > "printer online". My DB25 spec lists the following: > > *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and > Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data > Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 > D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select > 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select > In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit > 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 > Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and > Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground > > Anyone know which one I should tie high? I tried the busy line and it > still errored out on the read. > > Thanks in advance, > > -- > Ed > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/842bb770/attachment-0316.html From eddythejekyll at gmail.com Mon Aug 14 20:25:42 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 20:25:42 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Ah, I see. I've seen the caveats about limited Parallel support, but I thought it was mainly about the javax.comm package. The gnu.io is derived from javax.comm package right? That is, is the parallel support in rxtx is a superset of what's in javax.comm? I'm using this not for hobby usage, but for some simple instrumenation and control. If the project mandates it, I'll gladly work on extending the support. In the meantime, I need to get some sanity checks working, and repair my relay board (I smoked the ULN2803 chip, apparently by tying the BUSY (pin 11) to vcc). I guess I'll try the SEL pin next (and a supply of 2803s) with a ~1K pullup. The caveat in the comment block isn't very encouraging (!), but I borrowed an old Epson Stylus Color 600 printer to see what I can do. If I can write out characters to it I'll be happy. Parallel printers aren't easy to find these days. I haven't yet looked at the native source, yet, but I've just imported it into eclipse and I'll surf around a bit. Ed On 8/14/06, Trent Jarvi wrote: > > On Mon, 14 Aug 2006, Ed wrote: > > > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > > which isn't any of the valid modes. I tried setting it explicitely with > > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to > proced > > the requested mode in nativeSetSerialPortParams > > at gnu.io.LPRPort.setLPRMode(Native Method) > > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > > invalid state. > > This is because rxtx only supports the basics. > > JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > jclass jclazz, jint mode) > { > switch(mode) > { > case LPT_MODE_ANY: > break; > case LPT_MODE_SPP: > case LPT_MODE_PS2: > case LPT_MODE_EPP: > case LPT_MODE_ECP: > case LPT_MODE_NIBBLE: > default: > throw_java_exception( env, > UNSUPPORTED_COMM_OPERATION, > "nativeSetSerialPortParams", > "setLPRMode was unable to proced the > requested \ > mode" > ); > } > return(JNI_TRUE); > } > > One could program in more support. When I did that I just had a daisy > wheel printer to test with and doing any more would have been blind. > > So that behavior is expected. I'll look to see if the Parallel Complete > book mentions which pins you need to raise. If you look in the source > code [ParallelImp.c] you can see this code isn't well tested. It has > worked for hobby use in the past as I'd guess you are trying to do. But > my experience with the code is as is mentioned in the top of the source: > > /* > fear he who enter here. It appears that things have changed. An > attempt > has been made to put things the way the should be. > > It compiles and ParallelBlackBox runs. No further guarantees. > > Well... One.. it will print "Hello World!" on an epson DX 10 > printer. > you know.. the 10 character per second daisy wheel printer ;) > > - Trent Jarvi > */ > > That comment is from 1997 or so. > > Since then some windows support was contributed but it is still very green > code. We get about four requests for parallel support a year so its just > not a well traveled area. > > It would be nice to have some documentation for the people trying to hook > parallel ports to electronic projects. That appears to be the exclusive > use of the Parallel support. The wiki pages are intended to let people > share information like this to help each other in their projects as they > figure out the details. > > -- > Trent Jarvi > tjarvi at qbang.org > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/fbb5ddb4/attachment-0316.html From lyon at docjava.com Tue Aug 15 06:06:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 15 Aug 2006 08:06:27 -0400 Subject: [Rxtx] smoking is bad for your health In-Reply-To: References: Message-ID: Hi All, If you are connecting to the parallel port and smoking chips, it is time for extra stuff to buffer the parallel port. You may be want more current, in which case driver transistors are needed, or, if you are using the port as an output only device, you may like to add your own bus transceiver (e.g., 74245), set for output. Do be careful to design this properly; http://www.beyondlogic.org/spp/parallel.htm Some people like to use Octal D-type F.F's with OC outputs, like a 74374, http://upgrade.cntc.ac.kr/data/ttl/74374.html I like this one, as it has the D FF's and can latch the outputs for presentation to slower electronics (like relays). But careful! A relay that needs more current than the family of the device you have selected will look like a short to ground, and you will smoke your bug! And MOBO's do NOT come with the ability to drive any load you like. Check the power specs on your relay and be sure to protect the chip against back EMF with a diode. It is best to smoke test this on a bread board BEFORE hooking it to the computer. And be sure you smoke test the corner points in the ckt for a while, lest it fail in the field. - Doug >Ah, I see. I've seen the caveats about limited >Parallel support, but I thought it was mainly >about the javax.comm package. The >gnu.io is derived from javax.comm >package right? That is, is the parallel support >in rxtx is a superset of what's in javax.comm? > >I'm using this not for hobby usage, but for some >simple instrumenation and control. If the >project mandates it, I'll gladly work on >extending the support. In the meantime, I need >to get some sanity checks working, and repair my >relay board (I smoked the ULN2803 chip, >apparently by tying the BUSY (pin 11) to vcc). I >guess I'll try the SEL pin next (and a supply of >2803s) with a ~1K pullup. > >The caveat in the comment block isn't very >encouraging (!), ?but?I borrowed an old Epson >Stylus Color 600 printer to see what I can do. >?If I can write out characters to it I'll be >happy. Parallel printers aren't easy to find >these days. > > I haven't yet looked at the native source, yet, >but I've just imported it into eclipse and I'll >surf around a bit. > >Ed > >On 8/14/06, Trent Jarvi <tjarvi at qbang.org> wrote: > >On Mon, 14 Aug 2006, Ed wrote: > >> When I try to get the mode with int mode = pPort.getMode(); it returns 0 >> which isn't any of the valid modes. I tried setting it explicitely with >> pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with >> >> gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced >> the requested mode in nativeSetSerialPortParams >> at gnu.io.LPRPort.setLPRMode(Native Method) >> at gnu.io.LPRPort.setMode(LPRPort.java:87) >> >> Except for LPT_MODE_ANY, but the getMode call still failed out with an >> invalid state. > >This is because rxtx only supports the basics. > >JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > ???????jclass jclazz, jint mode) >{ > ???????switch(mode) > ???????{ > ???????????????case LPT_MODE_ANY: > ???????????????????????break; > ???????????????case LPT_MODE_SPP: > ???????????????case LPT_MODE_PS2: > ???????????????case LPT_MODE_EPP: > ???????????????case LPT_MODE_ECP: > ???????????????case LPT_MODE_NIBBLE: > ???????????????default: > ???????????????????????throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, > ???????????????????????????????"nativeSetSerialPortParams", > ???????????????????????????????"setLPRMode was >unable to proced the requested \ > ???????????????????????????????mode" > ???????????????????????); > ???????} > ???????return(JNI_TRUE); >} > >One could program in more support.??When I did that I just had a daisy >wheel printer to test with and doing any more would have been blind. > >So that behavior is expected.??I'll look to see if the Parallel Complete >book mentions which pins you need to raise.??If you look in the source >code [ParallelImp.c] you can see this code isn't well tested.??It has >worked for hobby use in the past as I'd guess you are trying to do.??But >my experience with the code is as is mentioned in the top of the source: > >/* > fear he who enter here.??It appears that things have changed.??An attempt > has been made to put things the way the should be. > > ???????It compiles and ParallelBlackBox runs.??No further guarantees. > > ???????Well... One.. it will print "Hello World!" on an epson DX 10 printer. > ???????you know.. the 10 character per second daisy wheel printer ;) > > ???????- Trent Jarvi >*/ > >That comment is from 1997 or so. > >Since then some windows support was contributed but it is still very green >code.??We get about four requests for parallel support a year so its just >not a well traveled area. > >It would be nice to have some documentation for the people trying to hook >parallel ports to electronic projects.??That appears to be the exclusive >use of the Parallel support.??The wiki pages are intended to let people >share information like this to help each other in their projects as they >figure out the details. > >-- >Trent Jarvi >tjarvi at qbang.org > > > > >-- >Ed > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 15 13:26:16 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 15 Aug 2006 14:26:16 -0500 Subject: [Rxtx] crash with too much memory Message-ID: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded from qbang.org. I'm exercising the RXTX COMM serial interface, both in a small standalone test and with the same code pulled into a large OSGI framework setup. If I use the stock .jar/.dll's, then everything works correctly in both situations. I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 (mingw-special)). If I use my locally built version, then my small test case works just fine, both when run inside Eclipse and when run standalone on the command line. However, when I try and use my locally built .jar/.dll's in the large framework environment, then I get a JVM crash with the attached log. Normally this would lead me to think that I was running out of memory or something in the large environment, and when I try and play with the JVM memory args, some interesting things show up. In our large environment, we have -Xms32M/-Xmx1024M - this appears to be the problem. If I set max to something like 64M, then things work. The cross over point from working to failing seems to be around 32M/110M (works) and 32M/111M (fails). But 128M/128M works while 128M/129M fails. So it seems to have to do with how much memory is actually available, or something like that. The thing that occurs to me is if my GCC is somehow generating something like "near" calls. But when the JVM has a lot of RAM available, it puts the DLL up somehwere in the address space and then the near calls fail - far calls are needed. So, I'm thinking this is probably a difference in the MinGW GCC I'm using and the one that was used to build the stock binaries from qbang, or maybe some command line args were changed? So, I'm hoping someone will have an idea of what's going on here... Thanks, Pete From tjarvi at qbang.org Tue Aug 15 18:54:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 15 Aug 2006 18:54:04 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: On Tue, 15 Aug 2006, Pete Flugstad wrote: > I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded > from qbang.org. > > I'm exercising the RXTX COMM serial interface, both in a small > standalone test and with the same code pulled into a large OSGI > framework setup. > > If I use the stock .jar/.dll's, then everything works correctly in > both situations. > > I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 > (mingw-special)). > > If I use my locally built version, then my small test case works just > fine, both when run inside Eclipse and when run standalone on the > command line. However, when I try and use my locally built > .jar/.dll's in the large framework environment, then I get a JVM crash > with the attached log. > > Normally this would lead me to think that I was running out of memory > or something in the large environment, and when I try and play with > the JVM memory args, some interesting things show up. > > In our large environment, we have -Xms32M/-Xmx1024M - this appears to > be the problem. If I set max to something like 64M, then things work. > The cross over point from working to failing seems to be around > 32M/110M (works) and 32M/111M (fails). > But 128M/128M works while 128M/129M fails. So it seems to have to do > with how much memory is actually available, or something like that. > > The thing that occurs to me is if my GCC is somehow generating > something like "near" calls. But when the JVM has a lot of RAM > available, it puts the DLL up somehwere in the address space and then > the near calls fail - far calls are needed. > > So, I'm thinking this is probably a difference in the MinGW GCC I'm > using and the one that was used to build the stock binaries from > qbang, or maybe some command line args were changed? > > So, I'm hoping someone will have an idea of what's going on here... > Hi Pete The binaries are from the src. They should be reproducable. I did extensive testing of rxtx several years ago using mingw as the compiler. The version was 2.95. I have not changed versions since. There are way too many variables as it is. I have a linux->mingw cross compiler rpm I use for all windows use. If you want a copy of it you can have it. It isn't anything 'special' :) -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Thu Aug 17 11:49:24 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 17 Aug 2006 12:49:24 -0500 Subject: [Rxtx] crash with too much memory In-Reply-To: References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> On 8/15/06, Trent Jarvi wrote: > I did extensive testing of rxtx several years ago using mingw as the > compiler. The version was 2.95. I have not changed versions since. > There are way too many variables as it is. FYI, I believe I've solved this problem by changing how the dll's were built. The original mingw makefile was generating Serial.def, then performing various operations with dlltool and ld. I modified the makefile to create the dll using this page: as a guide. With that, there's no longer any need to deal with Serial.def and the makefile becomes _much_ simpler. This appears to have addressed my problems with crashing. FWIW, GCC 2.95 is _really_ old - you should consider investigating upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is supposed to generate a native binary (i.e. just like MinGW). Thanks, Pete From claretlc at yahoo.com Thu Aug 17 12:34:48 2006 From: claretlc at yahoo.com (Clare Cooley) Date: Thu, 17 Aug 2006 11:34:48 -0700 (PDT) Subject: [Rxtx] parallel port communication Message-ID: <20060817183448.76911.qmail@web53908.mail.yahoo.com> Hi, I'm trying to write a 1 to a bit 15 on a parallel port cable that isn't attached to a printer.(It's a control box for eye-tracking equipment.)I need to do this in Java. I looked at the javax.comm documentation, and it said, "Application programs should not directly create ParallelPortEvent objects." So is there a way to do this with your package? If not, do you have any suggestions of where to look? It really needs to be done in Java. Thanks, Clare Cooley __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From pat at xvalheru.org Thu Aug 17 13:13:52 2006 From: pat at xvalheru.org (pat) Date: Thu, 17 Aug 2006 21:13:52 +0200 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060817190751.M5586@xvalheru.org> Hi there, I've question(s) for you. I need to communicate with scale, I've used the Sun's direver. Now I've switched to Rxtx and the speed of the communication is perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, but the difference between the crash time is 5 second ... . My question is: Is there a stable driver ??? Or what I have to do to have stable enough serial port driver ??? OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. Thanks to all for the help. Pat From tjarvi at qbang.org Fri Aug 18 05:13:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 05:13:42 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> Message-ID: On Thu, 17 Aug 2006, Pete Flugstad wrote: > On 8/15/06, Trent Jarvi wrote: >> I did extensive testing of rxtx several years ago using mingw as the >> compiler. The version was 2.95. I have not changed versions since. >> There are way too many variables as it is. > > FWIW, GCC 2.95 is _really_ old - you should consider investigating > upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is > supposed to generate a native binary (i.e. just like MinGW). > It is really old but also well known like C itself. I have considered upgrading. The ToyBox builds should be gcc 3* cross-compiled. I'm not going to be validating gcc 3* w32 binaries though. It's looking like we will need to focus support on MSFT's toolchain for 64 bit windows support until it is possible for gcc to support w64. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Aug 18 05:32:10 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 07:32:10 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: Hi All, Does anyone know how to produce mac intel binaries on a Fedora Linux box? Thanks! - Doug From tjarvi at qbang.org Fri Aug 18 06:42:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 06:42:05 -0600 (MDT) Subject: [Rxtx] cross compilation for the mac In-Reply-To: References: Message-ID: On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Does anyone know how to produce > mac intel binaries on a Fedora Linux > box? > > Thanks! > - Doug Hi Doug You need to build the cross toolchain which means copying the Darwin/Mac binaries over to fedora. It would be nontrivial but possible. Do the Darwin libraries work with Mac in general? I'm not aware of the licensing issues associated with grabbing Mac binaries. Same with OpenSolaris/Solaris. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Aug 18 08:15:26 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 10:15:26 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> In theory building against Darwin would be sufficient to getting things working on MacOS X. You need to remember that Darwin is the low-level OS, while MacOS X adds the everything else on top. IOKit, which is the I/O API, is available as part of Darwin. The only thing you will need extra are the Java libraries. One thing is that I would recommend that when producing binaries for the Mac, is to ensure they are Universal binaries (PPC+Intel). Andre > > From: Trent Jarvi > Date: 2006/08/18 Fri AM 08:42:05 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] cross compilation for the mac > > On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > > > Hi All, > > Does anyone know how to produce > > mac intel binaries on a Fedora Linux > > box? > > > > Thanks! > > - Doug > > Hi Doug > > You need to build the cross toolchain which means copying the Darwin/Mac > binaries over to fedora. It would be nontrivial but possible. > > Do the Darwin libraries work with Mac in general? I'm not aware of the > licensing issues associated with grabbing Mac binaries. > > Same with OpenSolaris/Solaris. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Aug 18 13:43:16 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 15:43:16 -0400 Subject: [Rxtx] cross compilation for the mac In-Reply-To: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: >In theory building against Darwin would be sufficient to getting >things working on MacOS X. You need to remember that Darwin is the >low-level OS, while MacOS X adds the everything else on top. IOKit, >which is the I/O API, is available as part of Darwin. The only thing >you will need extra are the Java libraries. > >One thing is that I would recommend that when producing binaries for >the Mac, is to ensure they are Universal binaries (PPC+Intel). > >Andre I find the xcode ide for generating a mix of universal binaries and java very difficult to make work. Is there a way to do this with make files? Thanks! - Doug From ajmas at sympatico.ca Fri Aug 18 13:54:55 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 15:54:55 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818195455.PGAP29052.tomts13-srv.bellnexxia.net@smtp1.sympatico.ca> It should be doable. XCode hands off the compilation process to gcc et al, for the compilation of C/C++ code and to javac et al. for the Java side. While ant is the favoured tool for 'automated' Java compilation, make can easily be used. All is needed is someone to volounteer to do the work. Andre "Dr. Douglas Lyon" wrote > > >In theory building against Darwin would be sufficient to getting > >things working on MacOS X. You need to remember that Darwin is the > >low-level OS, while MacOS X adds the everything else on top. IOKit, > >which is the I/O API, is available as part of Darwin. The only thing > >you will need extra are the Java libraries. > > > >One thing is that I would recommend that when producing binaries for > >the Mac, is to ensure they are Universal binaries (PPC+Intel). > > > >Andre > > I find the xcode ide for generating a mix of universal binaries > and java very difficult to make work. Is there a way to do this > with make files? > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Fri Aug 18 16:34:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 16:34:46 -0600 (MDT) Subject: [Rxtx] serial driver newbe question and problem In-Reply-To: <20060817190751.M5586@xvalheru.org> References: <20060817190751.M5586@xvalheru.org> Message-ID: On Thu, 17 Aug 2006, pat wrote: > Hi there, > > I've question(s) for you. I need to communicate with scale, I've used the > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > but the difference between the crash time is 5 second ... . > > My question is: Is there a stable driver ??? Or what I have to do to have > stable enough serial port driver ??? > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > Thanks to all for the help. > > Pat > Could you describe the hardware you have, the version of rxtx and provide the log of the crash? Did you download binaries? I've not been seeing a jvm crash with rxtx -- Trent Jarvi tjarvi at qbang.org From lunareclipse03 at web.de Sat Aug 19 12:11:48 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 19 Aug 2006 20:11:48 +0200 Subject: [Rxtx] Problem solved! Message-ID: <920065539@web.de> Hi everybody, I posted some months ago and asked about some help on my very special problem concerning my win32 port of a communications library. Now I just want to inform you that no further "mindstorming" is needed because I solved the problem by completely rewriting the win32 port of the library. Now everything works fine. Thank you all for your time and patience. --Sven Ahlemann __________________________________________________________________________ Erweitern Sie FreeMail zu einem noch leistungsst?rkeren E-Mail-Postfach! Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131 From ajmas at sympatico.ca Mon Aug 21 09:58:23 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 21 Aug 2006 11:58:23 -0400 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060821155823.TLSM18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Next time that happens, including a copy of the crash log, produced by Windows could probably help too. Andre Trent Jarvi wrote: > > On Thu, 17 Aug 2006, pat wrote: > > > Hi there, > > > > I've question(s) for you. I need to communicate with scale, I've used the > > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > > but the difference between the crash time is 5 second ... . > > > > My question is: Is there a stable driver ??? Or what I have to do to have > > stable enough serial port driver ??? > > > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > > > Thanks to all for the help. > > > > Pat > > > > Could you describe the hardware you have, the version of rxtx and > provide the log of the crash? Did you download binaries? > > I've not been seeing a jvm crash with rxtx > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From adrian.l.parker at gmail.com Thu Aug 24 09:10:39 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Thu, 24 Aug 2006 11:10:39 -0400 Subject: [Rxtx] Portability issues Message-ID: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use RXTX 2.0? Does it provide system librairies that javax.comm does not? I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, or 2000, or server 2003). Can this be done with a single implementation of RXTX? I don't want to have different versions of Java code that have different package names. References: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Message-ID: On Thu, 24 Aug 2006, Adrian Parker wrote: > Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use > RXTX 2.0? Does it provide system librairies that javax.comm does not? > > I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's > OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, > or 2000, or server 2003). Can this be done with a single implementation of > RXTX? I don't want to have different versions of Java code that have > different package names. > Hi Adrian. The native code can support all of the platforms you mention. I've never compiled for unixware or openunix but the patches are in the code. So you would need to compile for that target. >From there you would probably be best off going with rxtx 2.1 so you have all the classes in one package. You can opt to use rxtx 2.0 with Sun's commapi for Solaris v 2. The main differences are rxtx 2.1 comes with all the source/classes and is in package gnu.io while Sun's requires rxtx for some platforms but is in package javax.comm. The low level code is the same in either case as far as rxtx is concerned. -- Trent Jarvi tarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 04:12:52 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 06:12:52 -0400 Subject: [Rxtx] Serial.addEventListener bug? Message-ID: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on OpenServer 5.0.7). Its what Sun packages. I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an exception. It seems to throw the exception if no listener was previously declared (although I've not had chance to verify). Is this desireable behaviour? Sun's original API doesn't mention anything about an exception on this function, http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) Of course this is an old version of RXTX, so perhaps this has been changed. -- Adrian Parker Simulation Software Developer DLCSPM 4-4-3 (c) Building A31, CFB Kingston Tel: (613) 541-5010 x3020 CSN: 271-3020 Email: parker at lsec.dnd.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/22e2ea57/attachment-0306.html From tjarvi at qbang.org Fri Aug 25 05:15:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 25 Aug 2006 05:15:44 -0600 (MDT) Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: On Fri, 25 Aug 2006, Adrian Parker wrote: > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > OpenServer 5.0.7). Its what Sun packages. > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > exception. It seems to throw the exception if no listener was previously > declared (although I've not had chance to verify). > > Is this desireable behaviour? Sun's original API doesn't mention anything > about an exception on this function, > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > Of course this is an old version of RXTX, so perhaps this has been changed. > > > What exception was thrown? You can replace 1.4-8 with 2.0 for testing purposes. They are the same package. I doubt Sun shipped or packaged that. I think Caldera/SCOx/... did at one point. There may still be updates on their pages. I recall them sending patches here which are in current rxtx. -- Trent Jarvi tjarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 05:28:32 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 07:28:32 -0400 Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: <7da71e910608250428q32b86632g9a67b1b4efe69830@mail.gmail.com> On 8/25/06, Trent Jarvi wrote: > > On Fri, 25 Aug 2006, Adrian Parker wrote: > > > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > > OpenServer 5.0.7). Its what Sun packages. > > > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > > exception. It seems to throw the exception if no listener was > previously > > declared (although I've not had chance to verify). > > > > Is this desireable behaviour? Sun's original API doesn't mention > anything > > about an exception on this function, > > > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > > > Of course this is an old version of RXTX, so perhaps this has been > changed. > > > > > > > > What exception was thrown? Its weird. I catch an Exception. But when on that exception I call getClass().getName() I end up with a NullPointerException. You can replace 1.4-8 with 2.0 for testing > purposes. They are the same package. > > I doubt Sun shipped or packaged that. Doh! I meant to say SCO sorry. I was surfing Sun's site when I wrote that :) Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/e43aed3a/attachment-0306.html From sjudd at seas.upenn.edu Sat Aug 26 16:42:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Sat, 26 Aug 2006 18:42:09 -0400 Subject: [Rxtx] Mac commapi Message-ID: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? If so, where do I get it? Sun has various versions at http://www.sun.com/download/products.xml?id=43208d3d but they are for SolarisSparc, SolarisX86, Linux, and Generic. Do I use the Generic one? If so, read on; otherwise redirect me. While using the Generic version, my attempt to run the BlackBox sample program elicits a message saying it "can't find javax.comm.properties". I found a note in the rxtx.org HowTo (for Linux) saying to create this thing in /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties but where should it go on the Mac? After reading many versions of documentation around, and updates and revisions and re-authorings, I have worked my way into a state of confusion and high uncertainty. Please release me. sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060826/02d6b163/attachment-0276.html From tod at todbot.com Sat Aug 26 17:08:33 2006 From: tod at todbot.com (Tod E. Kurt) Date: Sat, 26 Aug 2006 16:08:33 -0700 Subject: [Rxtx] Mac commapi In-Reply-To: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Message-ID: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> You don't need Sun's CommAPI. You just need RXTX. Once you download RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and the native library is ("librxtxSerial.jnilib" on Mac OS X) via the standard methods. For instance, if you've placed those two files in a directory called 'rxtxlib' and you want to run a Java class called HelloWorld in the current directory, do the following: % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar HelloWorld On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? > If so, where do I get it? Sun has various versions at > http://www.sun.com/download/products.xml?id=43208d3d > but they are for SolarisSparc, SolarisX86, Linux, and Generic. > Do I use the Generic one? > If so, read on; otherwise redirect me. > > While using the Generic version, my attempt to run the BlackBox > sample program > elicits a message saying it "can't find javax.comm.properties". > I found a note in the rxtx.org HowTo (for Linux) saying to create > this thing in > /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties > but where should it go on the Mac? > > After reading many versions of documentation around, and updates > and revisions > and re-authorings, I have worked my way into a state of confusion > and high > uncertainty. Please release me. > > sj > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From sjudd at seas.upenn.edu Sun Aug 27 22:55:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Mon, 28 Aug 2006 00:55:09 -0400 Subject: [Rxtx] Mac commapi In-Reply-To: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> Message-ID: This was immensely helpful. Thank you, Tod. I wish it had been explicit somewhere in the documentation; it would have saved me 2 days of grief. One hugely valuable thing like this little set of instructions is that it implicitly lists all the hundreds of things you DON"T have to do. I know it seems obvious to those in the know, but every little bit of help on an arcane topic like this opens up the product to an exponentially wider group of dilettantes. I managed to get the SerialDemo program (from Sun) to work too. Hurrah! However, it required changing all the javax.comm references to gnu.io which I had heard of due to all my rambling readings. Is there not a demo program on rxtx.org already available that would not have needed this? BTW, the link on the Projects page for jPIC[Source] sends a *.hex file to a PIC 16F877 or similar chip... takes me to nowhere useful. I do not understand what the name "Toybox" is meant to imply. Thanks, sj On 2006 Aug 26, at 7:08 PM, Tod E. Kurt wrote: > You don't need Sun's CommAPI. You just need RXTX. Once you download > RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and > the native library is ("librxtxSerial.jnilib" on Mac OS X) via the > standard methods. > > For instance, if you've placed those two files in a directory called > 'rxtxlib' and you want to run a Java class called HelloWorld in the > current directory, do the following: > > % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar > HelloWorld > > > On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > >> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? >> If so, where do I get it? Sun has various versions at >> http://www.sun.com/download/products.xml?id=43208d3d >> but they are for SolarisSparc, SolarisX86, Linux, and Generic. >> Do I use the Generic one? >> If so, read on; otherwise redirect me. >> >> While using the Generic version, my attempt to run the BlackBox >> sample program >> elicits a message saying it "can't find javax.comm.properties". >> I found a note in the rxtx.org HowTo (for Linux) saying to create >> this thing in >> /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties >> but where should it go on the Mac? >> >> After reading many versions of documentation around, and updates >> and revisions and re-authorings, I have worked my way into a state >> of confusion and high uncertainty. Please release me. >> >> sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060827/b80d6389/attachment-0276.html From pete.flugstad at gmail.com Mon Aug 28 12:38:27 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 13:38:27 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE Message-ID: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Okay, my understanding is that originally, RTS meant "Request to Send" - the DTE (the PC) would assert this and the DCE (modem) would assert "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send data. This really only provided uni-directional flow control, from the PC to the modem. Now, as I understand it, the more modern usage of RTS is that it is used for the DTE to assert flow control back to the DCE - basically it means "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) raises this, then the DCE(modem) is free to send data to the DTE - this allows the DTE(PC) to exert flow control back towards the DCE(modem). This discussion is based on the Serial HOWTO from: and lots of other reading... Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which is defined as: > Enables RTS flow-control handshaking. The driver raises the RTS line, > enabling the DCE to send, when the input buffer has enough room to > receive data. The driver lowers the RTS line, preventing the DCE to > send, when the input buffer does not have enough room to receive > data. If this value is used, it is an error for the application to adjust > the line with EscapeCommFunction. which clearly reflects the newer usage style - it keeps the RTS line high as long as there is space to _receive_ data. And takes it low when the receive/input buffer is getting full to stop the modem from sending it data. Does this jive with other peoples understanding of RTS usage? Unfortunately, the hardware I'm trying to talk to wants to use the OLD style of RTS line usage. An existing Windows C++ program uses RTS_CONTROL_TOGGLE, which documentation states: > Specifies that the RTS line will be high if bytes are available for transmission. > After all buffered bytes have been sent, the RTS line will be low. If this value is > set, it would be an error for an application to adjust the line with > EscapeCommFunction. This value is ignored in Windows 95; it causes the > driver to act as if RTS_CONTROL_ENABLE were specified. This seems to be the OLD RTS behavior, right? So, what I seem to need is to be able to control the RTS line, either using TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS when getting ready to TX and clear it when the output buffer is empty). Does this make sense, or am I off in the weeds? Thanks, Pete From tjarvi at qbang.org Mon Aug 28 18:21:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 28 Aug 2006 18:21:10 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: On Mon, 28 Aug 2006, Pete Flugstad wrote: > Okay, my understanding is that originally, RTS meant "Request to Send" > - the DTE (the PC) would assert this and the DCE (modem) would assert > "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send > data. This really only provided uni-directional flow control, from the PC to > the modem. > > Now, as I understand it, the more modern usage of RTS is that it is used > for the DTE to assert flow control back to the DCE - basically it means > "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) > raises this, then the DCE(modem) is free to send data to the DTE - this > allows the DTE(PC) to exert flow control back towards the DCE(modem). > > This discussion is based on the Serial HOWTO from: > > > > and lots of other reading... > > Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > is defined as: > >> Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > > which clearly reflects the newer usage style - it keeps the RTS line high > as long as there is space to _receive_ data. And takes it low when the > receive/input buffer is getting full to stop the modem from sending it data. > > Does this jive with other peoples understanding of RTS usage? > > Unfortunately, the hardware I'm trying to talk to wants to use the OLD > style of RTS line usage. An existing Windows C++ program uses > RTS_CONTROL_TOGGLE, which documentation states: > >> Specifies that the RTS line will be high if bytes are available for transmission. >> After all buffered bytes have been sent, the RTS line will be low. If this value is >> set, it would be an error for an application to adjust the line with >> EscapeCommFunction. This value is ignored in Windows 95; it causes the >> driver to act as if RTS_CONTROL_ENABLE were specified. > > This seems to be the OLD RTS behavior, right? > > So, what I seem to need is to be able to control the RTS line, either using > TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS > when getting ready to TX and clear it when the output buffer is empty). > > Does this make sense, or am I off in the weeds? > Hi Pete OK. That sounds right. I do not know how you would communicate the difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through CommAPI as it stands. I take it you did not find anything either? Perhaps the best thing to do for your code is to toggle the RTS yourself. This could be a feature in the future JSR API perhaps. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 28 20:54:34 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 21:54:34 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <44F3AC6A.10908@gmail.com> Trent Jarvi wrote: > OK. That sounds right. I do not know how you would communicate the > difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through > CommAPI as it stands. I take it you did not find anything either? > > Perhaps the best thing to do for your code is to toggle the > RTS yourself. This could be a feature in the future JSR API perhaps. Yeah, this is what I ended up doing. I had to modify the dll in order to be able to set hardware flow control (which I do want), but leave the RTS flow control at RS_CONTROL_ENABLE. After that I just toggle setRTS(true) when I'm ready to send and setRTS(false) when I get a OUTPUT_BUFFER_EMPTY notification. Haven't tested with real hardware yet, but it seems to work OK. Thanks for the feedback! Pete From Bob_Jacobsen at lbl.gov Tue Aug 29 08:49:02 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 29 Aug 2006 07:49:02 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >is defined as: > > > Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > >which clearly reflects the newer usage style - it keeps the RTS line high >as long as there is space to _receive_ data. And takes it low when the >receive/input buffer is getting full to stop the modem from sending it data. > >Does this jive with other peoples understanding of RTS usage? Can you point to any devices that actually implement this "new" understanding? I think the person who wrote that documentation paragraph is just confused. The original "RTS/CTS" handshaking was extended to input (from DCE to DTE) handshaking via the DTR (Data Terminal Ready) line. I think the person who wrote the double-quoted paragraph above was just confused between the directions, and mixed them up. If you change "RTS" to "DTR" in that paragraph, you get: > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > enabling the DCE to send, when the input buffer has enough room to > > receive data. The driver lowers the DTR line, preventing the DCE to > > send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. which describes how dozens of devices actually work for controlling flow into the DTE (computer). This then leaves RTS/CTS (with RTS usually just stuck high) for controlling flow into the DCE (peripheral). Again, lots of hardware devices actually do this. I don't work on Windows, so can't be sure of what happens. But on the MacOS X version of RXTX, CTS low stops transmission, exactly as the "old" style would expect. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From mschned at basis.com Tue Aug 29 12:57:45 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 12:57:45 -0600 Subject: [Rxtx] Porting to AIX Message-ID: <01f201c6cb9d$034d4f20$341416ac@basis.com> Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar From mschned at basis.com Tue Aug 29 13:58:05 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 13:58:05 -0600 Subject: [Rxtx] Porting to AIX References: <01f201c6cb9d$034d4f20$341416ac@basis.com> Message-ID: <024901c6cba5$714c3560$341416ac@basis.com> After looking through the build messages closer, there is an error building SerialImp.c: gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type Looks like B57600 is not defined and there are no definitions for DEVICEDIR and LOCKDIR on AIX. Can I just a the following to SerialImp.h? #if defined(__aix__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __aix__ */ Mark Schnedar ----- Original Message ----- From: "Mark E. Schnedar" To: Sent: Tuesday, August 29, 2006 12:57 PM Subject: [Rxtx] Porting to AIX Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 29 15:25:35 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 29 Aug 2006 16:25:35 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <84d4a6d50608291425i1fb819d3i615cf9b85b1e9617@mail.gmail.com> On 8/29/06, Bob Jacobsen wrote: > Can you point to any devices that actually implement this "new" understanding? > > I think the person who wrote that documentation paragraph is just confused. The paragraph is from the Windows documentation of its DCB structure which is used to configure the Serial Device. This is what RXTX uses internally. My version is from MSDN, and Google finds the same text here: (search for fRtsControl). I have not seen any mention anywhere of it being incorrect (and yes, I did look, because I thought the same thing). My discussion is based on trying to use RXTX to talk to a device that used the old style of one-way flow control (RTS is raised to SEND data from the PC to the device). An existing VC++ app use the old-style RTS_CONTROL_TOGGLE. RXTX did not - it used the newer style RTS_CONTROL_HANDSHAKE, so things didn't work - the device was seeing RTS HIGH all the time, so it was thinking that the PC was ready to TX all the time. When I switch RXTX to using RTS_CONTROL_ENABLED and manually control RTS, then things work correctly. The behavior is consistent with this understanding if I hook two serial ports on Windows XP in lookback (via null modem). I'd be very surprised if this had not been corrected by M$ by this time. The same structure has been around since WinNT (mid 1990's) - their documentation is typically pretty good. > > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > > enabling the DCE to send, when the input buffer has enough room to > > > receive data. The driver lowers the DTR line, preventing the DCE to > > > send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. There is a seperate field, fDtrControl, which you can set to DTR_CONTROL_HANDSHAKE, that appears to do exactly this. > This then leaves RTS/CTS (with RTS usually just stuck high) for > controlling flow into the DCE (peripheral). Again, lots of hardware > devices actually do this. > > I don't work on Windows, so can't be sure of what happens. But on > the MacOS X version of RXTX, CTS low stops transmission, exactly as > the "old" style would expect. Well, the Linux Serial HOWTO is where I got most of my information. And yes, I thought it was wrong as well, but it's apparently how things are implemented: Donno - but it works for me... Pete From tjarvi at qbang.org Tue Aug 29 19:11:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 29 Aug 2006 19:11:40 -0600 (MDT) Subject: [Rxtx] Porting to AIX In-Reply-To: <024901c6cba5$714c3560$341416ac@basis.com> References: <01f201c6cb9d$034d4f20$341416ac@basis.com> <024901c6cba5$714c3560$341416ac@basis.com> Message-ID: Hi Mark That should do it. You can put ifdef around the B57600 as we did with higher baudrates. You may want to use tip, minicom, kermit or some other serial application on the AIX to confirm that the lockfiles created are correct. Neat stuff. On Tue, 29 Aug 2006, Mark E. Schnedar wrote: > After looking through the build messages closer, > there is an error building SerialImp.c: > > gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o > /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type > > Looks like B57600 is not defined and there are no > definitions for DEVICEDIR and LOCKDIR on AIX. > > Can I just a the following to SerialImp.h? > > #if defined(__aix__) > # define DEVICEDIR "/dev/" > # define LOCKDIR "/var/lock" > # define LOCKFILEPREFIX "LCK.." > # define FHS > #endif /* __aix__ */ > > Mark Schnedar > > > ----- Original Message ----- > From: "Mark E. Schnedar" > To: > Sent: Tuesday, August 29, 2006 12:57 PM > Subject: [Rxtx] Porting to AIX > > > Hi, > > I'm new to rxtx. Currently my company has an interpreter product > that uses rxtx on Windows and Linux. I am trying to get rxtx to > build on AIX. I downloaded rxtx, ran ./configure and make. When > I run make I get the following error: > > libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object > make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 > > Do you have any suggestions on how to fix this problem? > > I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error > on both systems). I did have our system administrator load > automake, autoconf, make (gnu), and gcc. Here are the versions: > > AIX 4.3.3 AIX 5.3.0 > rxtx: 2.1-7r2 2.1-7r2 > autoconf: 2.53 2.59 > automake: 1.5 1.8.5 > make: 3.79.1 3.80 > gcc: (used native cc) 4.0.0 > > Any help would be appreciated. > > Mark Schnedar > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From guille at sms.nl Wed Aug 30 01:14:32 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 09:14:32 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <7.0.1.0.0.20060830091204.03652de0@sms.nl> At 16:49 29/08/2006, Bob Jacobsen wrote: >At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > > > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >is defined as: > > > > > Enables RTS flow-control handshaking. The driver raises the RTS line, > >> enabling the DCE to send, when the input buffer has enough room to > >> receive data. The driver lowers the RTS line, preventing the DCE to > >> send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. > > > >which clearly reflects the newer usage style - it keeps the RTS line high > >as long as there is space to _receive_ data. And takes it low when the > >receive/input buffer is getting full to stop the modem from sending it data. > > > >Does this jive with other peoples understanding of RTS usage? > >Can you point to any devices that actually implement this "new" understanding? Many (most) of the embedded devices we work with implement this kind of flow control. The host (DTE) raises RTS when it can receive data, and lowers it when the input buffers are full. In turn it watches the CTS line to see whether it can send data to the DCE. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From tjarvi at qbang.org Wed Aug 30 01:23:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 30 Aug 2006 01:23:46 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830091204.03652de0@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 16:49 29/08/2006, Bob Jacobsen wrote: >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: >>> >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >>> is defined as: >>> >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, >>>> enabling the DCE to send, when the input buffer has enough room to >>>> receive data. The driver lowers the RTS line, preventing the DCE to >>>> send, when the input buffer does not have enough room to receive >>>> data. If this value is used, it is an error for the application to adjust >>>> the line with EscapeCommFunction. >>> >>> which clearly reflects the newer usage style - it keeps the RTS line high >>> as long as there is space to _receive_ data. And takes it low when the >>> receive/input buffer is getting full to stop the modem from sending it data. >>> >>> Does this jive with other peoples understanding of RTS usage? >> >> Can you point to any devices that actually implement this "new" understanding? > > Many (most) of the embedded devices we work with implement this kind of flow > control. The host (DTE) raises RTS when it can receive data, and lowers it > when the input buffers are full. In turn it watches the CTS line to see > whether it can send data to the DCE. > I think this explains some hardware control 'bugs' I've seen. -- Trent Jarvi tjarvi at qbang.org From guille at sms.nl Wed Aug 30 02:01:35 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 10:01:35 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> At 09:23 30/08/2006, Trent Jarvi wrote: >On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > > > At 16:49 29/08/2006, Bob Jacobsen wrote: > >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >>> > >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >>> is defined as: > >>> > >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, > >>>> enabling the DCE to send, when the input buffer has enough room to > >>>> receive data. The driver lowers the RTS line, preventing the DCE to > >>>> send, when the input buffer does not have enough room to receive > >>>> data. If this value is used, it is an error for the > application to adjust > >>>> the line with EscapeCommFunction. > >>> > >>> which clearly reflects the newer usage style - it keeps the RTS line high > >>> as long as there is space to _receive_ data. And takes it low when the > >>> receive/input buffer is getting full to stop the modem from > sending it data. > >>> > >>> Does this jive with other peoples understanding of RTS usage? > >> > >> Can you point to any devices that actually implement this "new" > understanding? > > > > Many (most) of the embedded devices we work with implement this > kind of flow > > control. The host (DTE) raises RTS when it can receive data, and lowers it > > when the input buffers are full. In turn it watches the CTS line to see > > whether it can send data to the DCE. > > > >I think this explains some hardware control 'bugs' I've seen. I think the above is the most widespread use, but that may just mean it is the most widespread use in our specific segment (embedded systems). Some UART chips (e.g. from Exar) implement this kind of flow control directly in hardware. For example the Exar can be configured to suspend transmission when it sees CTS low, and resume transmission when it sees CTS high. This is also consistent with our experience. Maybe this helps clarify: http://www.tldp.org/HOWTO/Text-Terminal-HOWTO-10.html#ss10.7 Note the "Old RTS/CTS handshaking is different" section, which refers to "older terminals" whereas newer equipment would use RTS/CTS flow control (or equivalently DTR/DTS) as described above. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From Bob_Jacobsen at lbl.gov Wed Aug 30 07:55:31 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 30 Aug 2006 06:55:31 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> <7.0.1.0.0.20060830095557.0374ff28@sms.nl> Message-ID: I think we all agree that CTS inactive means "Send no more from DTE to DCE". The question is how to express the other direction, "Send no more from DCE to DTE". There are two parts to this question: What do various DTE-like devices do, and what do various DCE-like devices expect? Electrically, the lines that go that direction are DTR, DCD, and RTS (plus some special-purpose lines that are rarely present). All three devices I work most with respect the DTR lead. On the other hand, the FTDI chips for doing serial over USB provide either (RTS and CTS) or (DTR and DSR) as the two leads. What we're probably seeing is two different approaches, that have propagated separately. That's a problem. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From Pawan.Kharbanda at dot.state.co.us Wed Aug 30 09:07:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 30 Aug 2006 09:07:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0455E5E5@hqexchange3.dot.state.co.us> Trent, Sorry for not responding earlier to your email. I was actually waiting for the release of our software on the new Hardware. As I mentioned in my previous emails, RXTX crashes and locks up serial ports with the older version of Redhat (Linux 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:28:55 EDT 2005 i686 i686 i386 GNU/Linux), it might work ok if you are using one or 2 ports but anything more than that it has issues. I was using JDK1.5.0_06 and older firmwares of Digi boxes. Let me know if you need any more specific information of the older system. Thanks Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Thursday, August 10, 2006 5:40 AM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even > after 10000 operations (now I am trying 100,000 :). This is all with > the original RXTX 2.1.7 (final) api's without any of my fixes that I > have been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying > the RXTX saying the suggested kernel for Redhat Linux is > 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Aug 1 01:11:30 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 1 Aug 2006 09:11:30 +0200 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <34B6BC40-1405-4A13-8054-0FC6CE10466A@buechse.de> This is a problem with lock files. You should find it somewhere in the documentation... On 01.08.2006, at 03:53, Richard P. Welty wrote: > trying to get my app running on a Mac OS X powerbook, when > the following is executed as the first thing inside the > run method of a Thread: > > > try { > port = (SerialPort) selectedPort.open( > this.getClass().getName(), 2000); > } catch ( PortInUseException ex){ > ex.printStackTrace(); > return; > } > > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java: > 354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run > (ScaleWatcher.java:143) > > i've not seen any documentation suggesting that rxtx would be finicky > about application names... > > thanks for any suggestions, > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From rwelty at suespammers.org Tue Aug 1 05:37:53 2006 From: rwelty at suespammers.org (Richard P. Welty) Date: Tue, 01 Aug 2006 07:37:53 -0400 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <44CF3D11.9060108@suespammers.org> Richard P. Welty wrote: > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) Aha, a confusing error message. it's really a lock file problem; the code is trying to fill in the application name but when it's getting "Unknown Application" and filling that in... richard From ajmas at sympatico.ca Tue Aug 1 13:10:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:10:59 -0400 Subject: [Rxtx] Application Name? Message-ID: <20060801191059.HFCD18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> You need the source code in CVS. The forth coming 2.18 will correct this, but currently the only place to find the correction is in CVS. No idea when 2.18 is due. > > From: "Richard P. Welty" > Date: 2006/08/01 Tue AM 07:37:53 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Application Name? > > Richard P. Welty wrote: > > > i get the following: > > > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > at > > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) > > Aha, a confusing error message. it's really a lock file problem; the > code is trying to fill in the application name but when it's getting > "Unknown Application" and filling that in... > > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:15:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:15:57 -0400 Subject: [Rxtx] Do interfaces break backwards compatibility? Message-ID: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> It is the class that decides to add serializable that needs to worry about those issues. For the most part serial ports and their connection states should be considered as transient, since there is no guarantee they will still be present or that their state will be, especially in a USB world. What you can store is the port settings and port id and then simply test for port availability next time. Nothing else should be assumed. > > From: Gregg Wonderly > Date: 2006/07/31 Mon PM 01:21:19 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Do interfaces break backwards compatibility? > > Doug Berkland wrote: > > As far as I can tell, nothing in either RXTX or Sun's JavaCOMM > > implements Serializable. Therefore, there are no worries from that > > either. (I can't think of a reason anything in JavaCOMM should > > implement Serializable either.) > > Any interface in javax.comm can become implemented by a serializable object. > Thus, if someone wants to provide remote access to a serial port, then they > might (and I think this is not wise) choose to subclass and add Serializable to > the interface list. > > It's that kind of Serialization compatibility that I'm talking about. > > Gregg Wonderly > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:18:11 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:18:11 -0400 Subject: [Rxtx] precompiled for Intel Mac? Message-ID: <20060801191811.FLJY27612.tomts16-srv.bellnexxia.net@smtp1.sympatico.ca> > > From: Joachim Buechse > There will be. However not before we have figured out some remaining issues. What issues are remaining? Andre From Pawan.Kharbanda at dot.state.co.us Tue Aug 1 16:55:08 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 1 Aug 2006 16:55:08 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Hi, I am also experiencing occasional JVM crash thru the native code. I am attaching the log from the crash. Any ideas what might be causing it???? Regards Pawan Kharbanda # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # --------------- T H R E A D --------------- Current thread (0x8d000480): JavaThread "Thread-119" [_thread_in_native, id=111 51] siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba Registers: EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 Top of Stack: (sp=0x8d3482b8) 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 0x8d348308: 00000000 00000002 00000000 00000000 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 Instructions: (pc=0xb75e39b2) 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~StubRoutines::call_stub V [libjvm.so+0x2607ec] V [libjvm.so+0x423828] V [libjvm.so+0x260045] V [libjvm.so+0x2600de] V [libjvm.so+0x2d7745] V [libjvm.so+0x4c2ba3] V [libjvm.so+0x424338] C [libpthread.so.0+0x4dd8] 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 ) =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, id=11026] 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, id=11023] From tjarvi at qbang.org Tue Aug 1 18:46:21 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 1 Aug 2006 18:46:21 -0600 (MDT) Subject: [Rxtx] JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Message-ID: On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) > C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] > 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, > id=11034] > 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, > id=11033] > 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, > id=11032] > 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, > id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] > 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, > id=11028] > 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, > id=11027] > 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, > id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] > 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- Index: termios.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/termios.c,v retrieving revision 1.9.2.57 diff -u -r1.9.2.57 termios.c --- termios.c 4 Jun 2006 02:50:01 -0000 1.9.2.57 +++ termios.c 11 Jun 2006 21:51:10 -0000 @@ -1048,26 +1048,29 @@ if ( !first_tl ) { port->prev = NULL; + port->next = NULL; first_tl = port; } else { - while ( index->next ) + while ( ( index->fd < port->fd ) && index->next ) index = index->next; - if ( port == first_tl ) + if ( index->fd > port->fd ) { - port->prev = NULL; - port->next = first_tl; - first_tl->prev = port; - first_tl = port; + /* inserting previously closed fd */ + port->prev = index->prev; + port->next=index + index->prev->next = port; + index->prev = port; } else { + /* adding to end of list */ port->prev = index; + port->next = NULL; index->next = port; } } - port->next = NULL; LEAVE( "add_port" ); return port; From gergg at cox.net Tue Aug 1 23:25:19 2006 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 02 Aug 2006 00:25:19 -0500 Subject: [Rxtx] Do interfaces break backwards compatibility? In-Reply-To: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <44D0373F.7020600@cox.net> Andre-John Mas wrote: > It is the class that decides to add serializable that needs to worry about those issues. > For the most part serial ports and their connection states should be considered as > transient, since there is no guarantee they will still be present or that their state > will be, especially in a USB world. Right, but when you provide an interface as the standard, that opens the doors for a lot more interpretation and variation. An abstract class can indicate a lot more about what the expected implementation is. Gregg Wonderly From lyon at docjava.com Wed Aug 2 06:02:15 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:02:15 -0400 Subject: [Rxtx] jsr spec and license issues Message-ID: Hi All, Trent and I have been discussing the license issues of the JSR spec and code that we develop, as a community. Here is what we have come up with: >During the development, the new JSR spec that we derive >will be >covered under the LGPL license. Since it is >just interfaces, any contributions will come back to me, for inclusion >into the specification. The goal is to provide a detailed set of >interfaces that >document the present state of our reference model. I am using >the RXTX as the reference model. If there is something missing from >the reference model, or if the reference model has something that should >not be there, we will need to discuss it. > >After Sun accepts the JSR, I, as the copyright holder, can issue >a version with a JSR compatible license. > >The goal is to migrate the interfaces into javax.comm. Does this sound like a reasonable plan to everyone? Thanks! - Doug From joachim at buechse.de Wed Aug 2 06:21:03 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 14:21:03 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Good day, quite frankly I think that this is a very bad idea. This specification (!) should be in the public domain and nowhere else. Defining a spec under the (L)GPL makes absolutely no sense. After all it is a specification not an implementation. There is no or only trivial code attached to it. So while nothing can be gained by putting it under the LGPL, a lot can be lost - for example the contribution of companies that do not like to open source their implementations. Furthermore you are plain wrong assuming you will be the copyright holder to additions made by other people. Best regards, Joachim On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for >> inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that >> should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Aug 2 06:39:28 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:39:28 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Hi All, I don't know anything about licensing issues. The below sounds reasonable. If we make this public domain, will that be compatible with Sun's JSR? Thanks! - DL P.S. I really don't care what we do, as long as there is some sort of collective agreement. >Good day, > >quite frankly I think that this is a very bad idea. This specification >(!) should be in the public domain and nowhere else. > >Defining a spec under the (L)GPL makes absolutely no sense. After all? >it is a specification not an implementation. There is no or only? >trivial code attached to it. So while nothing can be gained by? >putting it under the LGPL, a lot can be lost - for example the? >contribution of companies that do not like to open source their? >implementations. > >Furthermore you are plain wrong assuming you will be the copyright? >holder to additions made by other people. > >Best regards, >Joachim > > >On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for? >>> inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that? >>> should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> >> Does this sound like a reasonable plan to everyone? >> >> Thanks! >> - Doug >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 07:50:09 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 10:50:09 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D0AD91.4080103@gmail.com> Hi, I have been searching the web and here it is: http://jcp.org/en/resources/license_reference Here there is a list of the licenses that are compatible with the JCP for JSR submitting. I think that Apache, CDDL, CPL and OSL are the one that are compatible with our needs. But I think that Apache is the best for us, Doug why do not make a votation? Regards, Manuel > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. > >> Good day, >> >> quite frankly I think that this is a very bad idea. This specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From lyon at docjava.com Wed Aug 2 08:10:55 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 10:10:55 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D0AD91.4080103@gmail.com> References: <44D0AD91.4080103@gmail.com> Message-ID: Hi All, I have no objection to an Apache license for the JSR interfaces that we produce. Would anyone care to comment? Joachim: Does this address your public domain concerns? How does this impact the reference implementation (i.e. RXTX)? Thanks! - DL >Hi, >I have been searching the web and here it is: >http://jcp.org/en/resources/license_reference >Here there is a list of the licenses that are compatible with the JCP >for JSR submitting. >I think that Apache, CDDL, CPL and OSL are the one that are compatible >with our needs. >But I think that Apache is the best for us, Doug why do not make a votation? >Regards, >Manuel > >> Hi All, >> I don't know anything about licensing issues. >> The below sounds reasonable. If we make this public domain, >> will that be compatible with Sun's JSR? >> Thanks! >> - DL >> P.S. I really don't care what we do, as long as there is >> some sort of collective agreement. >>?? >>> Good day, >>> >>> quite frankly I think that this is a very bad idea. This specification >>> (!) should be in the public domain and nowhere else. >>> >>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>> it is a specification not an implementation. There is no or only >>> trivial code attached to it. So while nothing can be gained by >>> putting it under the LGPL, a lot can be lost - for example the >>> contribution of companies that do not like to open source their >>> implementations. >>> >>> Furthermore you are plain wrong assuming you will be the copyright >>> holder to additions made by other people. >>> >>> Best regards, > >> Joachim >>> >>> >>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>> >>>???? >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>?????? >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for >>>>> inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that >>>>> should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>>>???????? >>>> Does this sound like a reasonable plan to everyone? >>>> >>>> Thanks! >>>> - Doug >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>?????? >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>???? >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 08:20:29 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 11:20:29 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D0AD91.4080103@gmail.com> Message-ID: <44D0B4AD.2050106@gmail.com> Doug; > How does this impact the reference implementation (i.e. RXTX)? > Fuck I have not thinked about that, we would need that everyone who had colaborated with RXTX and have putted code on it to agree a license chaging. Or start from sractch. I don't know if Trent have the right to do that. Regards, Manuel > > >> Hi, >> I have been searching the web and here it is: >> http://jcp.org/en/resources/license_reference >> Here there is a list of the licenses that are compatible with the JCP >> for JSR submitting. >> I think that Apache, CDDL, CPL and OSL are the one that are compatible >> with our needs. >> But I think that Apache is the best for us, Doug why do not make a votation? >> Regards, >> Manuel >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> >> >> Joachim >> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 08:21:15 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 16:21:15 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Putting something in the public domain means, that it can be used by anyone for whatever (s)he thinks is appropriate. The authors define no restriction regarding it's use. That's how any specification should be. Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From berkland at spamcop.net Wed Aug 2 08:50:50 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 10:50:50 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> You may want to consider making it available under two separate licenses. 1 - LGPL as it is today The LGPL can be used by anyone wanting to extend the current functionality, as long as they provide code for anything they change. 2 - Sun Community Source License (SCSL) http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf The SCSL will allow anyone who wants to do a closed source implementation from the ground up to do so, if I'm reading it correctly, as long as they don't use any of the code from the Reference Implementation. This will satisfy any company that wants to have a closed-source implementation, but not help them out very much. On 8/2/06, Joachim Buechse wrote: > Putting something in the public domain means, that it can be used by > anyone for whatever (s)he thinks is appropriate. The authors define > no restriction regarding it's use. That's how any specification > should be. > > Best regards, > Joachim > > > On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > > > Hi All, > > I don't know anything about licensing issues. > > The below sounds reasonable. If we make this public domain, > > will that be compatible with Sun's JSR? > > Thanks! > > - DL > > P.S. I really don't care what we do, as long as there is > > some sort of collective agreement. > >> Good day, > >> > >> quite frankly I think that this is a very bad idea. This > >> specification > >> (!) should be in the public domain and nowhere else. > >> > >> Defining a spec under the (L)GPL makes absolutely no sense. After all > >> it is a specification not an implementation. There is no or only > >> trivial code attached to it. So while nothing can be gained by > >> putting it under the LGPL, a lot can be lost - for example the > >> contribution of companies that do not like to open source their > >> implementations. > >> > >> Furthermore you are plain wrong assuming you will be the copyright > >> holder to additions made by other people. > >> > >> Best regards, > >> Joachim > >> > >> > >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> > >>> Hi All, > >>> Trent and I have been discussing the license issues of the > >>> JSR spec and code that we develop, as a community. > >>> Here is what we have come up with: > >>> > >>>> During the development, the new JSR spec that we derive > >>>> will be > >>>> covered under the LGPL license. Since it is > >>>> just interfaces, any contributions will come back to me, for > >>>> inclusion > >>>> into the specification. The goal is to provide a detailed set of > >>>> interfaces that > >>>> document the present state of our reference model. I am using > >>>> the RXTX as the reference model. If there is something missing > >>>> from > >>>> the reference model, or if the reference model has something that > >>>> should > >>>> not be there, we will need to discuss it. > >>>> > >>>> After Sun accepts the JSR, I, as the copyright holder, can issue > >>>> a version with a JSR compatible license. > >>>> > >>>> The goal is to migrate the interfaces into javax.comm. > >>> > >>> Does this sound like a reasonable plan to everyone? > >>> > >>> Thanks! > >>> - Doug > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From naranjo.manuel at gmail.com Wed Aug 2 09:03:02 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 12:03:02 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> References: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> Message-ID: <44D0BEA6.2040408@gmail.com> Or even better, you can use Apache v2, which allows both Open Source and Closed Source forms ;-) > You may want to consider making it available under two separate licenses. > > 1 - LGPL as it is today > > The LGPL can be used by anyone wanting to extend the current > functionality, as long as they provide code for anything they change. > > 2 - Sun Community Source License (SCSL) > http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf > > The SCSL will allow anyone who wants to do a closed source > implementation from the ground up to do so, if I'm reading it > correctly, as long as they don't use any of the code from the > Reference Implementation. This will satisfy any company that wants to > have a closed-source implementation, but not help them out very much. > > On 8/2/06, Joachim Buechse wrote: > >> Putting something in the public domain means, that it can be used by >> anyone for whatever (s)he thinks is appropriate. The authors define >> no restriction regarding it's use. That's how any specification >> should be. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This >>>> specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> Joachim >>>> >>>> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing >>>>>> from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 09:46:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 17:46:25 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> I assume that javax.comm/RXTX is to be redefined using Interfaces. In this case we should separate 2 things: 1) The specification and it's incarnation in the form of java classes defining the interfaces. 2) The actual implementation of the functionality. It is possible that 1) may contain some trivial code in abstract or none abstract classes (ie PortFactory, PortRegistry, etc). Doug's original question was regarding 1) - unless I misunderstood. I personally think that 1) should be in the public domain. It should not be covered by any restrictions what-so-ever. Let it be free as in "totally free in any respect". I do not care under which license 2) is released. Why? Because it is in my very interest that all/almost all vendors include implementations with their distributions. Which will only happen if they do not need to respect open source licenses. (javax.comm is not nearly as important as the Apache web server or MySql, so nobody will take licensing risks). Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ssbello at gmail.com Wed Aug 2 10:28:30 2006 From: ssbello at gmail.com (Simone) Date: Wed, 2 Aug 2006 18:28:30 +0200 Subject: [Rxtx] pocketPC 2003 Message-ID: <39ed505d0608020928k6ceb01aen470c2e6a78c5a6b0@mail.gmail.com> Does anyone know if the Rxtx works on PocketPc 2003? If yes, could you, please, give me some suggestion. Thanks, Simone Bell? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/72e0fb87/attachment-0329.html From berkland at spamcop.net Wed Aug 2 13:00:10 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 15:00:10 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> Message-ID: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> How about these for the "Business Terms" of the new JSR: > The specification will be released in accordance with standard terms > as specified by the JCP process. > > The reference implementation (RI) will be delivered in binary form > free of charge from http://rxtx.org. Licensing details are expected to > be under the Binary Code License (BCL). > > The source for the reference implementation is expected to be > delivered via the Limited GNU Public License (LGPL) and available free > of charge. > > The TCK will be made available free of charge to all J2SE and J2EE licensees. > > The TCK will be offered for license at no charge, without support or > any trademark license rights, to qualified not-for-profit entities > (including not-for-profit) academic institutions) and qualified > individuals engaged in efforts to create compatible implementations of > the Specification. From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 13:13:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 13:13:33 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E495@hqexchange3.dot.state.co.us> Trent, I didn't exactly get it. Again I am not a C guy, maybe its very simple for you but I don't see any checks for FD (as written in the patch for termios.c) in the initialise_event_info_struct, I see some checks in the interruptEventLoop call. Second as you explained I open three("/dev/cuf01","/dev/cuf01","/dev/cuf01") ports, I close the 2nd ("/dev/cuf02", the other 2 are still open) , I never try to open the third ("/dev/cuf03") port again if it is already open. Are you planning to have a fix for this in the next release 2.1.8. Its very important for me to have a fix for this, its causing some major headaches for our project. I know you have your regular job too, I will appreciate any help. Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, August 01, 2006 6:46 PM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java > VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic > frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) C [librxtxSerial.so+0x69b2] > initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] > Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" > [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: > /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread > "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 > JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon > [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" > daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread > "AdapterThread" daemon [_thread_blocked, id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, > id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Wed Aug 2 13:14:20 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 16:14:20 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> Message-ID: <44D0F98C.1070600@gmail.com> +1 Agree > How about these for the "Business Terms" of the new JSR: > > >> The specification will be released in accordance with standard terms >> as specified by the JCP process. >> >> The reference implementation (RI) will be delivered in binary form >> free of charge from http://rxtx.org. Licensing details are expected to >> be under the Binary Code License (BCL). >> >> The source for the reference implementation is expected to be >> delivered via the Limited GNU Public License (LGPL) and available free >> of charge. >> >> The TCK will be made available free of charge to all J2SE and J2EE licensees. >> >> The TCK will be offered for license at no charge, without support or >> any trademark license rights, to qualified not-for-profit entities >> (including not-for-profit) academic institutions) and qualified >> individuals engaged in efforts to create compatible implementations of >> the Specification. >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From savagobr at yahoo.com Wed Aug 2 13:40:42 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:40:42 -0700 (PDT) Subject: [Rxtx] jsr spec and license issues Message-ID: <20060802194042.83599.qmail@web53807.mail.yahoo.com> Friends Apache seems ok... if I get it right, does it *almost* equals to BSD? Regarding public domain: I think that the good people that spent so much time on this library will like to keep some rights over its own work, don't you think? Best regards Savago --------------------------------- Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/79abdfd5/attachment-0329.html From savagobr at yahoo.com Wed Aug 2 13:58:04 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:58:04 -0700 (PDT) Subject: [Rxtx] JVM Crashing Message-ID: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago --------------------------------- Groups are talking. We´re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/47d561ae/attachment-0329.html From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 14:09:18 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 14:09:18 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E4AD@hqexchange3.dot.state.co.us> Thank You :) ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adenilson Cavalcanti Sent: Wednesday, August 02, 2006 1:58 PM To: rxtx at qbang.org Subject: Re: [Rxtx] JVM Crashing Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago ________________________________ Groups are talking. We?re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/b4eb22cf/attachment-0329.html From tjarvi at qbang.org Wed Aug 2 20:23:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 20:23:42 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > Hi Doug As mentioned off the list, the important point in my mind is that everyone is on the same base more than what license is decided upon. These things are just best addressed early so there isn't confusion. The Apache license is fairly standard in the Open Source community vs several of the relatively unknown [and obviously redundat even by their descriptions] offerings by Sun. Perhaps one option here that would kill a few birds with one stone is to dual license the interface as Apache and LGPL. This would allow everyone to use the interfaces without needing to do wastefull work for internal license requirements. Projects could choose between the two the license that best suits their needs. If there is a software shop doing Java that isn't familiar with the Apache license, they must be doing some strange Java. I do think it is foolhearty to blindly travel in public domain but nobody is trying to undermine the spec files. The intent is to use the work for a JSR submission that everyone can use without confusion later on down the line. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 21:01:16 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 20:01:16 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D166FC.9090005@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> Does this sound like a reasonable plan to everyone? >> > > Hi Doug > > As mentioned off the list, the important point in my mind is that everyone > is on the same base more than what license is decided upon. These things > are just best addressed early so there isn't confusion. > > The Apache license is fairly standard in the Open Source community vs > several of the relatively unknown [and obviously redundat even by > their descriptions] offerings by Sun. The JCP is a reasonable process for what the RxTx project intends to achieve by evolving the API. There isn't much to lose by going the JSR route. The community will benefit from a fair API like so many other that have undergone the process. Sun isn't going to own the API or manipulate it into anything weird anymore than anyone else is. I think your fears are rather vague and unfounded. Which isn't to say that I am a well-informed representative of the JCP, I've only sat through one JSR process and we ended up with javax.usb, and IBM got what it wanted out of the deal and the community got a very nice standard. Paul > > Perhaps one option here that would kill a few birds with one stone is to > dual license the interface as Apache and LGPL. This would allow everyone > to use the interfaces without needing to do wastefull work for internal > license requirements. Projects could choose between the two the license > that best suits their needs. If there is a software shop doing Java that > isn't familiar with the Apache license, they must be doing some strange > Java. > > I do think it is foolhearty to blindly travel in public domain but nobody > is trying to undermine the spec files. The intent is to use the work for > a JSR submission that everyone can use without confusion later on down the > line. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Aug 2 22:10:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 22:10:48 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D166FC.9090005@sun.com> References: <44D166FC.9090005@sun.com> Message-ID: On Wed, 2 Aug 2006, Paul Klissner wrote: > Trent Jarvi wrote: >> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> Does this sound like a reasonable plan to everyone? >>> >> >> Hi Doug >> >> As mentioned off the list, the important point in my mind is that everyone >> is on the same base more than what license is decided upon. These things >> are just best addressed early so there isn't confusion. >> >> The Apache license is fairly standard in the Open Source community vs >> several of the relatively unknown [and obviously redundat even by >> their descriptions] offerings by Sun. > > The JCP is a reasonable process for what the RxTx project intends > to achieve by evolving the API. > > There isn't much to lose by going the JSR route. The community will > benefit from a fair API like so many other that have undergone > the process. Sun isn't going to own the API or manipulate it > into anything weird anymore than anyone else is. I think your > fears are rather vague and unfounded. > > Which isn't to say that I am a well-informed representative > of the JCP, I've only sat through one JSR process and we ended > up with javax.usb, and IBM got what it wanted out of the deal > and the community got a very nice standard. > Hi Paul The JCP should work fine. As our intentions are in line, licensing so that everyone can use the interface code should not be a problem. Note that the current default right now is that the interfaces are copyrighted and no license for distribution is included. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 22:33:51 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 21:33:51 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D166FC.9090005@sun.com> Message-ID: <44D17CAF.1090802@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Paul Klissner wrote: > >> Trent Jarvi wrote: >>> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>> Does this sound like a reasonable plan to everyone? >>>> >>> Hi Doug >>> >>> As mentioned off the list, the important point in my mind is that everyone >>> is on the same base more than what license is decided upon. These things >>> are just best addressed early so there isn't confusion. >>> >>> The Apache license is fairly standard in the Open Source community vs >>> several of the relatively unknown [and obviously redundat even by >>> their descriptions] offerings by Sun. >> The JCP is a reasonable process for what the RxTx project intends >> to achieve by evolving the API. >> >> There isn't much to lose by going the JSR route. The community will >> benefit from a fair API like so many other that have undergone >> the process. Sun isn't going to own the API or manipulate it >> into anything weird anymore than anyone else is. I think your >> fears are rather vague and unfounded. >> >> Which isn't to say that I am a well-informed representative >> of the JCP, I've only sat through one JSR process and we ended >> up with javax.usb, and IBM got what it wanted out of the deal >> and the community got a very nice standard. >> > > Hi Paul > > The JCP should work fine. As our intentions are in line, licensing so > that everyone can use the interface code should not be a problem. Sorry, looks like my concerns were unfounded. I haven't been following the threads closely this week, as work got busy with an escalated issue and new project. Sorry about that. > > Note that the current default right now is that the interfaces are > copyrighted and no license for distribution is included. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Aug 3 03:45:56 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 03 Aug 2006 05:45:56 -0400 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: Hi All, I have been waiting a day for things to cool down. Licensing appears to be a hot-button topic. I have no objection to dual license the interfaces as both Apache and LGPL. Some thoughts: Goal: developers wish to work together on a common piece of code that the team needs. It makes sense that the code base they work on should be Apache-licensed. That makes it possible for the team to use and develop common code, even if the end result is LGPL'd as a whole. If we combine licenses, we must follow the terms of both licenses when distributing the combined work. Thus, the dual license contains the super set of terms in the licenses of Apached and LGPL. This should address concern about using Apache-licensed code within LGPL projects due to the FSF's claim that they are incompatible. Here is a draft statement for RXSL: The RXTX Specification Library (RXSL) uses a dual license strategy for the source code. These licenses are the GNU Lesser General Public License (LGPL) and the Apache License. I strongly encourage users to use the LGPL license and participate fully in the free software community. Dual licensing of the RXSL source code provides open and free access to the technology both for the GPL community and for other developers or companies that cannot use the GPL. Dual license is common practice in open source projects like OpenOffice, Perl and Mozilla. Through the combined use of LGPL and Apache license, developers will have a high degree of freedom yet compatibility and interoperability will be preserved. You can freely modify, extend, and improve the RXSL source code. The only question is whether or not you must provide the source code and contribute modifications to the community. The GNU and Apache licenses allow different ranges of flexibility in this regard, but in the end, regardless of the license used, any and all incompatible changes must be published openly. Note that there is the RXTX Reference Model that uses the org.rxtx package, which itself is protected by the LGPL. This may be part of the distribution, however, it can not be redistributed using a different license. Is everybody OK with this? Thanks Trent, great idea! - Doug From joachim at buechse.de Thu Aug 3 04:15:44 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 3 Aug 2006 12:15:44 +0200 Subject: [Rxtx] JVM Crashing In-Reply-To: <20060802195804.70935.qmail@web53812.mail.yahoo.com> References: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Message-ID: <6ABA2AB2-CECE-4C4B-A7D6-0CDF8B9C95A8@buechse.de> I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of > rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jvermillard at archean.fr Thu Aug 3 04:26:48 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Thu, 03 Aug 2006 12:26:48 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <1154600808.16732.18.camel@localhost.localdomain> Hi, I'm a developer of the Apache MINA framework. It's a network application framework which helps users develop high performance and high scalability network applications easily. http://directory.apache.org/subprojects/mina/index.html . I would like to integrate serial connection to the framework (actualy supporting TCP, UDP (broadcast) and in VM communications), but LGPL is an issue for me. An Apache License would be pretty usefull for me and integrate rxtx functionnalities easly. Thanks, Julien Le jeudi 03 ao?t 2006 ? 05:45 -0400, Dr. Douglas Lyon a ?crit : > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/755cca7f/smime-0329.bin From pascal at quies.net Thu Aug 3 04:32:35 2006 From: pascal at quies.net (Pascal S. de Kloe) Date: Thu, 3 Aug 2006 12:32:35 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <200608031232.35838.pascal@quies.net> Hi Doug, The Apache license is unnessesary complex. It puts all kinds of limitations on the usage. Is there a particular reason why people chose this or was it just the familiar name? I agree with Joachim (again) that the specification and the interfaces should be public domain. However, if we realy need a license then have a look at the X11 license because that one is compatible with the GPL and suits our needs: http://www.fsf.org/licensing/licenses/index_html http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3 ---- start: implementation Copyright (C) 2006 Sun Microsystems, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Sun Microsystems shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Sun Microsystems. Java is a trademark of Sun Microsystems, Inc. ---- end Op donderdag 3 augustus 2006 11:45, schreef Dr. Douglas Lyon: > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Aug 3 05:17:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 05:17:07 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154600808.16732.18.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: On Thu, 3 Aug 2006, Julien Vermillard wrote: > Hi, > > I'm a developer of the Apache MINA framework. It's a network application > framework which helps users develop high performance and high > scalability network applications easily. > http://directory.apache.org/subprojects/mina/index.html . I would like > to integrate serial connection to the framework (actualy supporting TCP, > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > An Apache License would be pretty usefull for me and integrate rxtx > functionnalities easly. > > Thanks, > > Julien > Hi Julien The rxtx license itself will not change. This is just the interface. You would be free to implement an rxtx replacement if the LGPL low level code is a problem for you. These licensing details would make it possible to take the interface code instead of needing to recode them for a new project. You are probably confusing the license problems with the GPL not the LGPL though you can share links to concerns off the list if you would like to go through them. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 11:59:48 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 11:59:48 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E516@hqexchange3.dot.state.co.us> Joachim, I think my both problems (JVM crashing & Port Locking) are being caused by the corruption of "Event Info Struct / EIS" I have noticed with in EIS my "FD" and "Closing" value being overwritten. The problem is definitely in SerialImp.c file. I am trying to understand what the code does and try to pin point the problem by trying few other options. I will keep everybody posted. Regards Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Joachim Buechse Sent: Thursday, August 03, 2006 4:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Thu Aug 3 13:50:07 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 14:50:07 -0500 Subject: [Rxtx] slow startup Message-ID: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete From brian at mbari.org Thu Aug 3 14:05:57 2006 From: brian at mbari.org (Brian Schlining) Date: Thu, 3 Aug 2006 13:05:57 -0700 Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> References: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Message-ID: Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B > Greetings, > I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/ > qbang.org). > > In testing things out, I ran the list ports example from the Wiki, > and it seems to take quite a while for the library to initialize? > Like on the order of 30+ seconds or so after startup (and the RXTX > banner prints), and before the application starts running. > > Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then > I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ > terminal server) and I'm wondering if they are not responding properly > and this is causing the slow startup? Or is this a known problem of > some kind, or maybe something on my system is screwy? > > Thanks, > Pete > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/6123f730/attachment-0328.html From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 14:13:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 14:13:47 -0600 Subject: [Rxtx] slow startup Message-ID: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Hi Pete, RXTX does open and close the ports in Windows. Try downloading utility like PORTMON(only for windows) and you can see that whenever you load RXTX it tries to register all the available COMM ports in the system. It is a little slow if you have virtual ports, we use digi as a terminal server, Its going to get worst of you have comm ports in 100's Thanks Pawan Kharbanda ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Brian Schlining Sent: Thursday, August 03, 2006 2:06 PM To: RXTX Developers and Users Subject: Re: [Rxtx] slow startup Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/94fd105d/attachment-0328.html From pete.flugstad at gmail.com Thu Aug 3 14:32:04 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 15:32:04 -0500 Subject: [Rxtx] slow startup In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Message-ID: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> On 8/3/06, Kharbanda, Pawan wrote: > RXTX does open and close the ports in Windows. Try downloading utility > like PORTMON(only for windows) and you can see that whenever you load RXTX > it tries to register all the available COMM ports in the system. It is a > little slow if you have virtual ports, we use digi as a terminal server, Its > going to get worst of you have comm ports in 100's Okay, I can understand that, but from the PORTMON output, it looks like it's opening each port TWICE: 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS ... 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS Also, assuming instead of listing the ports I wanted to just open one, I'm still seeing the 30 second delay, so it's scanning at startup regardless of what the Java code is going to do. Probably necessary, but annoying. I know, I know, contribute patches... :-) Thanks, Pete From tjarvi at qbang.org Thu Aug 3 15:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 15:04:42 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: On Thu, 3 Aug 2006, Pete Flugstad wrote: > On 8/3/06, Kharbanda, Pawan wrote: >> RXTX does open and close the ports in Windows. Try downloading utility >> like PORTMON(only for windows) and you can see that whenever you load RXTX >> it tries to register all the available COMM ports in the system. It is a >> little slow if you have virtual ports, we use digi as a terminal server, Its >> going to get worst of you have comm ports in 100's > > Okay, I can understand that, but from the PORTMON output, it looks > like it's opening each port TWICE: > > 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > ... > 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > > Also, assuming instead of listing the ports I wanted to just open one, > I'm still seeing the 30 second delay, so it's scanning at startup > regardless of what the Java code is going to do. Probably necessary, > but annoying. > > I know, I know, contribute patches... :-) > I think this problem is in RXTXCommDriver.java. I've just not tracked it down but it should be in the java code, not the native code so easy enough to track down. -- Trent Jarvi tjarvi at qbang.org From jvermillard at archean.fr Fri Aug 4 03:43:28 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:43:28 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: <1154684608.6181.4.camel@localhost.localdomain> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > Hi, > > > > I'm a developer of the Apache MINA framework. It's a network application > > framework which helps users develop high performance and high > > scalability network applications easily. > > http://directory.apache.org/subprojects/mina/index.html . I would like > > to integrate serial connection to the framework (actualy supporting TCP, > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > An Apache License would be pretty usefull for me and integrate rxtx > > functionnalities easly. > > > > Thanks, > > > > Julien > > > > Hi Julien > > The rxtx license itself will not change. This is just the interface. > You would be free to implement an rxtx replacement if the LGPL low level > code is a problem for you. These licensing details would make it possible > to take the interface code instead of needing to recode them for a new > project. > > You are probably confusing the license problems with the GPL not the LGPL > though you can share links to concerns off the list if you would like to > go through them. > > -- > Trent Jarvi > tjarvi at qbang.org Hi, I'm not a license expert but some guys at ASF said me you can't call LGPLed libs from java. some peoples interprete that as static linking and not dynamic linking (no idea why). So ASF/BSD licensied interface willl solve the license probleme. If you got some questions about the ASL and the way you can dual license LGPL/ASL you can ask it on legal-discuss at apache.org Julien -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/8d46c0aa/smime-0328.bin From jvermillard at archean.fr Fri Aug 4 03:51:30 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:51:30 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <1154685091.6181.6.camel@localhost.localdomain> erm from java -> from ASLed Java code Le vendredi 04 ao?t 2006 ? 11:43 +0200, Julien Vermillard a ?crit : > Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > Hi, > > I'm not a license expert but some guys at ASF said me you can't call > LGPLed libs from java. some peoples interprete that as static linking > and not dynamic linking (no idea why). So ASF/BSD licensied interface > willl solve the license probleme. > > If you got some questions about the ASL and the way you can dual license > LGPL/ASL you can ask it on legal-discuss at apache.org > > Julien > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dcc29d70/smime-0328.bin From guille at sms.nl Fri Aug 4 04:35:24 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Fri, 04 Aug 2006 12:35:24 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <7.0.1.0.0.20060804123322.036dc748@sms.nl> At 11:43 04/08/2006, Julien Vermillard wrote: >Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > >Hi, > >I'm not a license expert but some guys at ASF said me you can't call >LGPLed libs from java. some peoples interprete that as static linking >and not dynamic linking (no idea why). This interpretation is wrong. See the official position of the FSF regarding the LGPL and Java: http://www.gnu.org/licenses/lgpl-java.html http://www.fsf.org/licensing/licenses/lgpl-java.html Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From hambyiii at hotmail.com Fri Aug 4 04:52:47 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 10:52:47 +0000 Subject: [Rxtx] error getting InputStream Message-ID: Hi, I have written a program in Java for Windows xp using RXTX (which is why I am using this mailing list :). However, I am getting a problem. I am connecting to a serial port, like so: private CommPortIdentifier portID; private boolean openPort(String selectedPort) { boolean portFound = false; Enumeration portList; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portID.getName().equals(selectedPort)) { portFound = true; break; } } } return portFound; } and then I try and get the serial port input stream (leaving out the try and catch for the sake of space): SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); InputStream inputStream = serialPort.getInputStream(); but on the getInputStream() I get the following error message: Bad file descriptor in nativeavailable I cannot figure out where it is going wrong...anyone any ideas. A quick answer would be wonderful, as I am kinda under the hammer to get this fixed quickly Thanks in Advance Keith From tjarvi at qbang.org Fri Aug 4 05:13:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 05:13:19 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <7.0.1.0.0.20060804123322.036dc748@sms.nl> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> <7.0.1.0.0.20060804123322.036dc748@sms.nl> Message-ID: On Fri, 4 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 11:43 04/08/2006, Julien Vermillard wrote: >> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : >>> On Thu, 3 Aug 2006, Julien Vermillard wrote: >>> >>>> Hi, >>>> >>>> I'm a developer of the Apache MINA framework. It's a network application >>>> framework which helps users develop high performance and high >>>> scalability network applications easily. >>>> http://directory.apache.org/subprojects/mina/index.html . I would like >>>> to integrate serial connection to the framework (actualy supporting TCP, >>>> UDP (broadcast) and in VM communications), but LGPL is an issue for me. >>>> >>>> An Apache License would be pretty usefull for me and integrate rxtx >>>> functionnalities easly. >>>> >>>> Thanks, >>>> >>>> Julien >>>> >>> >>> Hi Julien >>> >>> The rxtx license itself will not change. This is just the interface. >>> You would be free to implement an rxtx replacement if the LGPL low level >>> code is a problem for you. These licensing details would make it possible >>> to take the interface code instead of needing to recode them for a new >>> project. >>> >>> You are probably confusing the license problems with the GPL not the LGPL >>> though you can share links to concerns off the list if you would like to >>> go through them. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >> >> Hi, >> >> I'm not a license expert but some guys at ASF said me you can't call >> LGPLed libs from java. some peoples interprete that as static linking >> and not dynamic linking (no idea why). > > This interpretation is wrong. See the official position of the FSF regarding > the LGPL and Java: > > http://www.gnu.org/licenses/lgpl-java.html > > http://www.fsf.org/licensing/licenses/lgpl-java.html > What I do with legal groups that go down that rat hole is give them a copy of the rxtx 2.0 license. Since the confused legal folks are going in a direction that does not represent the intent of the license or authors at that point and are confused about basic things in our industry that most consider facts, the discussions are very short. The rxtx 2.0 license just adds the following and has for 6 years or so. Not because the lawyers are right. They get confused about intent and even facts. The following is added to make confused lawyers that cant understand intent go far away and never come back. period. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. From hambyiii at hotmail.com Fri Aug 4 05:42:21 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 11:42:21 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Okay, I made a little mistake in my last message. The error is not occuring where I thought it was. Instead it is occuring when I do the following: byte[] readBuffer = new byte[128]; try { int numBytes = 0; try { Thread.sleep(500); } catch (InterruptedException e) {} while (inputStream.available() > 0) { numBytes = inputStream.read(readBuffer); } processReceivedData(readBuffer, numBytes); } catch (IOException e) { System.out.println(e.getMessage()); } So I guess the error is happening on the inputStream.read(readBuffer) again, any help is appreciated and again, thanks in advance Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 10:52:47 +0000 > >Hi, > >I have written a program in Java for Windows xp using RXTX (which is why I >am using this mailing list :). However, I am getting a problem. I am >connecting to a serial port, like so: > private CommPortIdentifier portID; > > private boolean openPort(String selectedPort) > { > boolean portFound = false; > Enumeration portList; > > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portID.getName().equals(selectedPort)) > { > portFound = true; > break; > } > } > } > > return portFound; > } > >and then I try and get the serial port input stream (leaving out the try >and >catch for the sake of space): > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >InputStream inputStream = serialPort.getInputStream(); > >but on the getInputStream() I get the following error message: > >Bad file descriptor in nativeavailable > >I cannot figure out where it is going wrong...anyone any ideas. A quick >answer would be wonderful, as I am kinda under the hammer to get this fixed >quickly > >Thanks in Advance >Keith > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From hambyiii at hotmail.com Fri Aug 4 07:08:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:08:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Hi, I know I am replying to myself a lot at the moment, but more information has come to light (These errors are actually happening on a client machine, on software that has worked for the past month, and only now has started to fail, which is why I am a little slow finding things out) The errors I have already written about are only symptoms of an orignal error. The original error occurs the first time I try to WRITE thte OutputStream: OutputStream oStream = serialPort.getOutputStream(); serialPort.notifyOnOutputEmpty(true); byte[] bs = encodeMessage(configString.toString()); oStream.write(bs); oStream.flush(); The error occurs on oStream.write(bs); and is: Input/output error in writeArray Now writeArray is native code, so I have no idea what is going on there. Any help would be appreciated Thanks Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 11:42:21 +0000 > >Okay, I made a little mistake in my last message. > >The error is not occuring where I thought it was. Instead it is occuring >when I do the following: > >byte[] readBuffer = new byte[128]; > >try { > > int numBytes = 0; > try { > Thread.sleep(500); > } > catch (InterruptedException e) > {} > > while (inputStream.available() > 0) > { > numBytes = inputStream.read(readBuffer); > } > > processReceivedData(readBuffer, numBytes); >} >catch (IOException e) >{ > System.out.println(e.getMessage()); >} > >So I guess the error is happening on the inputStream.read(readBuffer) > >again, any help is appreciated and again, thanks in advance >Keith > > >From: "Keith Thorne" > >Reply-To: RXTX Developers and Users > >To: rxtx at qbang.org > >Subject: [Rxtx] error getting InputStream > >Date: Fri, 04 Aug 2006 10:52:47 +0000 > > > >Hi, > > > >I have written a program in Java for Windows xp using RXTX (which is why >I > >am using this mailing list :). However, I am getting a problem. I am > >connecting to a serial port, like so: > > private CommPortIdentifier portID; > > > > private boolean openPort(String selectedPort) > > { > > boolean portFound = false; > > Enumeration portList; > > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > > while (portList.hasMoreElements()) > > { > > portID = (CommPortIdentifier) portList.nextElement(); > > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > > { > > if (portID.getName().equals(selectedPort)) > > { > > portFound = true; > > break; > > } > > } > > } > > > > return portFound; > > } > > > >and then I try and get the serial port input stream (leaving out the try > >and > >catch for the sake of space): > > > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); > >InputStream inputStream = serialPort.getInputStream(); > > > >but on the getInputStream() I get the following error message: > > > >Bad file descriptor in nativeavailable > > > >I cannot figure out where it is going wrong...anyone any ideas. A quick > >answer would be wonderful, as I am kinda under the hammer to get this >fixed > >quickly > > > >Thanks in Advance > >Keith > > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Aug 4 07:26:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: Hi Keith Can you tell us more about the physical serial port? Might it be 'vanishing?' On Fri, 4 Aug 2006, Keith Thorne wrote: > Hi, > > I know I am replying to myself a lot at the moment, but more information has > come to light (These errors are actually happening on a client machine, on > software that has worked for the past month, and only now has started to > fail, which is why I am a little slow finding things out) > > The errors I have already written about are only symptoms of an orignal > error. The original error occurs the first time I try to WRITE thte > OutputStream: > > OutputStream oStream = serialPort.getOutputStream(); > serialPort.notifyOnOutputEmpty(true); > > byte[] bs = encodeMessage(configString.toString()); > > oStream.write(bs); > oStream.flush(); > > The error occurs on oStream.write(bs); and is: > > Input/output error in writeArray > > Now writeArray is native code, so I have no idea what is going on there. Any > help would be appreciated > Thanks > Keith > > >> From: "Keith Thorne" >> Reply-To: RXTX Developers and Users >> To: rxtx at qbang.org >> Subject: Re: [Rxtx] error getting InputStream >> Date: Fri, 04 Aug 2006 11:42:21 +0000 >> >> Okay, I made a little mistake in my last message. >> >> The error is not occuring where I thought it was. Instead it is occuring >> when I do the following: >> >> byte[] readBuffer = new byte[128]; >> >> try { >> >> int numBytes = 0; >> try { >> Thread.sleep(500); >> } >> catch (InterruptedException e) >> {} >> >> while (inputStream.available() > 0) >> { >> numBytes = inputStream.read(readBuffer); >> } >> >> processReceivedData(readBuffer, numBytes); >> } >> catch (IOException e) >> { >> System.out.println(e.getMessage()); >> } >> >> So I guess the error is happening on the inputStream.read(readBuffer) >> >> again, any help is appreciated and again, thanks in advance >> Keith >> >>> From: "Keith Thorne" >>> Reply-To: RXTX Developers and Users >>> To: rxtx at qbang.org >>> Subject: [Rxtx] error getting InputStream >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 >>> >>> Hi, >>> >>> I have written a program in Java for Windows xp using RXTX (which is why >> I >>> am using this mailing list :). However, I am getting a problem. I am >>> connecting to a serial port, like so: >>> private CommPortIdentifier portID; >>> >>> private boolean openPort(String selectedPort) >>> { >>> boolean portFound = false; >>> Enumeration portList; >>> >>> portList = CommPortIdentifier.getPortIdentifiers(); >>> >>> while (portList.hasMoreElements()) >>> { >>> portID = (CommPortIdentifier) portList.nextElement(); >>> if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) >>> { >>> if (portID.getName().equals(selectedPort)) >>> { >>> portFound = true; >>> break; >>> } >>> } >>> } >>> >>> return portFound; >>> } >>> >>> and then I try and get the serial port input stream (leaving out the try >>> and >>> catch for the sake of space): >>> >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >>> InputStream inputStream = serialPort.getInputStream(); >>> >>> but on the getInputStream() I get the following error message: >>> >>> Bad file descriptor in nativeavailable >>> >>> I cannot figure out where it is going wrong...anyone any ideas. A quick >>> answer would be wonderful, as I am kinda under the hammer to get this >> fixed >>> quickly >>> >>> Thanks in Advance >>> Keith >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From hambyiii at hotmail.com Fri Aug 4 07:52:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:52:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more information >has > > come to light (These errors are actually happening on a client machine, >on > > software that has worked for the past month, and only now has started to > > fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an orignal > > error. The original error occurs the first time I try to WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); > >> } > >> catch (IOException e) > >> { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance > >> Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I am > >>> connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Fri Aug 4 08:21:07 2006 From: gergg at cox.net (Gregg Wonderly) Date: Fri, 04 Aug 2006 09:21:07 -0500 Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: <44D357D3.40303@cox.net> Keith Thorne wrote: > Okay, I made a little mistake in my last message. > > The error is not occuring where I thought it was. Instead it is occuring > when I do the following: > > byte[] readBuffer = new byte[128]; > > try { > > } > catch (IOException e) > { > System.out.println(e.getMessage()); > } > > So I guess the error is happening on the inputStream.read(readBuffer) This is one of the most frustrating things to see over and over. The exception tells you exactly which line the error is occuring on, if you will use it to see where. In Java, these days, every class should do the following. import java.util.logging.*; public class MyClass { Logger log = Logger.getLogger( getClass().getName() ); ...in some method... { String data = ...; // any extra data like addresses or // ports which might be wrong and // cause an exception. try { ... } catch( SomeException ex ) { log.log( Level.SEVERE, ex.toString()+": "+data, ex ); } } } By default, you will see all of the appropriate details of any exception logged at the WARNING or SEVERE level. You can read the javadocs about logging to get more information too. Once you do this, people can then turn up logging and get more information, or otherwise manage it with a logging configuration file or other tools such as JMX or my http://logman.dev.java.net project. Gregg Wonderly From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 09:15:24 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 09:15:24 -0600 Subject: [Rxtx] error getting InputStream Message-ID: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Keith, Please send the full stack trace of the exception, may be I can help you. On Trent's question regarding physical 'Serial Port', do you mean you have a USB(Connected to Client Machine) to 9 Pin Serial cable(Connected to H/W device)? Also please mention which java version you are using? Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Keith Thorne Sent: Friday, August 04, 2006 7:52 AM To: rxtx at qbang.org Subject: Re: [Rxtx] error getting InputStream The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more > > information >has > > come to light (These errors are actually happening on a client > > machine, >on > > software that has worked for the past month, and only now has > > started to fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an > > orignal error. The original error occurs the first time I try to > > WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); } catch (IOException > >> e) { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the > >> inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which > >>> is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I > >>> am connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out > >>> the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get > >>> this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 14:36:16 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 14:36:16 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Trent, As discussed over the phone yesterday, I am emailing you all the details of the bugs I have been experiencing. We do not use Serial Ports like most of the applications. Our application uses approx 80 -100 serial ports (attached thru Digi boxes) which are opened and closed every 20 sec to 1 minute depending upon the type of device. Some Serial ports are left opened all the time and receive event based serial calls while other devices uses polling (request and reply) to collect data. So the opening and closing of the Serial Ports is not really in a sequential order as you mentioned in our conversation yesterday. Also 2 same serial ports can never be opened at one time we have business locks to prevent that from happening. Our findings so far (of course with the help of RXTX user group): The real culprit is in the SerialImp.c file, somehow the other the Event Info Structure in the Linked List gets damaged and loses references to the original EIS structure. I believe both the problems are caused because of the corruption of EIS packet. I have noticed that the link list traversal of EIS in the following methods under SerialImp.c : 1)initialise_event_info_struct 2)finalize_event_info_struct 3)interruptEventLoop So culprit code might be in one of these methods. I am currently using JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and Fedora Core 5). I am also attaching a Test Class to replicate the problem. You need to modify the class and add your systems Serial ports into the code and execute. java TestOpenClosePort 100 It will open and close all the serial ports 100 times in there own thread. Please let me know, I will be available thru out this weekend and can help you as much as I can with testing. Regards Pawan Kharbanda CDOT-ITS 303-478-2991 (cell) 303-985-4350 (home) -------------- next part -------------- A non-text attachment was scrubbed... Name: TestOpenClosePort.java Type: application/octet-stream Size: 6139 bytes Desc: TestOpenClosePort.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dd3754d9/TestOpenClosePort-0327.obj From tjarvi at qbang.org Fri Aug 4 15:43:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 15:43:09 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: Thanks, I'll look at it tomorrow morning. I don't know when I'll find the solution but you may check email tomorrow afternoon to see if I think I found it. On Fri, 4 Aug 2006, Kharbanda, Pawan wrote: > Trent, > As discussed over the phone yesterday, I am emailing you all the > details of the bugs I have been experiencing. We do not use Serial Ports > like most of the applications. Our application uses approx 80 -100 > serial ports (attached thru Digi boxes) which are opened and closed > every 20 sec to 1 minute depending upon the type of device. Some Serial > ports are left opened all the time and receive event based serial calls > while other devices uses polling (request and reply) to collect data. So > the opening and closing of the Serial Ports is not really in a > sequential order as you mentioned in our conversation yesterday. Also 2 > same serial ports can never be opened at one time we have business locks > to prevent that from happening. > > Our findings so far (of course with the help of RXTX user group): > > The real culprit is in the SerialImp.c file, somehow the other the Event > Info Structure in the Linked List gets damaged and loses references to > the original EIS structure. I believe both the problems are caused > because of the corruption of EIS packet. I have noticed that the link > list traversal of EIS in the following methods under SerialImp.c : > > 1)initialise_event_info_struct > 2)finalize_event_info_struct > 3)interruptEventLoop > > So culprit code might be in one of these methods. I am currently using > JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and > Fedora Core 5). > > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > > Regards > Pawan Kharbanda > CDOT-ITS > 303-478-2991 (cell) > 303-985-4350 (home) > > > > > > > > > > From tjarvi at qbang.org Sat Aug 5 12:32:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:32:40 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:34:27 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:34:27 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> You need to run it few times. More the number of ports, more frequently you can reproduce. With just 2 ports it will be hard to reproduce frequently. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:33 PM To: Kharbanda, Pawan Cc: tjarvi at qbang.org; RXTX Developers and Users Subject: Re: Port Locking / JVM Crashing > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Aug 5 12:52:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:52:26 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> Message-ID: Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more frequently > you can reproduce. With just 2 ports it will be hard to reproduce > frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:57:49 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:57:49 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Trent, I have 5 ports of Digi and I can reproduce almost every time. Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX version -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:52 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more > frequently you can reproduce. With just 2 ports it will be hard to > reproduce frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need >> to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From tjarvi at qbang.org Sat Aug 5 13:06:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:06:07 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Message-ID: You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few thousand > iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:07:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:07:33 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E659@hqexchange3.dot.state.co.us> We use our own locks but I haven't turned off the RXTX locks. I am still using the RXTX locks that might be the difference. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:13:22 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:13:22 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Trent, How can you turn off the lock files? I can try using that. I never tried that, I thought you can't turn off the file locking. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From tjarvi at qbang.org Sat Aug 5 13:18:53 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:18:53 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Message-ID: Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java > -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except lockfiles > are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:31:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:31:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Trent, I am able to constantly replicate almost everytime even when I have locks disabled. Don't know the reason why you are not able to on your environment. Any suggestions??????? Cycle No (Thread ::: /dev/cuf04) ::::::: 7 Cycle No (Thread ::: /dev/cuf01) ::::::: 7 Cycle No (Thread ::: /dev/cuf02) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) Exiting Thread ::: /dev/cuf03 Cycle No (Thread ::: /dev/cuf03) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent Port /dev/cuf01 is Opened 0x01 Sent Port /dev/cub01 is Opened 0x01 Sent Port /dev/cuf01 is Closed Port /dev/cuf02 is Closed Port /dev/cuf03 is Closed Port /dev/cuf04 is Closed Port /dev/cub01 is Closed Exiting Thread ::: /dev/cuf03 Exiting Thread ::: /dev/cuf02 Cycle No (Thread ::: /dev/cuf03) ::::::: 8 Cycle No (Thread ::: /dev/cuf02) ::::::: 8 Exiting Thread ::: /dev/cuf04 Exiting Thread ::: /dev/cuf01 Cycle No (Thread ::: /dev/cuf01) ::::::: 8 Cycle No (Thread ::: /dev/cuf04) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened 0x01 Sent Port /dev/cuf01 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 # # An error report file with more information is saved as hs_err_pid21386.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:19 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) > 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux > java -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except > lockfiles are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code >>>> and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm >>> running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From tjarvi at qbang.org Sat Aug 5 14:14:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 14:14:49 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: I'd stick a couple $15 dual port serial boards in the machine to see if its kernel driver specific. I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more problematic. They do not get the same number of eyes looking for problems. You could try putting #undef TIOCSERGETLSR #undef TIOCGICOUNT in the very top of SerialImp.h or one or the other to flip bits of code off and on. The kernel here is 2.6.11.4-20a-smp from Suse. glibc is 2.3.4-23.4 from Suse the jre is 1.5.0_06-b05 from Sun. The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC ram. You should be able to reproduce what I'm seeing then go from there. I don't think I'm going to see this problem without having the same cornercase hardware you have. Maybe we can work that out off the list but I doubt I'm going to find it in rxtx at this point. I have seen problems in the past were kernel structs don't match user space struct and bad things happen but I was including a kernel struct to get functionality that had not made its way into user space at the time. The only thing I may be missing is that when I write 0x01 out the port, nothing comes back. That was not specified but you could easily disconnect anything connected to the ports to see if that changes anything. rxtx is far from bug free but I do not see anything yet. On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I am able to constantly replicate almost everytime even when I have > locks disabled. Don't know the reason why you are not able to on your > environment. Any suggestions??????? > > > Cycle No (Thread ::: /dev/cuf04) ::::::: 7 > Cycle No (Thread ::: /dev/cuf01) ::::::: 7 > Cycle No (Thread ::: /dev/cuf02) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > Exiting Thread ::: /dev/cuf03 > Cycle No (Thread ::: /dev/cuf03) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > Port /dev/cuf01 is Opened > 0x01 Sent > Port /dev/cub01 is Opened > 0x01 Sent > Port /dev/cuf01 is Closed > Port /dev/cuf02 is Closed > Port /dev/cuf03 is Closed > Port /dev/cuf04 is Closed > Port /dev/cub01 is Closed > Exiting Thread ::: /dev/cuf03 > Exiting Thread ::: /dev/cuf02 > Cycle No (Thread ::: /dev/cuf03) ::::::: 8 > Cycle No (Thread ::: /dev/cuf02) ::::::: 8 > Exiting Thread ::: /dev/cuf04 > Exiting Thread ::: /dev/cuf01 > Cycle No (Thread ::: /dev/cuf01) ::::::: 8 > Cycle No (Thread ::: /dev/cuf04) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > 0x01 Sent > Port /dev/cuf01 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 > # > # An error report file with more information is saved as > hs_err_pid21386.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > Aborted > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:19 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Lockfiles are a compile time option. I've turned them on now, corrected > a mistake resulting in only 3 ports being used and now have it going > through a few hundred iterations again without a crash. > > To disable lockfiles.. > > ./configure --disable-lockfiles && make install > > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > Port /dev/ttyS5 is Closed > Exiting Thread ::: /dev/ttyS1 > Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: > /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting > Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port > /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS1 is Closed > Port /dev/ttyS4 is Closed > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > > > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, How can you turn off the lock files? I can try using that. I >> never tried that, I thought you can't turn off the file locking. >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:06 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> You may try 4 ports instead of 5 to make sure thats not the issue. >> >> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >> 2.6.11.4-20a-smp >> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >> java -version java version "1.5.0_06" >> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >> >> I'm using rxtx 2.1-7 (final) with default configuration except >> lockfiles are disabled. I gathered that you are doing your own > resource locking. >> >> ... >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> ... >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>> version >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:52 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> Whats a few times? I've got 4 ports here and have run it a few >>> thousand iterations. >>> >>> Is that true for you if you run it with just four of your DIGI ports? >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> You need to run it few times. More the number of ports, more >>>> frequently you can reproduce. With just 2 ports it will be hard to >>>> reproduce frequently. >>>> >>>> ~pk >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:33 PM >>>> To: Kharbanda, Pawan >>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>> Subject: Re: Port Locking / JVM Crashing >>>> >>>>> I am also attaching a Test Class to replicate the problem. You need > >>>>> to >>>> >>>>> modify the class and add your systems Serial ports into the code >>>>> and >> >>>>> execute. >>>>> >>>>> java TestOpenClosePort 100 >>>>> >>>>> It will open and close all the serial ports 100 times in there own >>>>> thread. >>>>> >>>>> Please let me know, I will be available thru out this weekend and >>>>> can >>> >>>>> help you as much as I can with testing. >>>>> >>>> >>>> How reproducable is the problem with the above testcase? I'm >>>> running >> >>>> 100's of iterations without reproducing the problem. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> >>> >> > From rtlane01 at comcast.net Tue Aug 1 19:22:03 2006 From: rtlane01 at comcast.net (Randall T. Lane) Date: Tue, 01 Aug 2006 21:22:03 -0400 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] Message-ID: <44CFFE3B.90001@comcast.net> Rxtx Community: Please see my e-mail to Trent. Does anyone have any experience using rxtx to successfully communicate with hardware via USB? Thanks. Randy Lane -------------- next part -------------- An embedded message was scrubbed... From: Trent Jarvi Subject: Re: Help with RxTx for USB Communication Date: Tue, 1 Aug 2006 18:49:13 -0600 (MDT) Size: 3300 Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060801/9bbbc255/HelpwithRxTxforUSBCommunication-0325.mht From naranjo.manuel at gmail.com Sun Aug 6 16:59:28 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Sun, 06 Aug 2006 19:59:28 -0300 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44CFFE3B.90001@comcast.net> References: <44CFFE3B.90001@comcast.net> Message-ID: <44D67450.8010100@gmail.com> Randy: I have been able to communicate to AIRcable USB Bluetooth Dongle, with success. I'm not sure which are the options that you have to send to RXTX library, but you can indeed. Check that you do not have the port avaible for much long. I have heard of a problem with WinXP that it simply turn off virtual ports when they are too much long with out activity. If you want I can send you my code, because it is avaible under GPL, the new release is not avaible at AIRcable web site, but it should in short time. Regards, Manu > Rxtx Community: > > Please see my e-mail to Trent. Does anyone have any experience using > rxtx to successfully communicate with hardware via USB? > > Thanks. > > Randy Lane > > ------------------------------------------------------------------------ > > Asunto: > Re: Help with RxTx for USB Communication > De: > Trent Jarvi > Fecha: > Tue, 1 Aug 2006 18:49:13 -0600 (MDT) > Para: > "Randall T. Lane" > > Para: > "Randall T. Lane" > CC: > taj at www.linux.org.uk > > > On Tue, 1 Aug 2006, Randall T. Lane wrote: > >> Trent, >> >> I am working on a project written in Java (1.5) and need to >> communicate to an external device via a USB port. >> >> I have downloaded rxtx-2.1-7-bins-r2.zip from www.rxtx.org and setup >> a Java test project to learn how to use rxtx. I am able to list the >> serial ports available, however rxtx does not recognize my USB port. >> I am running on Windows XP. Here is some output from my test project >> ... >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> COM1 - Serial >> COM3 - Serial >> LPT1 - Parallel >> >> I would appreciate any help you could provide in getting rxtx to >> allow me to communicate via my USB port. >> >> Here is my code, if that would help. >> >> public static void main(String[] args) { >> listPorts(); >> // The listPorts() and getPortTypeName() methods are used for >> port identification. >> static void listPorts() >> { >> Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); >> while ( portEnum.hasMoreElements() ) >> { >> CommPortIdentifier portIdentifier = (CommPortIdentifier) >> portEnum.nextElement(); >> System.out.println(portIdentifier.getName() + " - " + >> getPortTypeName(portIdentifier.getPortType()) ); >> } } >> static String getPortTypeName ( int portType ) >> { >> switch ( portType ) >> { >> case CommPortIdentifier.PORT_I2C: >> return "I2C"; >> case CommPortIdentifier.PORT_PARALLEL: >> return "Parallel"; >> case CommPortIdentifier.PORT_RAW: >> return "Raw"; >> case CommPortIdentifier.PORT_RS485: >> return "RS485"; >> case CommPortIdentifier.PORT_SERIAL: >> return "Serial"; >> default: >> return "unknown type"; >> } >> } >> >> Thanks. >> >> Randy Lane >> > > Hi Randy > > The rxtx mail list is a better place to ask as there are more eyes. > I'm swamped with work. > > Be sure to look to see that your serial port dongle shows up as a > serial port in device manager and no other applications have it open. > USB serial dongles do work with rxtx. Some are less complete than > others. > > -- > Trent Jarvi > tjarvi at qbang.org > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From eddythejekyll at gmail.com Sun Aug 6 23:31:45 2006 From: eddythejekyll at gmail.com (Ed) Date: Sun, 6 Aug 2006 23:31:45 -0600 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? Message-ID: I have written a simple client server (RMI) application without using RxTx where the server controls a parallel port simply by addressing the port and banging the bits in order to drive a relay. It also reads the port's. I am doing this by making Runtime.exec calls to a binary that actually does the parallel port bit banging and reading. However, I'd like to use RxTx so it is a pure Java application, and I've so far installed and figured out how to discover the ports, but I'm having trouble finding good examples or some howto type documentation for this. I did find the two examples on the Wiki: one for serial IO and the other to discover the ports on a system. As I said, I have so far installed RxTx and gotten it to compile and run and I can identify the ports. When I run the server I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found Ports! Found port COM1 Found port COM3 Found port LPT1 LPT1 Not Currently owned EASSwitch Server starting. EASSwitch is bound. Server Ready. So it looks like thing are installed and working, but I feel all dressed up and no idea how to proceed. Basically, I just want to be able to toggle the data lines on the parallel port and read them. Very simple. No parallel printer type usage. Are there any examples I can work off of? If so, please advise. Thank you. -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060806/c7e39898/attachment-0325.html From hambyiii at hotmail.com Sun Aug 6 23:53:54 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Mon, 07 Aug 2006 05:53:54 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Message-ID: Hi, sorry I took the weekend to reply, but I was away for the last couple of days. Unfortunately I cannot send the full stack trace yet. The problem is not, unfortunately, happening on my computer, but on a clients computer, which I will go and visit today. I will hopefully be able to get a stack trace then. As to the physical connection, tt is indeed a USB from the computer, connected to a 9 pin serial device that connects to the hard-ware. My java version is 1.5.06 >From: "Kharbanda, Pawan" >Reply-To: RXTX Developers and Users >To: "RXTX Developers and Users" >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 09:15:24 -0600 > >Keith, > Please send the full stack trace of the exception, may be I can help >you. On Trent's question regarding physical 'Serial Port', do you mean >you have a USB(Connected to Client Machine) to 9 Pin Serial >cable(Connected to H/W device)? > >Also please mention which java version you are using? > >Thanks >Pawan Kharbanda > > >-----Original Message----- >From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >Of Keith Thorne >Sent: Friday, August 04, 2006 7:52 AM >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream > >The physical serial port is actually a USB connection that is then >changed to a "virtual serial port", so I can use the serial port >protocols to connect to it. The other end of the connection is a >hardware device that is constantly turned on. I am not sure about the >port 'vanishing'...we have another piece of software that came with the >hardware device, which we can test the device (and with it the virtual >serial port) with. This has no problem connecting to the serial port or >writing to/reading from the device. >It is only when my software is run, that the error occurs. Like I have >said, my software (using rxtx) is connecting to the serial port >successfully, but it is when I try and write to the serial port that I >get the error. > >Although to be truthful, I am not absolutely certain if the error is >happening on the oStream.write() or the oStream.flush(). I only think it >is the write(), because that is where the writeArray() function is >called. > >thanks >Keith > > > >From: Trent Jarvi > >Reply-To: RXTX Developers and Users > >To: RXTX Developers and Users > >Subject: Re: [Rxtx] error getting InputStream > >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > > > > >Hi Keith > > > >Can you tell us more about the physical serial port? Might it be > >'vanishing?' > > > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > > > Hi, > > > > > > I know I am replying to myself a lot at the moment, but more > > > information > >has > > > come to light (These errors are actually happening on a client > > > machine, > >on > > > software that has worked for the past month, and only now has > > > started to fail, which is why I am a little slow finding things out) > > > > > > The errors I have already written about are only symptoms of an > > > orignal error. The original error occurs the first time I try to > > > WRITE thte > > > OutputStream: > > > > > > OutputStream oStream = serialPort.getOutputStream(); > > > serialPort.notifyOnOutputEmpty(true); > > > > > > byte[] bs = encodeMessage(configString.toString()); > > > > > > oStream.write(bs); > > > oStream.flush(); > > > > > > The error occurs on oStream.write(bs); and is: > > > > > > Input/output error in writeArray > > > > > > Now writeArray is native code, so I have no idea what is going on >there. > >Any > > > help would be appreciated > > > Thanks > > > Keith > > > > > > > > >> From: "Keith Thorne" > > >> Reply-To: RXTX Developers and Users > > >> To: rxtx at qbang.org > > >> Subject: Re: [Rxtx] error getting InputStream > > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > > >> > > >> Okay, I made a little mistake in my last message. > > >> > > >> The error is not occuring where I thought it was. Instead it is > >occuring > > >> when I do the following: > > >> > > >> byte[] readBuffer = new byte[128]; > > >> > > >> try { > > >> > > >> int numBytes = 0; > > >> try { > > >> Thread.sleep(500); > > >> } > > >> catch (InterruptedException e) > > >> {} > > >> > > >> while (inputStream.available() > 0) > > >> { > > >> numBytes = inputStream.read(readBuffer); > > >> } > > >> > > >> processReceivedData(readBuffer, numBytes); } catch (IOException > > >> e) { > > >> System.out.println(e.getMessage()); > > >> } > > >> > > >> So I guess the error is happening on the > > >> inputStream.read(readBuffer) > > >> > > >> again, any help is appreciated and again, thanks in advance Keith > > >> > > >>> From: "Keith Thorne" > > >>> Reply-To: RXTX Developers and Users > > >>> To: rxtx at qbang.org > > >>> Subject: [Rxtx] error getting InputStream > > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > > >>> > > >>> Hi, > > >>> > > >>> I have written a program in Java for Windows xp using RXTX (which > > >>> is > >why > > >> I > > >>> am using this mailing list :). However, I am getting a problem. I > > >>> am connecting to a serial port, like so: > > >>> private CommPortIdentifier portID; > > >>> > > >>> private boolean openPort(String selectedPort) > > >>> { > > >>> boolean portFound = false; > > >>> Enumeration portList; > > >>> > > >>> portList = CommPortIdentifier.getPortIdentifiers(); > > >>> > > >>> while (portList.hasMoreElements()) > > >>> { > > >>> portID = (CommPortIdentifier) portList.nextElement(); > > >>> if (portID.getPortType() == > >CommPortIdentifier.PORT_SERIAL) > > >>> { > > >>> if (portID.getName().equals(selectedPort)) > > >>> { > > >>> portFound = true; > > >>> break; > > >>> } > > >>> } > > >>> } > > >>> > > >>> return portFound; > > >>> } > > >>> > > >>> and then I try and get the serial port input stream (leaving out > > >>> the > >try > > >>> and > > >>> catch for the sake of space): > > >>> > > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", > >2000); > > >>> InputStream inputStream = serialPort.getInputStream(); > > >>> > > >>> but on the getInputStream() I get the following error message: > > >>> > > >>> Bad file descriptor in nativeavailable > > >>> > > >>> I cannot figure out where it is going wrong...anyone any ideas. A > >quick > > >>> answer would be wonderful, as I am kinda under the hammer to get > > >>> this > > >> fixed > > >>> quickly > > >>> > > >>> Thanks in Advance > > >>> Keith > > >>> > > >>> > > >>> _______________________________________________ > > >>> Rxtx mailing list > > >>> Rxtx at qbang.org > > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > > >> > > >> > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Aug 7 06:22:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:22:03 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: Hmm.. I left the test running went I went home Saturday. It looks like something did show up after ~30k iterations. I'll look at it more in my free time. Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS5 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 29417 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 29417 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 29417 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00002aab14c2ec63, pid=20573, tid=1095125344 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6c63] initialise_event_info_struct+0x63 # [thread 1087756640 also had an error] Port /dev/ttyS5 is Opened 0x01 Sent [thread 1089861984 also had an error] Port /dev/ttyS4 is Opened 0x01 Sent [thread 1090914656 also had an error] # An error report file with more information is saved as [thread 1090914656 also had an error] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted On Sat, 5 Aug 2006, Trent Jarvi wrote: > > I'd stick a couple $15 dual port serial boards in the machine to see if its > kernel driver specific. > > I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more > problematic. They do not get the same number of eyes looking for problems. > > You could try putting > > #undef TIOCSERGETLSR > #undef TIOCGICOUNT > > in the very top of SerialImp.h or one or the other to flip bits of code off > and on. > > The kernel here is 2.6.11.4-20a-smp from Suse. > glibc is 2.3.4-23.4 from Suse > the jre is 1.5.0_06-b05 from Sun. > > The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC > ram. > > You should be able to reproduce what I'm seeing then go from there. I don't > think I'm going to see this problem without having the same cornercase > hardware you have. Maybe we can work that out off the list but I doubt I'm > going to find it in rxtx at this point. > > I have seen problems in the past were kernel structs don't match user space > struct and bad things happen but I was including a kernel struct to get > functionality that had not made its way into user space at the time. > > The only thing I may be missing is that when I write 0x01 out the port, > nothing comes back. That was not specified but you could easily disconnect > anything connected to the ports to see if that changes anything. > > rxtx is far from bug free but I do not see anything yet. > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, >> I am able to constantly replicate almost everytime even when I have >> locks disabled. Don't know the reason why you are not able to on your >> environment. Any suggestions??????? >> >> >> Cycle No (Thread ::: /dev/cuf04) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> Exiting Thread ::: /dev/cuf03 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> Port /dev/cuf01 is Opened >> 0x01 Sent >> Port /dev/cub01 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Closed >> Port /dev/cuf02 is Closed >> Port /dev/cuf03 is Closed >> Port /dev/cuf04 is Closed >> Port /dev/cub01 is Closed >> Exiting Thread ::: /dev/cuf03 >> Exiting Thread ::: /dev/cuf02 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 8 >> Exiting Thread ::: /dev/cuf04 >> Exiting Thread ::: /dev/cuf01 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf04) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 >> # >> # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 >> # >> # An error report file with more information is saved as >> hs_err_pid21386.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> Aborted >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:19 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Lockfiles are a compile time option. I've turned them on now, corrected >> a mistake resulting in only 3 ports being used and now have it going >> through a few hundred iterations again without a crash. >> >> To disable lockfiles.. >> >> ./configure --disable-lockfiles && make install >> >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> Port /dev/ttyS5 is Closed >> Exiting Thread ::: /dev/ttyS1 >> Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: >> /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting >> Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port >> /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> >> >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, How can you turn off the lock files? I can try using that. I >>> never tried that, I thought you can't turn off the file locking. >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 1:06 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> You may try 4 ports instead of 5 to make sure thats not the issue. >>> >>> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >>> 2.6.11.4-20a-smp >>> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >>> java -version java version "1.5.0_06" >>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >>> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >>> >>> I'm using rxtx 2.1-7 (final) with default configuration except >>> lockfiles are disabled. I gathered that you are doing your own >> resource locking. >>> >>> ... >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> Port /dev/ttyS4 is Closed >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> ... >>> >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>>> version >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:52 PM >>>> To: Kharbanda, Pawan >>>> Cc: Trent Jarvi; RXTX Developers and Users >>>> Subject: RE: Port Locking / JVM Crashing >>>> >>>> >>>> Whats a few times? I've got 4 ports here and have run it a few >>>> thousand iterations. >>>> >>>> Is that true for you if you run it with just four of your DIGI ports? >>>> >>>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>>> >>>>> You need to run it few times. More the number of ports, more >>>>> frequently you can reproduce. With just 2 ports it will be hard to >>>>> reproduce frequently. >>>>> >>>>> ~pk >>>>> >>>>> -----Original Message----- >>>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>>> Sent: Saturday, August 05, 2006 12:33 PM >>>>> To: Kharbanda, Pawan >>>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>>> Subject: Re: Port Locking / JVM Crashing >>>>> >>>>>> I am also attaching a Test Class to replicate the problem. You need >> >>>>>> to >>>>> >>>>>> modify the class and add your systems Serial ports into the code >>>>>> and >>> >>>>>> execute. >>>>>> >>>>>> java TestOpenClosePort 100 >>>>>> >>>>>> It will open and close all the serial ports 100 times in there own >>>>>> thread. >>>>>> >>>>>> Please let me know, I will be available thru out this weekend and >>>>>> can >>>> >>>>>> help you as much as I can with testing. >>>>>> >>>>> >>>>> How reproducable is the problem with the above testcase? I'm >>>>> running >>> >>>>> 100's of iterations without reproducing the problem. >>>>> >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> >>>> >>> >> > From iinjlv01 at gmail.com Mon Aug 7 06:22:07 2006 From: iinjlv01 at gmail.com (J LV) Date: Mon, 7 Aug 2006 14:22:07 +0200 Subject: [Rxtx] Data lost or Slow sampling Message-ID: Hello I am using RXTX to comm with a motion controller using Serial Port and i can write the commands using SerialPort or RXTXPort without problems, but when i try write and read at high sampling rate, for example to know the position and speed at every moment of a trajectory, i obtain a very irregular response times. I am using the most simple algorimth: 1-Write the command "is trajectory finished?" and wait for SerialPortEvent.DATA_AVAILABLE 2-Read the InputStreamReader of serial port while not empty 3-If trajectory finished then stop program, else, continue 4-Read actual time using System.currentTimeMillis() (t0) 5-Write the command "give me position" and wait for SerialPortEvent.DATA_AVAILABLE 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) 7-Read the InputStreamReader of serial port while not empty 8-Save position in Vector or ArrayList and repeat from 1 I don't know if the problem is the RXTX, my program or the motion controller hardware but i have response times from 16 millis to 78 millis at 19200 bauds!. I am using SwingWorked to threading SerialPort reading/writing process. Any idea or similar data leak problem? Thanks for RXTX project and sorry for my badde english! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/909a4cb3/attachment-0325.html From tjarvi at qbang.org Mon Aug 7 06:50:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:50:10 -0600 (MDT) Subject: [Rxtx] Data lost or Slow sampling In-Reply-To: References: Message-ID: On Mon, 7 Aug 2006, J LV wrote: > Hello > > I am using RXTX to comm with a motion controller using Serial Port and i can > write the commands using SerialPort or RXTXPort without problems, but when i > try write and read at high sampling rate, for example to know the position > and speed at every moment of a trajectory, i obtain a very irregular > response times. I am using the most simple algorimth: > 1-Write the command "is trajectory finished?" and wait for > SerialPortEvent.DATA_AVAILABLE > 2-Read the InputStreamReader of serial port while not empty > 3-If trajectory finished then stop program, else, continue > 4-Read actual time using System.currentTimeMillis() (t0) > 5-Write the command "give me position" and wait for > SerialPortEvent.DATA_AVAILABLE > 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) > 7-Read the InputStreamReader of serial port while not empty > 8-Save position in Vector or ArrayList and repeat from 1 > > > I don't know if the problem is the RXTX, my program or the motion controller > hardware but i have response times from 16 millis to 78 millis at 19200 > bauds!. I am using SwingWorked to threading SerialPort reading/writing > process. > > Any idea or similar data leak problem? > > Thanks for RXTX project and sorry for my badde english! > This can be platform dependant. What you may do for a starting point is use a loopback connection and time the same thing at 19200. Write the date, wait for data available, read the data. I would expect from write to data available to take around 10 ms from past experiences. You can experiment with turning on and off buffering in the port settings of the OS, if the OS supports more realtime like interrupts, that could help. You have a java schedual and the kernel schedual. Serial interrupts traditionally have very high priority but modern OSs tend to realize thats not good for GUIs, ... and delay responding to the interrupts. You should be able to have usec response times in a realtime OS. Windows and Linux are not typically setup as realtime OSs. For comparison, the last time I looked which was about 5 years ago, windows NT4 came back with data available in 8 ms and Linux came back in 10 ms. I would be interested in seeing what you get today. -- Trent Jarvi tjarvi at qbang.org From gergg at cox.net Mon Aug 7 09:21:56 2006 From: gergg at cox.net (Gregg Wonderly) Date: Mon, 07 Aug 2006 10:21:56 -0500 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? In-Reply-To: References: Message-ID: <44D75A94.9030205@cox.net> Ed wrote: > Are there any examples I can work off of? If so, please advise. Just read the javax.comm javadocs. You need to take the parallel port and write values to it based on which bits of which lines you want on and off. Gregg Wonderly From pete.flugstad at gmail.com Mon Aug 7 09:36:19 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 7 Aug 2006 10:36:19 -0500 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44D67450.8010100@gmail.com> References: <44CFFE3B.90001@comcast.net> <44D67450.8010100@gmail.com> Message-ID: <84d4a6d50608070836v97e9a29q96e98441ea903ac7@mail.gmail.com> FYI, I'm talking to a USB<->Serial dongle just fine under Windows XP Pro. I did have to install a driver for the thing - Windows XP by default, did not recognize it. Once installed, it just showed up as another COM port, and I've been pushing data over it with no problems. Pete From savagobr at yahoo.com Mon Aug 7 10:13:06 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Mon, 7 Aug 2006 09:13:06 -0700 (PDT) Subject: [Rxtx] Port Locking / JVM Crashing: 2 ports (Serial + usb) Message-ID: <20060807161306.9648.qmail@web53803.mail.yahoo.com> Trent This is curious, since I did reproduced the aformentioned bug using only 2 ports: /dev/ttyS0 and /dev/ttyUSB0. It only need to run for 500 times: $ java -cp . TestOpenClosePort 500 500 Port /dev/ttyS0 is Closed Excpetion ::: Thread ::: /dev/ttyUSB0null Exiting Thread ::: /dev/ttyUSB0 Cycle No (Thread ::: /dev/ttyUSB0) ::::::: 227 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 184 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x203d2044, pid=32368, tid=2986859424 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing) # Problematic frame: # C 0x203d2044 # # An error report file with more information is saved as /tmp/hs_err_pid32368.log # # If you would like to submit a bug report, please visit: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Best regards Savago ps: Test environment $ uname -a Linux localhost.localdomain 2.6.15-1.2054_FC5 #1 Tue Mar 14 15:48:33 EST 2006 i686 i686 i386 GNU/Linux $ java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) $gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.1 20060525 (Red Hat 4.1.1-1) --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/c6ca8094/attachment-0324.html From Pawan.Kharbanda at dot.state.co.us Mon Aug 7 17:23:25 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 7 Aug 2006 17:23:25 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Trent, I think I got the problem fixed after some code changes in the C (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the staging environment (with 10 devices) with real time data and haven't seen a JVM lock/ Port locking since last night. I am going to do further stress testing and will send all my code changes and my findings in next few days. I believe the problem was causing due to the digi drivers and how the Linux kernel talked to it, so after making some code changes and synchronization fixes, I got it to work. I am keeping my fingers crossed :) Thanks for all your help. You have been a great help. Will keep you posted. Cheers ~pk PS : We are going to test my new RXTX changes with the 2.6 Red Hat kernel (currently using 2.4.21-37.ELsmp) too. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 5:08 PM To: Kharbanda, Pawan Subject: RE: Port Locking / JVM Crashing Hi Pawan As mentioned I did reproduce the error but after several hours of cycles. I'm looking at RXTXPort.java and thinking about what may be happening. The error is in the C layer but it may be preventable in the java code. lets say two closes are overlapping or an operation is trying to happen while another port is closing. The structure may be out of sync by the time the code using the structure in another thread gets to the event info struct. So I'm wondering if synchronization in RXTXPort() and close() may help you. A second thing that may help is you can put printf("got here\n"); in each of the lines in initialize event info struct to verify that the problem is in walking the linked list. Thats my suspicion. So a properly timed close() while calling the constructor may be catching rxtx off guard. You can synchronize to test that and it may do away with the problem. From tjarvi at qbang.org Mon Aug 7 18:01:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 18:01:54 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Message-ID: Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do further > stress testing and will send all my code changes and my findings in next > few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to happen > while another port is closing. The structure may be out of sync by the > time the code using the structure in another thread gets to the event > info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may do > away with the problem. > From Pawan.Kharbanda at dot.state.co.us Tue Aug 8 13:49:14 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 8 Aug 2006 13:49:14 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Trent, I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and have absolutely no problem with JVM crashing or Port Locking even after 10000 operations (now I am trying 100,000 :). This is all with the original RXTX 2.1.7 (final) api's without any of my fixes that I have been trying for last 2-3 weeks. I will suggest that we update the INSTALL or Readme file accompnying the RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: 82000685_G 02/02/2006). This should helped everybody using the RXTX API's with RedHat Linux atleast. Regards Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 6:02 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do > further stress testing and will send all my code changes and my > findings in next few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers > crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to > happen while another port is closing. The structure may be out of > sync by the time the code using the structure in another thread gets > to the event info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may > do away with the problem. > From jimo at earthlink.net Wed Aug 9 21:21:00 2006 From: jimo at earthlink.net (Jim Owen) Date: Wed, 9 Aug 2006 20:21:00 -0700 Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat Message-ID: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Hi All, I've run into some difficulties with rxtx that have me baffled and need some help. I have an application that has used earlier versions of rxtx successfully and on a variety of platforms. We recently needed to deploy this application into an environment where we could not utilize lock files. I pulled down the 2.0.7 pre1 source distribution and executed configure with --disable-lockfiles. I then executed make and make install. When I execute the program, as root, I get the following error: ************************************************************************ Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) # Problematic frame: # C 0x00001004 # # An error report file with more information is saved as hs_err_pid20151.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # **************************************************************************** If I execute as a normal user, I get no errors, but no ports listed: (Using an earlier version, I get a serial and parallel port listed.) **************************************************************************** [jim at linuxDev ingenicoApp]$ java VerifyCommBuild Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Some ports appear to have been found, let's try to enumerate them. Complete. **************************************************************************** When I built rxtx, there was a warning given of the following: **************************************************************************** conftest.c: In function 'main': conftest.c:6: warning: incompatible implicit declaration of built-in function 'printf' conftest.c:7: warning: incompatible implicit declaration of built-in function 'exit' WARNING: Kernel include files do not match the current kernel **************************************************************************** uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux JAVA_HOME=/usr/java/j2sdk1.4.2_11 javax.comm.properties: Driver=gnu.io.RXTXCommDriver Here's the code for VerifyCommBuild.java that I'm using to test: **************************************************************************** import javax.comm.*; import java.util.Enumeration; /** * A quick app to check that the javax.comm (Serial) Communications extension has been properly * installed and configured on this machine. * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. */ public class VerifyCommBuild { public static void main(String args[]) { Enumeration ports; System.out.println("Verifying Comm Build Environment"); try { ports = CommPortIdentifier.getPortIdentifiers(); if (ports == null) { System.out.println("No comm ports found!"); return; } System.out.println("Some ports appear to have been found, let's try to enumerate them."); while (ports.hasMoreElements()) { System.out.println("Here is a port [" + ((CommPortIdentifier)ports.nextElement()).getName() + "]"); } } catch (Exception e) { System.out.println("Failed to enumerate ports [" + e.getMessage() + "]"); e.printStackTrace(); } System.out.println("Complete."); } } **************************************************************************** Any suggestions as to what I'm missing? Thanks, Jim Owen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060809/92503a81/attachment-0322.html From tjarvi at qbang.org Thu Aug 10 05:39:36 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 05:39:36 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Message-ID: On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even after > 10000 operations (now I am trying 100,000 :). This is all with the > original RXTX 2.1.7 (final) api's without any of my fixes that I have > been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying the > RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp > and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From oliver.archner at bayceer.uni-bayreuth.de Wed Aug 9 06:13:36 2006 From: oliver.archner at bayceer.uni-bayreuth.de (Oliver Archner) Date: Wed, 09 Aug 2006 14:13:36 +0200 Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() Message-ID: <44D9D170.5020806@bayceer.uni-bayreuth.de> Dear Users, i would like to send a byte to a parallel device. The following piece of code works well but throws an IOException in LPRPort$ParallelOutputStream.write() saying that everything is ok ?! Oliver import java.io.*; import gnu.io.*; public class Test { public static void main(String[] args) { RXTXCommDriver TxPort = new RXTXCommDriver(); ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", CommPortIdentifier.PORT_PARALLEL); OutputStream oStream = null; try { oStream = pPort.getOutputStream(); oStream.write((byte)0x51); } catch (IOException e) { e.printStackTrace(); } finally { try { if (oStream != null) oStream.close(); } catch (IOException e) { e.printStackTrace(); } } } } Output: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Der Vorgang wurde erfolgreich beendet. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at Test.main(Test.java:12) From tjarvi at qbang.org Thu Aug 10 18:12:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 18:12:27 -0600 (MDT) Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() In-Reply-To: <44D9D170.5020806@bayceer.uni-bayreuth.de> References: <44D9D170.5020806@bayceer.uni-bayreuth.de> Message-ID: On Wed, 9 Aug 2006, Oliver Archner wrote: > Dear Users, > > i would like to send a byte to a parallel device. > The following piece of code works well but throws an IOException in > LPRPort$ParallelOutputStream.write() saying that everything is ok ?! > > Oliver > > > import java.io.*; > import gnu.io.*; > > public class Test { > > public static void main(String[] args) { > RXTXCommDriver TxPort = new RXTXCommDriver(); > ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", > CommPortIdentifier.PORT_PARALLEL); > OutputStream oStream = null; > try { > oStream = pPort.getOutputStream(); > oStream.write((byte)0x51); > } catch (IOException e) { > e.printStackTrace(); > } finally { > try { > if (oStream != null) oStream.close(); > } catch (IOException e) { > e.printStackTrace(); > > } > } > > } > } > > Output: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Der Vorgang wurde erfolgreich beendet. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at Test.main(Test.java:12) WriteFile is returning a negative value or 0. I do not know what that exception is saying but it should be an IO Exception. The native code in question is line 405 in ParallelImp.c. If you find the documentation pointing out how the code is wrong, we can fix it. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 08:12:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 09:12:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question Message-ID: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Hello, I'm trying to send data over a serial port using the RXTX libraries. I've got the binaries for Windows XP from qbang.org. On the receiving side, I'm using event notification (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial Ports InputStream. Similarly on the transmist side, I use SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. First question: does this make sense? The code was largely adopted from an existing Windows C++ program and that's more or less how it operated (overlapped io using ReadFile, WriteFile, GetOverlappedResult, Events, etc). Second question: in a small standalone test program I wrote, everything seems to work just fine - whenever SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good chunk of data available (I explicitly set the in/out buffers to 1024 bytes) to read. However, when I pull my "library" into a much larger environment (OSGI framework based, but same JVM/OS/etc), whenever SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a byte or two available. Needless to say, this really kills performance. Everything appears to still operate properly, just really, really slowly. So, has anyone seen this problem before? I haven't dived into the details of RXTX library, and I'm wondering what the mechanism is here? How does the RXTX thread determine when to issue the SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to tweak in RXTX or the JVM to get this to operate more like the small test program? Seems like I want RXTX to call me back _less_ often. Thanks, Pete From tjarvi at qbang.org Fri Aug 11 09:55:23 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 09:55:23 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Hello, > > I'm trying to send data over a serial port using the RXTX > libraries. I've got the binaries for Windows XP from qbang.org. > > On the receiving side, I'm using event notification > (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial > Ports InputStream. Similarly on the transmist side, I use > SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. > > First question: does this make sense? The code was largely adopted > from an existing Windows C++ program and that's more or less how it > operated (overlapped io using ReadFile, WriteFile, > GetOverlappedResult, Events, etc). > > Second question: in a small standalone test program I wrote, > everything seems to work just fine - whenever > SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good > chunk of data available (I explicitly set the in/out buffers to 1024 > bytes) to read. > > However, when I pull my "library" into a much larger environment > (OSGI framework based, but same JVM/OS/etc), whenever > SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a > byte or two available. Needless to say, this really kills > performance. Everything appears to still operate properly, just > really, really slowly. > > So, has anyone seen this problem before? I haven't dived into the > details of RXTX library, and I'm wondering what the mechanism is here? > How does the RXTX thread determine when to issue the > SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to > tweak in RXTX or the JVM to get this to operate more like the small > test program? > Seems like I want RXTX to call me back _less_ often. > Hi Pete RXTX is doing overlapped IO in termios.c. In this file we map the windows functionality to termios (mostly POSIX). From there, we just talk termios to all platforms. What I guess is happening is the eventloop is waiting a specified amount of time. As you application uses more cpu cycles, you observe the difference in behavior. You could go into the C code and change this after looking at the eventLoop() code in serialImp.c and following that to the serial_ioctl() and serial_select() in termios.c Another option is to go into RXTXPort.java and put a sleep in the sendEvent() code. This way you would not have to recompile the native code (not very easy at this point). -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 13:27:36 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:27:36 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > Another option is to go into RXTXPort.java and put a sleep in the > sendEvent() code. This way you would not have to recompile the native > code (not very easy at this point). Are the instructions in the INSTALL file still valid? If so, it wasn't very hard to build it (I already had MinGW installed). Everything seemed to build just fine. Haven't tried to install/use it yet, but it wasn't a big deal (assuming those instructions were correct. Thanks, Pete From pete.flugstad at gmail.com Fri Aug 11 13:42:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:42:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, but there doesn't appear to be a way to select that via RXTX (which appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control is selected). Is there a way I'm not seeing? Thanks, Pete From eddythejekyll at gmail.com Fri Aug 11 15:20:44 2006 From: eddythejekyll at gmail.com (Ed) Date: Fri, 11 Aug 2006 15:20:44 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion Message-ID: I'm trying to read and write a parallel port on a standard (Dell) pc running RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. I'm having problems getting rxtx to return a port enumeration from getPortIdentifiers. I'm using a file PortChooser.java as a test file to get things going. This is from the Java CookBook 2nd edition (Chapter 12). The call // get list of ports available on this particular computer, // by calling static method in CommPortIdentifier. Enumeration pList = CommPortIdentifier.getPortIdentifiers(); returns a null pList; I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and compile without --disable-lockfiles I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ... When I compile with --disable-lockfiles the call to getPortIdentifiers simply returns a null Enumeration. I've read the documention and threads about this issue and I feel like I've tried everything, so at the moment I'm stumped. I can supply any further info that may help. Thanks in advance. Ed -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060811/80c4eeec/attachment-0320.html From tjarvi at qbang.org Fri Aug 11 18:29:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:29:48 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > On 8/11/06, Trent Jarvi wrote: >> Another option is to go into RXTXPort.java and put a sleep in the >> sendEvent() code. This way you would not have to recompile the native >> code (not very easy at this point). > > Are the instructions in the INSTALL file still valid? If so, it > wasn't very hard to build it > (I already had MinGW installed). Everything seemed to build just > fine. Haven't tried to install/use it yet, but it wasn't a big deal > (assuming those instructions were correct. > Hi Pete The instructions are correct. You will want to make sure that the exports worked. If the library does not work properly, then the exports failed. The exports are currently generated with nm, sed and grep in the Makefile which is often commented out. If the def file is old, it will cause problems. You should be good to go then. Look at the serial_select and eventLoop code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:33:32 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:33:32 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > but there doesn't appear to be a way to select that via RXTX (which > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > is selected). > > Is there a way I'm not seeing? > Hi Pete I'm guessing I didn't know the difference. At the time, I really didn't have windows API documentation. I just had some pages I found with altivista/google. Later microsoft made their documentation available on msdn or I learned about it. For rxtx, the calls need to be platform neutral. So if you see how to do each in termios, then we can get it going. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:45:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:45:24 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Fri, 11 Aug 2006, Ed wrote: > I'm trying to read and write a parallel port on a standard (Dell) pc running > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. > > I'm having problems getting rxtx to return a port enumeration from > getPortIdentifiers. I'm using a file > PortChooser.java as a test file to get things going. This is from the Java > CookBook 2nd edition (Chapter 12). The call > > // get list of ports available on this particular computer, > // by calling static method in CommPortIdentifier. > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > returns a null pList; > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and > compile without --disable-lockfiles I get: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > ... > > When I compile with --disable-lockfiles the call to getPortIdentifiers > simply returns a null Enumeration. > > I've read the documention and threads about this issue and I feel like I've > tried everything, so at the moment I'm stumped. > > I can supply any further info that may help. > > Thanks in advance. > > Ed > Hi Ed You may want to check the permissions of /dev/lp*. Also make sure lp or your kernel support for lp is loaded. It should show up in dmesg and lsmod. For my laptop with no printer port enabled in BIOS is see: lp: driver loaded but no devices found in desg |grep lp [] $ ls -l /dev/lp* crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 here root and group lp can read and write. Normal users cannot. Try a simple read as a user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: Permission denied Fix as root [] chmod 666 /dev/lp* [] $ ls -l /dev/lp* crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 Now as user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: No such device or address So this is saying there is no lp0 on my laptop. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:58:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:58:31 -0600 (MDT) Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat In-Reply-To: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> References: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Message-ID: On Wed, 9 Aug 2006, Jim Owen wrote: > Hi All, > > I've run into some difficulties with rxtx that have me baffled and need > some help. > > I have an application that has used earlier versions of rxtx > successfully and on a variety of platforms. We recently needed to deploy > this application into an environment where we could not utilize lock files. > > I pulled down the 2.0.7 pre1 source distribution and executed configure > with --disable-lockfiles. I then executed make and make install. > > When I execute the program, as root, I get the following error: > > ************************************************************************ > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) > # Problematic frame: > # C 0x00001004 > # > # An error report file with more information is saved as hs_err_pid20151.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > **************************************************************************** > > If I execute as a normal user, I get no errors, but no ports listed: > (Using an earlier version, I get a serial and parallel port listed.) > > **************************************************************************** > [jim at linuxDev ingenicoApp]$ java VerifyCommBuild > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Some ports appear to have been found, let's try to enumerate them. > Complete. > **************************************************************************** > > When I built rxtx, there was a warning given of the following: > > **************************************************************************** > conftest.c: In function 'main': > conftest.c:6: warning: incompatible implicit declaration of built-in > function 'printf' > conftest.c:7: warning: incompatible implicit declaration of built-in > function 'exit' > > WARNING: Kernel include files do not match the current kernel > **************************************************************************** > > > uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 > Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux > > JAVA_HOME=/usr/java/j2sdk1.4.2_11 > > javax.comm.properties: Driver=gnu.io.RXTXCommDriver > > Here's the code for VerifyCommBuild.java that I'm using to test: > > > **************************************************************************** > import javax.comm.*; > import java.util.Enumeration; > /** > * A quick app to check that the javax.comm (Serial) Communications > extension has been properly > * installed and configured on this machine. > * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. > */ > public class VerifyCommBuild > { > public static void main(String args[]) > { > Enumeration ports; > System.out.println("Verifying Comm Build Environment"); > try > { > ports = CommPortIdentifier.getPortIdentifiers(); > if (ports == null) > { > System.out.println("No comm ports found!"); > return; > } > System.out.println("Some ports appear to have been found, let's > try to enumerate them."); > while (ports.hasMoreElements()) > { > System.out.println("Here is a port [" + > ((CommPortIdentifier)ports.nextElement()).getName() > + "]"); > } > } catch (Exception e) > { > System.out.println("Failed to enumerate ports [" + > e.getMessage() + "]"); > e.printStackTrace(); > } > System.out.println("Complete."); > } > } > Hi Jim This is a new one to me. Have you tried it on another system. Maybe something isnt sane in your toolchain. -- Trent Jarvi tarvi at qbang.org From eddythejekyll at gmail.com Sat Aug 12 11:45:39 2006 From: eddythejekyll at gmail.com (Ed) Date: Sat, 12 Aug 2006 11:45:39 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Trent, Right after I sent the results indicated below I re-ran the app and it apparently found the parallel port. The difference was that I set the permissions to : /dev: wildcard lp* crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 I'm still not sure how to interpret the dmesg and lsmod before. However I'm thinking that since the user now has permission to access the lp* port, a request to access it loaded the lp and parport modules automatically and allowed me access. Here's the output of lsmod now: ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp lp 5540 0 (autoclean) parport 21608 1 (autoclean) [parport_pc lp] and dmesg: ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp On node 0 totalpages: 161776 lp0: using parport0 (polling). So I think I'm good, and ready to move on the next steps. Thanks Trent! Ed On 8/12/06, Ed wrote: > > Thanks for the reply Trent. > > I'm on a different system today but am trying your suggestons. This is a > debian 3.1r2 system and I'm running jdk 1.5.0_04. > > Take a look below, but I think I have no parallel port support on this > kernel, however I never get the "No such device or address" return from the > cat call as you did so I'm not sure how to interpret the results. > > When I run the test program (PortChooser.java), the getPortIdentifiers > call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is > more than I found on the RedHat system. Incidently --disable-lockfiles has > no effect. > > It looks as though there is no parallel support in this kernel: > falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > On node 0 totalpages: 161776 > falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > > I'm a little confused by the results when I cat to the lp0 device. It > seems from the dmesg output that I don't have parallel printer support, but > when I cat to the lp0 device, I get permission denied if I'm non-root user > and input/output error if I'm root. Apparently this means I have the device, > but no support in the kernel? > > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > ed at falcon:~/src/workspace/EASServer/src$ su > Password: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > > Here's my lp* device permissions. > /dev: > wildcard lp* > crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > If I change it to > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I get: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > falcon:/home/ed/src/workspace/EASServer/src# exit > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > cat: /dev/lp0: Input/output error > ed at falcon:~/src/workspace/EASServer/src$ > > What do you think? Should I recompile the kernel or is it something else? > > By the way, I added the user ed to the lp and uucp groups on this system. > > Thanks again, > > Ed > > On 8/11/06, Trent Jarvi wrote: > > > > On Fri, 11 Aug 2006, Ed wrote: > > > > > I'm trying to read and write a parallel port on a standard (Dell) pc > > running > > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > > gates. > > > > > > I'm having problems getting rxtx to return a port enumeration from > > > getPortIdentifiers. I'm using a file > > > PortChooser.java as a test file to get things going. This is from the > > Java > > > CookBook 2nd edition (Chapter 12). The call > > > > > > // get list of ports available on this particular computer, > > > // by calling static method in CommPortIdentifier. > > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > > > > > returns a null pList; > > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure > > and > > > compile without --disable-lockfiles I get: > > > > > > Stable Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7 > > > Java lib Version = RXTX-2.1-7 > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > ... > > > > > > When I compile with --disable-lockfiles the call to getPortIdentifiers > > > > > simply returns a null Enumeration. > > > > > > I've read the documention and threads about this issue and I feel like > > I've > > > tried everything, so at the moment I'm stumped. > > > > > > I can supply any further info that may help. > > > > > > Thanks in advance. > > > > > > Ed > > > > > > > Hi Ed > > > > You may want to check the permissions of /dev/lp*. Also make sure lp or > > your kernel support for lp is loaded. It should show up in dmesg and > > lsmod. > > > > For my laptop with no printer port enabled in BIOS is see: > > > > lp: driver loaded but no devices found > > > > in desg |grep lp > > > > [] $ ls -l /dev/lp* > > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > here root and group lp can read and write. Normal users cannot. > > > > Try a simple read as a user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > > > > Fix as root > > > > [] chmod 666 /dev/lp* > > [] $ ls -l /dev/lp* > > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > Now as user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: No such device or address > > > > So this is saying there is no lp0 on my laptop. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > > > -- > > Ed > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060812/c2afe1f8/attachment-0319.html From tjarvi at qbang.org Sat Aug 12 14:01:52 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 12 Aug 2006 14:01:52 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Remember that the lp code expects a printer - or something like it. There is a line that specifies the printer is online. If you are doing hobby work, you will need to raise that line or loop it back to something that is raised. If you just try reading a port with no device connected and online, there will be an error while trying to read. This should be addressed in the mail-list archives. On Sat, 12 Aug 2006, Ed wrote: > Trent, > Right after I sent the results indicated below I re-ran the app and it > apparently found the parallel port. The difference was that I set the > permissions to : > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I'm still not sure how to interpret the dmesg and lsmod before. However I'm > thinking that since the user now has permission to access the lp* port, a > request to access it loaded the lp and parport modules automatically and > allowed me access. Here's the output of lsmod now: > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > lp 5540 0 (autoclean) > parport 21608 1 (autoclean) [parport_pc lp] > > and dmesg: > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > On node 0 totalpages: 161776 > lp0: using parport0 (polling). > > So I think I'm good, and ready to move on the next steps. > > Thanks Trent! > > Ed > > > On 8/12/06, Ed wrote: >> >> Thanks for the reply Trent. >> >> I'm on a different system today but am trying your suggestons. This is a >> debian 3.1r2 system and I'm running jdk 1.5.0_04. >> >> Take a look below, but I think I have no parallel port support on this >> kernel, however I never get the "No such device or address" return from the >> cat call as you did so I'm not sure how to interpret the results. >> >> When I run the test program (PortChooser.java), the getPortIdentifiers >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is >> more than I found on the RedHat system. Incidently --disable-lockfiles has >> no effect. >> >> It looks as though there is no parallel support in this kernel: >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp >> On node 0 totalpages: 161776 >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp >> >> I'm a little confused by the results when I cat to the lp0 device. It >> seems from the dmesg output that I don't have parallel printer support, but >> when I cat to the lp0 device, I get permission denied if I'm non-root user >> and input/output error if I'm root. Apparently this means I have the >> device, >> but no support in the kernel? >> >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> >> cat: /dev/lp0: Permission denied >> ed at falcon:~/src/workspace/EASServer/src$ su >> Password: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> >> Here's my lp* device permissions. >> /dev: >> wildcard lp* >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> If I change it to >> /dev: >> wildcard lp* >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> I get: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> falcon:/home/ed/src/workspace/EASServer/src# exit >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> ed at falcon:~/src/workspace/EASServer/src$ >> >> What do you think? Should I recompile the kernel or is it something else? >> >> By the way, I added the user ed to the lp and uucp groups on this system. >> >> Thanks again, >> >> Ed >> >> On 8/11/06, Trent Jarvi wrote: >> > >> > On Fri, 11 Aug 2006, Ed wrote: >> > >> > > I'm trying to read and write a parallel port on a standard (Dell) pc >> > running >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the >> > gates. >> > > >> > > I'm having problems getting rxtx to return a port enumeration from >> > > getPortIdentifiers. I'm using a file >> > > PortChooser.java as a test file to get things going. This is from the >> > Java >> > > CookBook 2nd edition (Chapter 12). The call >> > > >> > > // get list of ports available on this particular computer, >> > > // by calling static method in CommPortIdentifier. >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); >> > > >> > > returns a null pList; >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure >> > and >> > > compile without --disable-lockfiles I get: >> > > >> > > Stable Library >> > > ========================================= >> > > Native lib Version = RXTX-2.1-7 >> > > Java lib Version = RXTX-2.1-7 >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > ... >> > > >> > > When I compile with --disable-lockfiles the call to getPortIdentifiers >> > >> > > simply returns a null Enumeration. >> > > >> > > I've read the documention and threads about this issue and I feel like >> > I've >> > > tried everything, so at the moment I'm stumped. >> > > >> > > I can supply any further info that may help. >> > > >> > > Thanks in advance. >> > > >> > > Ed >> > > >> > >> > Hi Ed >> > >> > You may want to check the permissions of /dev/lp*. Also make sure lp or >> > your kernel support for lp is loaded. It should show up in dmesg and >> > lsmod. >> > >> > For my laptop with no printer port enabled in BIOS is see: >> > >> > lp: driver loaded but no devices found >> > >> > in desg |grep lp >> > >> > [] $ ls -l /dev/lp* >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > here root and group lp can read and write. Normal users cannot. >> > >> > Try a simple read as a user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: Permission denied >> > >> > Fix as root >> > >> > [] chmod 666 /dev/lp* >> > [] $ ls -l /dev/lp* >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > Now as user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: No such device or address >> > >> > So this is saying there is no lp0 on my laptop. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > >> >> >> >> -- >> >> Ed >> > > > > From pete.flugstad at gmail.com Mon Aug 14 07:51:41 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 08:51:41 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: <84d4a6d50608140651h3cb2266ap90c47780abace00@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > On Fri, 11 Aug 2006, Pete Flugstad wrote: > > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > > but there doesn't appear to be a way to select that via RXTX (which > > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > > is selected). > > I'm guessing I didn't know the difference. At the time, I really didn't > have windows API documentation. I just had some pages I found with > altivista/google. Later microsoft made their documentation available on > msdn or I learned about it. > > For rxtx, the calls need to be platform neutral. So if you see how to do > each in termios, then we can get it going. so, RTSCTS_IN/OUT at the COMM API is mapped to HARDWARE_FLOW_CONTROL in the POSIX layer. Which termios.c maps to RTS_CONTROL_HANDSHAKE and fOutxCtsFlow = true. Since termios.c is Windows only anway... Would it work to change the mapping in termios.c to map hardware flow control to RTS_CONTROL_TOGGLE? I just wondering (I'm going to go look, but there's a lot of code in there) if the code does anything special playing with flow control signals? Thanks, Pete From pete.flugstad at gmail.com Mon Aug 14 09:42:48 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 10:42:48 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> On 8/3/06, Trent Jarvi wrote: > On Thu, 3 Aug 2006, Pete Flugstad wrote: > > Okay, I can understand that, but from the PORTMON output, it looks > > like it's opening each port TWICE: > > I think this problem is in RXTXCommDriver.java. I've just not tracked it > down but it should be in the java code, not the native code so easy > enough to track down. Okay, I'm trying to track this down... Looks like the CommPortIdentifier static initializer loads RXTXCommDriver, and then calls RXTXDriver.initialize. But then CommPortIdentifier.getPortIdentifiers does the exact same thing. So that's where the two scans are coming from. I would guess that one or the other can be removed? Probably the one in the CommPortIdentifier.getPortIdentifiers? Doing so removes the 2nd scan. Pete PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) val = System.getProperty("gnu.io.SerialPorts"); Shouldn't the comparison be != null? getProperty returns null if the variable is NOT found, and you only want to assign to val if it IS found, right? Same thing for the parallel port case. End result is the same I guess, since you check for null later, but probably should be fixed. From eddythejekyll at gmail.com Mon Aug 14 11:55:17 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 11:55:17 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: When I try to get the mode with int mode = pPort.getMode(); it returns 0 which isn't any of the valid modes. I tried setting it explicitely with pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced the requested mode in nativeSetSerialPortParams at gnu.io.LPRPort.setLPRMode(Native Method) at gnu.io.LPRPort.setMode(LPRPort.java:87) Except for LPT_MODE_ANY, but the getMode call still failed out with an invalid state. I'm wondering if it's because I don't have the line pulled high like you said. This isn't a printer connected. It's a relay board with pins 2-9 tied to data, and 18-25 to gnd. The rest are open. I looked at a DB25 pinout diagram and I'm not sure which pin I need to tie high, and I looked through the archives, but didn't find a reference to something definitive. Can someone help me with which pin is the "online" pin as Trent mentioned? DB25 spec has ( I hope this formats correctly in this email) BUSY (11), SEL (13) or INIT (16) are candidates, but I'm guessing. Any clues? *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Thanks, Ed On 8/12/06, Trent Jarvi wrote: > > > Remember that the lp code expects a printer - or something like it. There > is a line that specifies the printer is online. If you are doing hobby > work, you will need to raise that line or loop it back to something that > is raised. > > If you just try reading a port with no device connected and online, there > will be an error while trying to read. This should be addressed in the > mail-list archives. > > On Sat, 12 Aug 2006, Ed wrote: > > > Trent, > > Right after I sent the results indicated below I re-ran the app and it > > apparently found the parallel port. The difference was that I set the > > permissions to : > > /dev: > > wildcard lp* > > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > > > I'm still not sure how to interpret the dmesg and lsmod before. However > I'm > > thinking that since the user now has permission to access the lp* port, > a > > request to access it loaded the lp and parport modules automatically and > > allowed me access. Here's the output of lsmod now: > > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > > lp 5540 0 (autoclean) > > parport 21608 1 (autoclean) [parport_pc lp] > > > > and dmesg: > > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > > On node 0 totalpages: 161776 > > lp0: using parport0 (polling). > > > > So I think I'm good, and ready to move on the next steps. > > > > Thanks Trent! > > > > Ed > > > > > > On 8/12/06, Ed wrote: > >> > >> Thanks for the reply Trent. > >> > >> I'm on a different system today but am trying your suggestons. This is > a > >> debian 3.1r2 system and I'm running jdk 1.5.0_04. > >> > >> Take a look below, but I think I have no parallel port support on this > >> kernel, however I never get the "No such device or address" return from > the > >> cat call as you did so I'm not sure how to interpret the results. > >> > >> When I run the test program (PortChooser.java), the getPortIdentifiers > >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this > is > >> more than I found on the RedHat system. Incidently --disable-lockfiles > has > >> no effect. > >> > >> It looks as though there is no parallel support in this kernel: > >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > >> On node 0 totalpages: 161776 > >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > >> > >> I'm a little confused by the results when I cat to the lp0 device. It > >> seems from the dmesg output that I don't have parallel printer support, > but > >> when I cat to the lp0 device, I get permission denied if I'm non-root > user > >> and input/output error if I'm root. Apparently this means I have the > >> device, > >> but no support in the kernel? > >> > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> > >> cat: /dev/lp0: Permission denied > >> ed at falcon:~/src/workspace/EASServer/src$ su > >> Password: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> > >> Here's my lp* device permissions. > >> /dev: > >> wildcard lp* > >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> If I change it to > >> /dev: > >> wildcard lp* > >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> I get: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> falcon:/home/ed/src/workspace/EASServer/src# exit > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> ed at falcon:~/src/workspace/EASServer/src$ > >> > >> What do you think? Should I recompile the kernel or is it something > else? > >> > >> By the way, I added the user ed to the lp and uucp groups on this > system. > >> > >> Thanks again, > >> > >> Ed > >> > >> On 8/11/06, Trent Jarvi wrote: > >> > > >> > On Fri, 11 Aug 2006, Ed wrote: > >> > > >> > > I'm trying to read and write a parallel port on a standard (Dell) > pc > >> > running > >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > >> > gates. > >> > > > >> > > I'm having problems getting rxtx to return a port enumeration from > >> > > getPortIdentifiers. I'm using a file > >> > > PortChooser.java as a test file to get things going. This is from > the > >> > Java > >> > > CookBook 2nd edition (Chapter 12). The call > >> > > > >> > > // get list of ports available on this particular computer, > >> > > // by calling static method in CommPortIdentifier. > >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > >> > > > >> > > returns a null pList; > >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I > configure > >> > and > >> > > compile without --disable-lockfiles I get: > >> > > > >> > > Stable Library > >> > > ========================================= > >> > > Native lib Version = RXTX-2.1-7 > >> > > Java lib Version = RXTX-2.1-7 > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > ... > >> > > > >> > > When I compile with --disable-lockfiles the call to > getPortIdentifiers > >> > > >> > > simply returns a null Enumeration. > >> > > > >> > > I've read the documention and threads about this issue and I feel > like > >> > I've > >> > > tried everything, so at the moment I'm stumped. > >> > > > >> > > I can supply any further info that may help. > >> > > > >> > > Thanks in advance. > >> > > > >> > > Ed > >> > > > >> > > >> > Hi Ed > >> > > >> > You may want to check the permissions of /dev/lp*. Also make sure lp > or > >> > your kernel support for lp is loaded. It should show up in dmesg and > >> > lsmod. > >> > > >> > For my laptop with no printer port enabled in BIOS is see: > >> > > >> > lp: driver loaded but no devices found > >> > > >> > in desg |grep lp > >> > > >> > [] $ ls -l /dev/lp* > >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > here root and group lp can read and write. Normal users cannot. > >> > > >> > Try a simple read as a user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: Permission denied > >> > > >> > Fix as root > >> > > >> > [] chmod 666 /dev/lp* > >> > [] $ ls -l /dev/lp* > >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > Now as user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: No such device or address > >> > > >> > So this is saying there is no lp0 on my laptop. > >> > > >> > -- > >> > Trent Jarvi > >> > tjarvi at qbang.org > >> > > >> > >> > >> > >> -- > >> > >> Ed > >> > > > > > > > > > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/59164078/attachment-0317.html From eddythejekyll at gmail.com Mon Aug 14 14:19:58 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 14:19:58 -0600 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? Message-ID: I'm using the ParallelPort class to drive a relay board. According to Mr. Jarvi, since this board isn't a printer, there will be a read error unless I hold the "printer online" line high in order to make the API think I'm talking to a printer. The problem is, I can't figure out which line is the "printer online". My DB25 spec lists the following: *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Anyone know which one I should tie high? I tried the busy line and it still errored out on the read. Thanks in advance, -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/66cf3c3e/attachment-0317.html From tjarvi at qbang.org Mon Aug 14 18:06:29 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:06:29 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Mon, 14 Aug 2006, Ed wrote: > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > which isn't any of the valid modes. I tried setting it explicitely with > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced > the requested mode in nativeSetSerialPortParams > at gnu.io.LPRPort.setLPRMode(Native Method) > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > invalid state. This is because rxtx only supports the basics. JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } One could program in more support. When I did that I just had a daisy wheel printer to test with and doing any more would have been blind. So that behavior is expected. I'll look to see if the Parallel Complete book mentions which pins you need to raise. If you look in the source code [ParallelImp.c] you can see this code isn't well tested. It has worked for hobby use in the past as I'd guess you are trying to do. But my experience with the code is as is mentioned in the top of the source: /* fear he who enter here. It appears that things have changed. An attempt has been made to put things the way the should be. It compiles and ParallelBlackBox runs. No further guarantees. Well... One.. it will print "Hello World!" on an epson DX 10 printer. you know.. the 10 character per second daisy wheel printer ;) - Trent Jarvi */ That comment is from 1997 or so. Since then some windows support was contributed but it is still very green code. We get about four requests for parallel support a year so its just not a well traveled area. It would be nice to have some documentation for the people trying to hook parallel ports to electronic projects. That appears to be the exclusive use of the Parallel support. The wiki pages are intended to let people share information like this to help each other in their projects as they figure out the details. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Aug 14 18:40:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:40:40 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: > PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): > > if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) > val = System.getProperty("gnu.io.SerialPorts"); > > Shouldn't the comparison be != null? getProperty returns null if the > variable is NOT found, and you only want to assign to val if it IS > found, right? Same thing for the > parallel port case. End result is the same I guess, since you check > for null later, > but probably should be fixed. I think this is just a fallback to the second property. gnu.io.SerialPorts isn't documented but perhaps it is used. It should behave properly as documented in INSTALL. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 14 18:56:55 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 19:56:55 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: <44E11BD7.5030102@gmail.com> Trent Jarvi wrote: >> PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): >> >> if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) >> val = System.getProperty("gnu.io.SerialPorts"); >> > > I think this is just a fallback to the second property. > gnu.io.SerialPorts isn't documented but perhaps it is used. It should > behave properly as documented in INSTALL. Doh - yup, I missed the fact that the property names were different... Pete From berkland at spamcop.net Mon Aug 14 19:58:21 2006 From: berkland at spamcop.net (Doug Berkland) Date: Mon, 14 Aug 2006 21:58:21 -0400 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? In-Reply-To: References: Message-ID: <269e40090608141858g698c2579v8d962deca3f4df53@mail.gmail.com> Based on memory and this page as confirmation, I would say pin 13 is the "Online" pin for SPP (standard parallel port). http://www.quatech.com/support/comm-over-parallel.php On 8/14/06, Ed wrote: > > I'm using the ParallelPort class to drive a relay board. According to Mr. > Jarvi, since this board isn't a printer, there will be a read error unless I > hold the "printer online" line high in order to make the API think I'm > talking to a printer. The problem is, I can't figure out which line is the > "printer online". My DB25 spec lists the following: > > *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and > Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data > Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 > D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select > 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select > In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit > 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 > Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and > Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground > > Anyone know which one I should tie high? I tried the busy line and it > still errored out on the read. > > Thanks in advance, > > -- > Ed > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/842bb770/attachment-0317.html From eddythejekyll at gmail.com Mon Aug 14 20:25:42 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 20:25:42 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Ah, I see. I've seen the caveats about limited Parallel support, but I thought it was mainly about the javax.comm package. The gnu.io is derived from javax.comm package right? That is, is the parallel support in rxtx is a superset of what's in javax.comm? I'm using this not for hobby usage, but for some simple instrumenation and control. If the project mandates it, I'll gladly work on extending the support. In the meantime, I need to get some sanity checks working, and repair my relay board (I smoked the ULN2803 chip, apparently by tying the BUSY (pin 11) to vcc). I guess I'll try the SEL pin next (and a supply of 2803s) with a ~1K pullup. The caveat in the comment block isn't very encouraging (!), but I borrowed an old Epson Stylus Color 600 printer to see what I can do. If I can write out characters to it I'll be happy. Parallel printers aren't easy to find these days. I haven't yet looked at the native source, yet, but I've just imported it into eclipse and I'll surf around a bit. Ed On 8/14/06, Trent Jarvi wrote: > > On Mon, 14 Aug 2006, Ed wrote: > > > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > > which isn't any of the valid modes. I tried setting it explicitely with > > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to > proced > > the requested mode in nativeSetSerialPortParams > > at gnu.io.LPRPort.setLPRMode(Native Method) > > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > > invalid state. > > This is because rxtx only supports the basics. > > JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > jclass jclazz, jint mode) > { > switch(mode) > { > case LPT_MODE_ANY: > break; > case LPT_MODE_SPP: > case LPT_MODE_PS2: > case LPT_MODE_EPP: > case LPT_MODE_ECP: > case LPT_MODE_NIBBLE: > default: > throw_java_exception( env, > UNSUPPORTED_COMM_OPERATION, > "nativeSetSerialPortParams", > "setLPRMode was unable to proced the > requested \ > mode" > ); > } > return(JNI_TRUE); > } > > One could program in more support. When I did that I just had a daisy > wheel printer to test with and doing any more would have been blind. > > So that behavior is expected. I'll look to see if the Parallel Complete > book mentions which pins you need to raise. If you look in the source > code [ParallelImp.c] you can see this code isn't well tested. It has > worked for hobby use in the past as I'd guess you are trying to do. But > my experience with the code is as is mentioned in the top of the source: > > /* > fear he who enter here. It appears that things have changed. An > attempt > has been made to put things the way the should be. > > It compiles and ParallelBlackBox runs. No further guarantees. > > Well... One.. it will print "Hello World!" on an epson DX 10 > printer. > you know.. the 10 character per second daisy wheel printer ;) > > - Trent Jarvi > */ > > That comment is from 1997 or so. > > Since then some windows support was contributed but it is still very green > code. We get about four requests for parallel support a year so its just > not a well traveled area. > > It would be nice to have some documentation for the people trying to hook > parallel ports to electronic projects. That appears to be the exclusive > use of the Parallel support. The wiki pages are intended to let people > share information like this to help each other in their projects as they > figure out the details. > > -- > Trent Jarvi > tjarvi at qbang.org > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/fbb5ddb4/attachment-0317.html From lyon at docjava.com Tue Aug 15 06:06:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 15 Aug 2006 08:06:27 -0400 Subject: [Rxtx] smoking is bad for your health In-Reply-To: References: Message-ID: Hi All, If you are connecting to the parallel port and smoking chips, it is time for extra stuff to buffer the parallel port. You may be want more current, in which case driver transistors are needed, or, if you are using the port as an output only device, you may like to add your own bus transceiver (e.g., 74245), set for output. Do be careful to design this properly; http://www.beyondlogic.org/spp/parallel.htm Some people like to use Octal D-type F.F's with OC outputs, like a 74374, http://upgrade.cntc.ac.kr/data/ttl/74374.html I like this one, as it has the D FF's and can latch the outputs for presentation to slower electronics (like relays). But careful! A relay that needs more current than the family of the device you have selected will look like a short to ground, and you will smoke your bug! And MOBO's do NOT come with the ability to drive any load you like. Check the power specs on your relay and be sure to protect the chip against back EMF with a diode. It is best to smoke test this on a bread board BEFORE hooking it to the computer. And be sure you smoke test the corner points in the ckt for a while, lest it fail in the field. - Doug >Ah, I see. I've seen the caveats about limited >Parallel support, but I thought it was mainly >about the javax.comm package. The >gnu.io is derived from javax.comm >package right? That is, is the parallel support >in rxtx is a superset of what's in javax.comm? > >I'm using this not for hobby usage, but for some >simple instrumenation and control. If the >project mandates it, I'll gladly work on >extending the support. In the meantime, I need >to get some sanity checks working, and repair my >relay board (I smoked the ULN2803 chip, >apparently by tying the BUSY (pin 11) to vcc). I >guess I'll try the SEL pin next (and a supply of >2803s) with a ~1K pullup. > >The caveat in the comment block isn't very >encouraging (!), ?but?I borrowed an old Epson >Stylus Color 600 printer to see what I can do. >?If I can write out characters to it I'll be >happy. Parallel printers aren't easy to find >these days. > > I haven't yet looked at the native source, yet, >but I've just imported it into eclipse and I'll >surf around a bit. > >Ed > >On 8/14/06, Trent Jarvi <tjarvi at qbang.org> wrote: > >On Mon, 14 Aug 2006, Ed wrote: > >> When I try to get the mode with int mode = pPort.getMode(); it returns 0 >> which isn't any of the valid modes. I tried setting it explicitely with >> pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with >> >> gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced >> the requested mode in nativeSetSerialPortParams >> at gnu.io.LPRPort.setLPRMode(Native Method) >> at gnu.io.LPRPort.setMode(LPRPort.java:87) >> >> Except for LPT_MODE_ANY, but the getMode call still failed out with an >> invalid state. > >This is because rxtx only supports the basics. > >JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > ???????jclass jclazz, jint mode) >{ > ???????switch(mode) > ???????{ > ???????????????case LPT_MODE_ANY: > ???????????????????????break; > ???????????????case LPT_MODE_SPP: > ???????????????case LPT_MODE_PS2: > ???????????????case LPT_MODE_EPP: > ???????????????case LPT_MODE_ECP: > ???????????????case LPT_MODE_NIBBLE: > ???????????????default: > ???????????????????????throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, > ???????????????????????????????"nativeSetSerialPortParams", > ???????????????????????????????"setLPRMode was >unable to proced the requested \ > ???????????????????????????????mode" > ???????????????????????); > ???????} > ???????return(JNI_TRUE); >} > >One could program in more support.??When I did that I just had a daisy >wheel printer to test with and doing any more would have been blind. > >So that behavior is expected.??I'll look to see if the Parallel Complete >book mentions which pins you need to raise.??If you look in the source >code [ParallelImp.c] you can see this code isn't well tested.??It has >worked for hobby use in the past as I'd guess you are trying to do.??But >my experience with the code is as is mentioned in the top of the source: > >/* > fear he who enter here.??It appears that things have changed.??An attempt > has been made to put things the way the should be. > > ???????It compiles and ParallelBlackBox runs.??No further guarantees. > > ???????Well... One.. it will print "Hello World!" on an epson DX 10 printer. > ???????you know.. the 10 character per second daisy wheel printer ;) > > ???????- Trent Jarvi >*/ > >That comment is from 1997 or so. > >Since then some windows support was contributed but it is still very green >code.??We get about four requests for parallel support a year so its just >not a well traveled area. > >It would be nice to have some documentation for the people trying to hook >parallel ports to electronic projects.??That appears to be the exclusive >use of the Parallel support.??The wiki pages are intended to let people >share information like this to help each other in their projects as they >figure out the details. > >-- >Trent Jarvi >tjarvi at qbang.org > > > > >-- >Ed > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 15 13:26:16 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 15 Aug 2006 14:26:16 -0500 Subject: [Rxtx] crash with too much memory Message-ID: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded from qbang.org. I'm exercising the RXTX COMM serial interface, both in a small standalone test and with the same code pulled into a large OSGI framework setup. If I use the stock .jar/.dll's, then everything works correctly in both situations. I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 (mingw-special)). If I use my locally built version, then my small test case works just fine, both when run inside Eclipse and when run standalone on the command line. However, when I try and use my locally built .jar/.dll's in the large framework environment, then I get a JVM crash with the attached log. Normally this would lead me to think that I was running out of memory or something in the large environment, and when I try and play with the JVM memory args, some interesting things show up. In our large environment, we have -Xms32M/-Xmx1024M - this appears to be the problem. If I set max to something like 64M, then things work. The cross over point from working to failing seems to be around 32M/110M (works) and 32M/111M (fails). But 128M/128M works while 128M/129M fails. So it seems to have to do with how much memory is actually available, or something like that. The thing that occurs to me is if my GCC is somehow generating something like "near" calls. But when the JVM has a lot of RAM available, it puts the DLL up somehwere in the address space and then the near calls fail - far calls are needed. So, I'm thinking this is probably a difference in the MinGW GCC I'm using and the one that was used to build the stock binaries from qbang, or maybe some command line args were changed? So, I'm hoping someone will have an idea of what's going on here... Thanks, Pete From tjarvi at qbang.org Tue Aug 15 18:54:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 15 Aug 2006 18:54:04 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: On Tue, 15 Aug 2006, Pete Flugstad wrote: > I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded > from qbang.org. > > I'm exercising the RXTX COMM serial interface, both in a small > standalone test and with the same code pulled into a large OSGI > framework setup. > > If I use the stock .jar/.dll's, then everything works correctly in > both situations. > > I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 > (mingw-special)). > > If I use my locally built version, then my small test case works just > fine, both when run inside Eclipse and when run standalone on the > command line. However, when I try and use my locally built > .jar/.dll's in the large framework environment, then I get a JVM crash > with the attached log. > > Normally this would lead me to think that I was running out of memory > or something in the large environment, and when I try and play with > the JVM memory args, some interesting things show up. > > In our large environment, we have -Xms32M/-Xmx1024M - this appears to > be the problem. If I set max to something like 64M, then things work. > The cross over point from working to failing seems to be around > 32M/110M (works) and 32M/111M (fails). > But 128M/128M works while 128M/129M fails. So it seems to have to do > with how much memory is actually available, or something like that. > > The thing that occurs to me is if my GCC is somehow generating > something like "near" calls. But when the JVM has a lot of RAM > available, it puts the DLL up somehwere in the address space and then > the near calls fail - far calls are needed. > > So, I'm thinking this is probably a difference in the MinGW GCC I'm > using and the one that was used to build the stock binaries from > qbang, or maybe some command line args were changed? > > So, I'm hoping someone will have an idea of what's going on here... > Hi Pete The binaries are from the src. They should be reproducable. I did extensive testing of rxtx several years ago using mingw as the compiler. The version was 2.95. I have not changed versions since. There are way too many variables as it is. I have a linux->mingw cross compiler rpm I use for all windows use. If you want a copy of it you can have it. It isn't anything 'special' :) -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Thu Aug 17 11:49:24 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 17 Aug 2006 12:49:24 -0500 Subject: [Rxtx] crash with too much memory In-Reply-To: References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> On 8/15/06, Trent Jarvi wrote: > I did extensive testing of rxtx several years ago using mingw as the > compiler. The version was 2.95. I have not changed versions since. > There are way too many variables as it is. FYI, I believe I've solved this problem by changing how the dll's were built. The original mingw makefile was generating Serial.def, then performing various operations with dlltool and ld. I modified the makefile to create the dll using this page: as a guide. With that, there's no longer any need to deal with Serial.def and the makefile becomes _much_ simpler. This appears to have addressed my problems with crashing. FWIW, GCC 2.95 is _really_ old - you should consider investigating upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is supposed to generate a native binary (i.e. just like MinGW). Thanks, Pete From claretlc at yahoo.com Thu Aug 17 12:34:48 2006 From: claretlc at yahoo.com (Clare Cooley) Date: Thu, 17 Aug 2006 11:34:48 -0700 (PDT) Subject: [Rxtx] parallel port communication Message-ID: <20060817183448.76911.qmail@web53908.mail.yahoo.com> Hi, I'm trying to write a 1 to a bit 15 on a parallel port cable that isn't attached to a printer.(It's a control box for eye-tracking equipment.)I need to do this in Java. I looked at the javax.comm documentation, and it said, "Application programs should not directly create ParallelPortEvent objects." So is there a way to do this with your package? If not, do you have any suggestions of where to look? It really needs to be done in Java. Thanks, Clare Cooley __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From pat at xvalheru.org Thu Aug 17 13:13:52 2006 From: pat at xvalheru.org (pat) Date: Thu, 17 Aug 2006 21:13:52 +0200 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060817190751.M5586@xvalheru.org> Hi there, I've question(s) for you. I need to communicate with scale, I've used the Sun's direver. Now I've switched to Rxtx and the speed of the communication is perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, but the difference between the crash time is 5 second ... . My question is: Is there a stable driver ??? Or what I have to do to have stable enough serial port driver ??? OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. Thanks to all for the help. Pat From tjarvi at qbang.org Fri Aug 18 05:13:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 05:13:42 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> Message-ID: On Thu, 17 Aug 2006, Pete Flugstad wrote: > On 8/15/06, Trent Jarvi wrote: >> I did extensive testing of rxtx several years ago using mingw as the >> compiler. The version was 2.95. I have not changed versions since. >> There are way too many variables as it is. > > FWIW, GCC 2.95 is _really_ old - you should consider investigating > upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is > supposed to generate a native binary (i.e. just like MinGW). > It is really old but also well known like C itself. I have considered upgrading. The ToyBox builds should be gcc 3* cross-compiled. I'm not going to be validating gcc 3* w32 binaries though. It's looking like we will need to focus support on MSFT's toolchain for 64 bit windows support until it is possible for gcc to support w64. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Aug 18 05:32:10 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 07:32:10 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: Hi All, Does anyone know how to produce mac intel binaries on a Fedora Linux box? Thanks! - Doug From tjarvi at qbang.org Fri Aug 18 06:42:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 06:42:05 -0600 (MDT) Subject: [Rxtx] cross compilation for the mac In-Reply-To: References: Message-ID: On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Does anyone know how to produce > mac intel binaries on a Fedora Linux > box? > > Thanks! > - Doug Hi Doug You need to build the cross toolchain which means copying the Darwin/Mac binaries over to fedora. It would be nontrivial but possible. Do the Darwin libraries work with Mac in general? I'm not aware of the licensing issues associated with grabbing Mac binaries. Same with OpenSolaris/Solaris. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Aug 18 08:15:26 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 10:15:26 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> In theory building against Darwin would be sufficient to getting things working on MacOS X. You need to remember that Darwin is the low-level OS, while MacOS X adds the everything else on top. IOKit, which is the I/O API, is available as part of Darwin. The only thing you will need extra are the Java libraries. One thing is that I would recommend that when producing binaries for the Mac, is to ensure they are Universal binaries (PPC+Intel). Andre > > From: Trent Jarvi > Date: 2006/08/18 Fri AM 08:42:05 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] cross compilation for the mac > > On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > > > Hi All, > > Does anyone know how to produce > > mac intel binaries on a Fedora Linux > > box? > > > > Thanks! > > - Doug > > Hi Doug > > You need to build the cross toolchain which means copying the Darwin/Mac > binaries over to fedora. It would be nontrivial but possible. > > Do the Darwin libraries work with Mac in general? I'm not aware of the > licensing issues associated with grabbing Mac binaries. > > Same with OpenSolaris/Solaris. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Aug 18 13:43:16 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 15:43:16 -0400 Subject: [Rxtx] cross compilation for the mac In-Reply-To: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: >In theory building against Darwin would be sufficient to getting >things working on MacOS X. You need to remember that Darwin is the >low-level OS, while MacOS X adds the everything else on top. IOKit, >which is the I/O API, is available as part of Darwin. The only thing >you will need extra are the Java libraries. > >One thing is that I would recommend that when producing binaries for >the Mac, is to ensure they are Universal binaries (PPC+Intel). > >Andre I find the xcode ide for generating a mix of universal binaries and java very difficult to make work. Is there a way to do this with make files? Thanks! - Doug From ajmas at sympatico.ca Fri Aug 18 13:54:55 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 15:54:55 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818195455.PGAP29052.tomts13-srv.bellnexxia.net@smtp1.sympatico.ca> It should be doable. XCode hands off the compilation process to gcc et al, for the compilation of C/C++ code and to javac et al. for the Java side. While ant is the favoured tool for 'automated' Java compilation, make can easily be used. All is needed is someone to volounteer to do the work. Andre "Dr. Douglas Lyon" wrote > > >In theory building against Darwin would be sufficient to getting > >things working on MacOS X. You need to remember that Darwin is the > >low-level OS, while MacOS X adds the everything else on top. IOKit, > >which is the I/O API, is available as part of Darwin. The only thing > >you will need extra are the Java libraries. > > > >One thing is that I would recommend that when producing binaries for > >the Mac, is to ensure they are Universal binaries (PPC+Intel). > > > >Andre > > I find the xcode ide for generating a mix of universal binaries > and java very difficult to make work. Is there a way to do this > with make files? > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Fri Aug 18 16:34:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 16:34:46 -0600 (MDT) Subject: [Rxtx] serial driver newbe question and problem In-Reply-To: <20060817190751.M5586@xvalheru.org> References: <20060817190751.M5586@xvalheru.org> Message-ID: On Thu, 17 Aug 2006, pat wrote: > Hi there, > > I've question(s) for you. I need to communicate with scale, I've used the > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > but the difference between the crash time is 5 second ... . > > My question is: Is there a stable driver ??? Or what I have to do to have > stable enough serial port driver ??? > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > Thanks to all for the help. > > Pat > Could you describe the hardware you have, the version of rxtx and provide the log of the crash? Did you download binaries? I've not been seeing a jvm crash with rxtx -- Trent Jarvi tjarvi at qbang.org From lunareclipse03 at web.de Sat Aug 19 12:11:48 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 19 Aug 2006 20:11:48 +0200 Subject: [Rxtx] Problem solved! Message-ID: <920065539@web.de> Hi everybody, I posted some months ago and asked about some help on my very special problem concerning my win32 port of a communications library. Now I just want to inform you that no further "mindstorming" is needed because I solved the problem by completely rewriting the win32 port of the library. Now everything works fine. Thank you all for your time and patience. --Sven Ahlemann __________________________________________________________________________ Erweitern Sie FreeMail zu einem noch leistungsst?rkeren E-Mail-Postfach! Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131 From ajmas at sympatico.ca Mon Aug 21 09:58:23 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 21 Aug 2006 11:58:23 -0400 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060821155823.TLSM18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Next time that happens, including a copy of the crash log, produced by Windows could probably help too. Andre Trent Jarvi wrote: > > On Thu, 17 Aug 2006, pat wrote: > > > Hi there, > > > > I've question(s) for you. I need to communicate with scale, I've used the > > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > > but the difference between the crash time is 5 second ... . > > > > My question is: Is there a stable driver ??? Or what I have to do to have > > stable enough serial port driver ??? > > > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > > > Thanks to all for the help. > > > > Pat > > > > Could you describe the hardware you have, the version of rxtx and > provide the log of the crash? Did you download binaries? > > I've not been seeing a jvm crash with rxtx > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From adrian.l.parker at gmail.com Thu Aug 24 09:10:39 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Thu, 24 Aug 2006 11:10:39 -0400 Subject: [Rxtx] Portability issues Message-ID: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use RXTX 2.0? Does it provide system librairies that javax.comm does not? I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, or 2000, or server 2003). Can this be done with a single implementation of RXTX? I don't want to have different versions of Java code that have different package names. References: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Message-ID: On Thu, 24 Aug 2006, Adrian Parker wrote: > Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use > RXTX 2.0? Does it provide system librairies that javax.comm does not? > > I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's > OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, > or 2000, or server 2003). Can this be done with a single implementation of > RXTX? I don't want to have different versions of Java code that have > different package names. > Hi Adrian. The native code can support all of the platforms you mention. I've never compiled for unixware or openunix but the patches are in the code. So you would need to compile for that target. >From there you would probably be best off going with rxtx 2.1 so you have all the classes in one package. You can opt to use rxtx 2.0 with Sun's commapi for Solaris v 2. The main differences are rxtx 2.1 comes with all the source/classes and is in package gnu.io while Sun's requires rxtx for some platforms but is in package javax.comm. The low level code is the same in either case as far as rxtx is concerned. -- Trent Jarvi tarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 04:12:52 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 06:12:52 -0400 Subject: [Rxtx] Serial.addEventListener bug? Message-ID: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on OpenServer 5.0.7). Its what Sun packages. I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an exception. It seems to throw the exception if no listener was previously declared (although I've not had chance to verify). Is this desireable behaviour? Sun's original API doesn't mention anything about an exception on this function, http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) Of course this is an old version of RXTX, so perhaps this has been changed. -- Adrian Parker Simulation Software Developer DLCSPM 4-4-3 (c) Building A31, CFB Kingston Tel: (613) 541-5010 x3020 CSN: 271-3020 Email: parker at lsec.dnd.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/22e2ea57/attachment-0307.html From tjarvi at qbang.org Fri Aug 25 05:15:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 25 Aug 2006 05:15:44 -0600 (MDT) Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: On Fri, 25 Aug 2006, Adrian Parker wrote: > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > OpenServer 5.0.7). Its what Sun packages. > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > exception. It seems to throw the exception if no listener was previously > declared (although I've not had chance to verify). > > Is this desireable behaviour? Sun's original API doesn't mention anything > about an exception on this function, > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > Of course this is an old version of RXTX, so perhaps this has been changed. > > > What exception was thrown? You can replace 1.4-8 with 2.0 for testing purposes. They are the same package. I doubt Sun shipped or packaged that. I think Caldera/SCOx/... did at one point. There may still be updates on their pages. I recall them sending patches here which are in current rxtx. -- Trent Jarvi tjarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 05:28:32 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 07:28:32 -0400 Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: <7da71e910608250428q32b86632g9a67b1b4efe69830@mail.gmail.com> On 8/25/06, Trent Jarvi wrote: > > On Fri, 25 Aug 2006, Adrian Parker wrote: > > > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > > OpenServer 5.0.7). Its what Sun packages. > > > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > > exception. It seems to throw the exception if no listener was > previously > > declared (although I've not had chance to verify). > > > > Is this desireable behaviour? Sun's original API doesn't mention > anything > > about an exception on this function, > > > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > > > Of course this is an old version of RXTX, so perhaps this has been > changed. > > > > > > > > What exception was thrown? Its weird. I catch an Exception. But when on that exception I call getClass().getName() I end up with a NullPointerException. You can replace 1.4-8 with 2.0 for testing > purposes. They are the same package. > > I doubt Sun shipped or packaged that. Doh! I meant to say SCO sorry. I was surfing Sun's site when I wrote that :) Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/e43aed3a/attachment-0307.html From sjudd at seas.upenn.edu Sat Aug 26 16:42:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Sat, 26 Aug 2006 18:42:09 -0400 Subject: [Rxtx] Mac commapi Message-ID: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? If so, where do I get it? Sun has various versions at http://www.sun.com/download/products.xml?id=43208d3d but they are for SolarisSparc, SolarisX86, Linux, and Generic. Do I use the Generic one? If so, read on; otherwise redirect me. While using the Generic version, my attempt to run the BlackBox sample program elicits a message saying it "can't find javax.comm.properties". I found a note in the rxtx.org HowTo (for Linux) saying to create this thing in /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties but where should it go on the Mac? After reading many versions of documentation around, and updates and revisions and re-authorings, I have worked my way into a state of confusion and high uncertainty. Please release me. sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060826/02d6b163/attachment-0277.html From tod at todbot.com Sat Aug 26 17:08:33 2006 From: tod at todbot.com (Tod E. Kurt) Date: Sat, 26 Aug 2006 16:08:33 -0700 Subject: [Rxtx] Mac commapi In-Reply-To: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Message-ID: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> You don't need Sun's CommAPI. You just need RXTX. Once you download RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and the native library is ("librxtxSerial.jnilib" on Mac OS X) via the standard methods. For instance, if you've placed those two files in a directory called 'rxtxlib' and you want to run a Java class called HelloWorld in the current directory, do the following: % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar HelloWorld On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? > If so, where do I get it? Sun has various versions at > http://www.sun.com/download/products.xml?id=43208d3d > but they are for SolarisSparc, SolarisX86, Linux, and Generic. > Do I use the Generic one? > If so, read on; otherwise redirect me. > > While using the Generic version, my attempt to run the BlackBox > sample program > elicits a message saying it "can't find javax.comm.properties". > I found a note in the rxtx.org HowTo (for Linux) saying to create > this thing in > /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties > but where should it go on the Mac? > > After reading many versions of documentation around, and updates > and revisions > and re-authorings, I have worked my way into a state of confusion > and high > uncertainty. Please release me. > > sj > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From sjudd at seas.upenn.edu Sun Aug 27 22:55:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Mon, 28 Aug 2006 00:55:09 -0400 Subject: [Rxtx] Mac commapi In-Reply-To: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> Message-ID: This was immensely helpful. Thank you, Tod. I wish it had been explicit somewhere in the documentation; it would have saved me 2 days of grief. One hugely valuable thing like this little set of instructions is that it implicitly lists all the hundreds of things you DON"T have to do. I know it seems obvious to those in the know, but every little bit of help on an arcane topic like this opens up the product to an exponentially wider group of dilettantes. I managed to get the SerialDemo program (from Sun) to work too. Hurrah! However, it required changing all the javax.comm references to gnu.io which I had heard of due to all my rambling readings. Is there not a demo program on rxtx.org already available that would not have needed this? BTW, the link on the Projects page for jPIC[Source] sends a *.hex file to a PIC 16F877 or similar chip... takes me to nowhere useful. I do not understand what the name "Toybox" is meant to imply. Thanks, sj On 2006 Aug 26, at 7:08 PM, Tod E. Kurt wrote: > You don't need Sun's CommAPI. You just need RXTX. Once you download > RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and > the native library is ("librxtxSerial.jnilib" on Mac OS X) via the > standard methods. > > For instance, if you've placed those two files in a directory called > 'rxtxlib' and you want to run a Java class called HelloWorld in the > current directory, do the following: > > % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar > HelloWorld > > > On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > >> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? >> If so, where do I get it? Sun has various versions at >> http://www.sun.com/download/products.xml?id=43208d3d >> but they are for SolarisSparc, SolarisX86, Linux, and Generic. >> Do I use the Generic one? >> If so, read on; otherwise redirect me. >> >> While using the Generic version, my attempt to run the BlackBox >> sample program >> elicits a message saying it "can't find javax.comm.properties". >> I found a note in the rxtx.org HowTo (for Linux) saying to create >> this thing in >> /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties >> but where should it go on the Mac? >> >> After reading many versions of documentation around, and updates >> and revisions and re-authorings, I have worked my way into a state >> of confusion and high uncertainty. Please release me. >> >> sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060827/b80d6389/attachment-0277.html From pete.flugstad at gmail.com Mon Aug 28 12:38:27 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 13:38:27 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE Message-ID: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Okay, my understanding is that originally, RTS meant "Request to Send" - the DTE (the PC) would assert this and the DCE (modem) would assert "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send data. This really only provided uni-directional flow control, from the PC to the modem. Now, as I understand it, the more modern usage of RTS is that it is used for the DTE to assert flow control back to the DCE - basically it means "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) raises this, then the DCE(modem) is free to send data to the DTE - this allows the DTE(PC) to exert flow control back towards the DCE(modem). This discussion is based on the Serial HOWTO from: and lots of other reading... Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which is defined as: > Enables RTS flow-control handshaking. The driver raises the RTS line, > enabling the DCE to send, when the input buffer has enough room to > receive data. The driver lowers the RTS line, preventing the DCE to > send, when the input buffer does not have enough room to receive > data. If this value is used, it is an error for the application to adjust > the line with EscapeCommFunction. which clearly reflects the newer usage style - it keeps the RTS line high as long as there is space to _receive_ data. And takes it low when the receive/input buffer is getting full to stop the modem from sending it data. Does this jive with other peoples understanding of RTS usage? Unfortunately, the hardware I'm trying to talk to wants to use the OLD style of RTS line usage. An existing Windows C++ program uses RTS_CONTROL_TOGGLE, which documentation states: > Specifies that the RTS line will be high if bytes are available for transmission. > After all buffered bytes have been sent, the RTS line will be low. If this value is > set, it would be an error for an application to adjust the line with > EscapeCommFunction. This value is ignored in Windows 95; it causes the > driver to act as if RTS_CONTROL_ENABLE were specified. This seems to be the OLD RTS behavior, right? So, what I seem to need is to be able to control the RTS line, either using TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS when getting ready to TX and clear it when the output buffer is empty). Does this make sense, or am I off in the weeds? Thanks, Pete From tjarvi at qbang.org Mon Aug 28 18:21:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 28 Aug 2006 18:21:10 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: On Mon, 28 Aug 2006, Pete Flugstad wrote: > Okay, my understanding is that originally, RTS meant "Request to Send" > - the DTE (the PC) would assert this and the DCE (modem) would assert > "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send > data. This really only provided uni-directional flow control, from the PC to > the modem. > > Now, as I understand it, the more modern usage of RTS is that it is used > for the DTE to assert flow control back to the DCE - basically it means > "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) > raises this, then the DCE(modem) is free to send data to the DTE - this > allows the DTE(PC) to exert flow control back towards the DCE(modem). > > This discussion is based on the Serial HOWTO from: > > > > and lots of other reading... > > Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > is defined as: > >> Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > > which clearly reflects the newer usage style - it keeps the RTS line high > as long as there is space to _receive_ data. And takes it low when the > receive/input buffer is getting full to stop the modem from sending it data. > > Does this jive with other peoples understanding of RTS usage? > > Unfortunately, the hardware I'm trying to talk to wants to use the OLD > style of RTS line usage. An existing Windows C++ program uses > RTS_CONTROL_TOGGLE, which documentation states: > >> Specifies that the RTS line will be high if bytes are available for transmission. >> After all buffered bytes have been sent, the RTS line will be low. If this value is >> set, it would be an error for an application to adjust the line with >> EscapeCommFunction. This value is ignored in Windows 95; it causes the >> driver to act as if RTS_CONTROL_ENABLE were specified. > > This seems to be the OLD RTS behavior, right? > > So, what I seem to need is to be able to control the RTS line, either using > TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS > when getting ready to TX and clear it when the output buffer is empty). > > Does this make sense, or am I off in the weeds? > Hi Pete OK. That sounds right. I do not know how you would communicate the difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through CommAPI as it stands. I take it you did not find anything either? Perhaps the best thing to do for your code is to toggle the RTS yourself. This could be a feature in the future JSR API perhaps. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 28 20:54:34 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 21:54:34 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <44F3AC6A.10908@gmail.com> Trent Jarvi wrote: > OK. That sounds right. I do not know how you would communicate the > difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through > CommAPI as it stands. I take it you did not find anything either? > > Perhaps the best thing to do for your code is to toggle the > RTS yourself. This could be a feature in the future JSR API perhaps. Yeah, this is what I ended up doing. I had to modify the dll in order to be able to set hardware flow control (which I do want), but leave the RTS flow control at RS_CONTROL_ENABLE. After that I just toggle setRTS(true) when I'm ready to send and setRTS(false) when I get a OUTPUT_BUFFER_EMPTY notification. Haven't tested with real hardware yet, but it seems to work OK. Thanks for the feedback! Pete From Bob_Jacobsen at lbl.gov Tue Aug 29 08:49:02 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 29 Aug 2006 07:49:02 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >is defined as: > > > Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > >which clearly reflects the newer usage style - it keeps the RTS line high >as long as there is space to _receive_ data. And takes it low when the >receive/input buffer is getting full to stop the modem from sending it data. > >Does this jive with other peoples understanding of RTS usage? Can you point to any devices that actually implement this "new" understanding? I think the person who wrote that documentation paragraph is just confused. The original "RTS/CTS" handshaking was extended to input (from DCE to DTE) handshaking via the DTR (Data Terminal Ready) line. I think the person who wrote the double-quoted paragraph above was just confused between the directions, and mixed them up. If you change "RTS" to "DTR" in that paragraph, you get: > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > enabling the DCE to send, when the input buffer has enough room to > > receive data. The driver lowers the DTR line, preventing the DCE to > > send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. which describes how dozens of devices actually work for controlling flow into the DTE (computer). This then leaves RTS/CTS (with RTS usually just stuck high) for controlling flow into the DCE (peripheral). Again, lots of hardware devices actually do this. I don't work on Windows, so can't be sure of what happens. But on the MacOS X version of RXTX, CTS low stops transmission, exactly as the "old" style would expect. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From mschned at basis.com Tue Aug 29 12:57:45 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 12:57:45 -0600 Subject: [Rxtx] Porting to AIX Message-ID: <01f201c6cb9d$034d4f20$341416ac@basis.com> Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar From mschned at basis.com Tue Aug 29 13:58:05 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 13:58:05 -0600 Subject: [Rxtx] Porting to AIX References: <01f201c6cb9d$034d4f20$341416ac@basis.com> Message-ID: <024901c6cba5$714c3560$341416ac@basis.com> After looking through the build messages closer, there is an error building SerialImp.c: gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type Looks like B57600 is not defined and there are no definitions for DEVICEDIR and LOCKDIR on AIX. Can I just a the following to SerialImp.h? #if defined(__aix__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __aix__ */ Mark Schnedar ----- Original Message ----- From: "Mark E. Schnedar" To: Sent: Tuesday, August 29, 2006 12:57 PM Subject: [Rxtx] Porting to AIX Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 29 15:25:35 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 29 Aug 2006 16:25:35 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <84d4a6d50608291425i1fb819d3i615cf9b85b1e9617@mail.gmail.com> On 8/29/06, Bob Jacobsen wrote: > Can you point to any devices that actually implement this "new" understanding? > > I think the person who wrote that documentation paragraph is just confused. The paragraph is from the Windows documentation of its DCB structure which is used to configure the Serial Device. This is what RXTX uses internally. My version is from MSDN, and Google finds the same text here: (search for fRtsControl). I have not seen any mention anywhere of it being incorrect (and yes, I did look, because I thought the same thing). My discussion is based on trying to use RXTX to talk to a device that used the old style of one-way flow control (RTS is raised to SEND data from the PC to the device). An existing VC++ app use the old-style RTS_CONTROL_TOGGLE. RXTX did not - it used the newer style RTS_CONTROL_HANDSHAKE, so things didn't work - the device was seeing RTS HIGH all the time, so it was thinking that the PC was ready to TX all the time. When I switch RXTX to using RTS_CONTROL_ENABLED and manually control RTS, then things work correctly. The behavior is consistent with this understanding if I hook two serial ports on Windows XP in lookback (via null modem). I'd be very surprised if this had not been corrected by M$ by this time. The same structure has been around since WinNT (mid 1990's) - their documentation is typically pretty good. > > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > > enabling the DCE to send, when the input buffer has enough room to > > > receive data. The driver lowers the DTR line, preventing the DCE to > > > send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. There is a seperate field, fDtrControl, which you can set to DTR_CONTROL_HANDSHAKE, that appears to do exactly this. > This then leaves RTS/CTS (with RTS usually just stuck high) for > controlling flow into the DCE (peripheral). Again, lots of hardware > devices actually do this. > > I don't work on Windows, so can't be sure of what happens. But on > the MacOS X version of RXTX, CTS low stops transmission, exactly as > the "old" style would expect. Well, the Linux Serial HOWTO is where I got most of my information. And yes, I thought it was wrong as well, but it's apparently how things are implemented: Donno - but it works for me... Pete From tjarvi at qbang.org Tue Aug 29 19:11:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 29 Aug 2006 19:11:40 -0600 (MDT) Subject: [Rxtx] Porting to AIX In-Reply-To: <024901c6cba5$714c3560$341416ac@basis.com> References: <01f201c6cb9d$034d4f20$341416ac@basis.com> <024901c6cba5$714c3560$341416ac@basis.com> Message-ID: Hi Mark That should do it. You can put ifdef around the B57600 as we did with higher baudrates. You may want to use tip, minicom, kermit or some other serial application on the AIX to confirm that the lockfiles created are correct. Neat stuff. On Tue, 29 Aug 2006, Mark E. Schnedar wrote: > After looking through the build messages closer, > there is an error building SerialImp.c: > > gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o > /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type > > Looks like B57600 is not defined and there are no > definitions for DEVICEDIR and LOCKDIR on AIX. > > Can I just a the following to SerialImp.h? > > #if defined(__aix__) > # define DEVICEDIR "/dev/" > # define LOCKDIR "/var/lock" > # define LOCKFILEPREFIX "LCK.." > # define FHS > #endif /* __aix__ */ > > Mark Schnedar > > > ----- Original Message ----- > From: "Mark E. Schnedar" > To: > Sent: Tuesday, August 29, 2006 12:57 PM > Subject: [Rxtx] Porting to AIX > > > Hi, > > I'm new to rxtx. Currently my company has an interpreter product > that uses rxtx on Windows and Linux. I am trying to get rxtx to > build on AIX. I downloaded rxtx, ran ./configure and make. When > I run make I get the following error: > > libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object > make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 > > Do you have any suggestions on how to fix this problem? > > I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error > on both systems). I did have our system administrator load > automake, autoconf, make (gnu), and gcc. Here are the versions: > > AIX 4.3.3 AIX 5.3.0 > rxtx: 2.1-7r2 2.1-7r2 > autoconf: 2.53 2.59 > automake: 1.5 1.8.5 > make: 3.79.1 3.80 > gcc: (used native cc) 4.0.0 > > Any help would be appreciated. > > Mark Schnedar > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From guille at sms.nl Wed Aug 30 01:14:32 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 09:14:32 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <7.0.1.0.0.20060830091204.03652de0@sms.nl> At 16:49 29/08/2006, Bob Jacobsen wrote: >At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > > > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >is defined as: > > > > > Enables RTS flow-control handshaking. The driver raises the RTS line, > >> enabling the DCE to send, when the input buffer has enough room to > >> receive data. The driver lowers the RTS line, preventing the DCE to > >> send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. > > > >which clearly reflects the newer usage style - it keeps the RTS line high > >as long as there is space to _receive_ data. And takes it low when the > >receive/input buffer is getting full to stop the modem from sending it data. > > > >Does this jive with other peoples understanding of RTS usage? > >Can you point to any devices that actually implement this "new" understanding? Many (most) of the embedded devices we work with implement this kind of flow control. The host (DTE) raises RTS when it can receive data, and lowers it when the input buffers are full. In turn it watches the CTS line to see whether it can send data to the DCE. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From tjarvi at qbang.org Wed Aug 30 01:23:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 30 Aug 2006 01:23:46 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830091204.03652de0@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 16:49 29/08/2006, Bob Jacobsen wrote: >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: >>> >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >>> is defined as: >>> >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, >>>> enabling the DCE to send, when the input buffer has enough room to >>>> receive data. The driver lowers the RTS line, preventing the DCE to >>>> send, when the input buffer does not have enough room to receive >>>> data. If this value is used, it is an error for the application to adjust >>>> the line with EscapeCommFunction. >>> >>> which clearly reflects the newer usage style - it keeps the RTS line high >>> as long as there is space to _receive_ data. And takes it low when the >>> receive/input buffer is getting full to stop the modem from sending it data. >>> >>> Does this jive with other peoples understanding of RTS usage? >> >> Can you point to any devices that actually implement this "new" understanding? > > Many (most) of the embedded devices we work with implement this kind of flow > control. The host (DTE) raises RTS when it can receive data, and lowers it > when the input buffers are full. In turn it watches the CTS line to see > whether it can send data to the DCE. > I think this explains some hardware control 'bugs' I've seen. -- Trent Jarvi tjarvi at qbang.org From guille at sms.nl Wed Aug 30 02:01:35 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 10:01:35 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> At 09:23 30/08/2006, Trent Jarvi wrote: >On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > > > At 16:49 29/08/2006, Bob Jacobsen wrote: > >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >>> > >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >>> is defined as: > >>> > >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, > >>>> enabling the DCE to send, when the input buffer has enough room to > >>>> receive data. The driver lowers the RTS line, preventing the DCE to > >>>> send, when the input buffer does not have enough room to receive > >>>> data. If this value is used, it is an error for the > application to adjust > >>>> the line with EscapeCommFunction. > >>> > >>> which clearly reflects the newer usage style - it keeps the RTS line high > >>> as long as there is space to _receive_ data. And takes it low when the > >>> receive/input buffer is getting full to stop the modem from > sending it data. > >>> > >>> Does this jive with other peoples understanding of RTS usage? > >> > >> Can you point to any devices that actually implement this "new" > understanding? > > > > Many (most) of the embedded devices we work with implement this > kind of flow > > control. The host (DTE) raises RTS when it can receive data, and lowers it > > when the input buffers are full. In turn it watches the CTS line to see > > whether it can send data to the DCE. > > > >I think this explains some hardware control 'bugs' I've seen. I think the above is the most widespread use, but that may just mean it is the most widespread use in our specific segment (embedded systems). Some UART chips (e.g. from Exar) implement this kind of flow control directly in hardware. For example the Exar can be configured to suspend transmission when it sees CTS low, and resume transmission when it sees CTS high. This is also consistent with our experience. Maybe this helps clarify: http://www.tldp.org/HOWTO/Text-Terminal-HOWTO-10.html#ss10.7 Note the "Old RTS/CTS handshaking is different" section, which refers to "older terminals" whereas newer equipment would use RTS/CTS flow control (or equivalently DTR/DTS) as described above. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From Bob_Jacobsen at lbl.gov Wed Aug 30 07:55:31 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 30 Aug 2006 06:55:31 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> <7.0.1.0.0.20060830095557.0374ff28@sms.nl> Message-ID: I think we all agree that CTS inactive means "Send no more from DTE to DCE". The question is how to express the other direction, "Send no more from DCE to DTE". There are two parts to this question: What do various DTE-like devices do, and what do various DCE-like devices expect? Electrically, the lines that go that direction are DTR, DCD, and RTS (plus some special-purpose lines that are rarely present). All three devices I work most with respect the DTR lead. On the other hand, the FTDI chips for doing serial over USB provide either (RTS and CTS) or (DTR and DSR) as the two leads. What we're probably seeing is two different approaches, that have propagated separately. That's a problem. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From Pawan.Kharbanda at dot.state.co.us Wed Aug 30 09:07:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 30 Aug 2006 09:07:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0455E5E5@hqexchange3.dot.state.co.us> Trent, Sorry for not responding earlier to your email. I was actually waiting for the release of our software on the new Hardware. As I mentioned in my previous emails, RXTX crashes and locks up serial ports with the older version of Redhat (Linux 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:28:55 EDT 2005 i686 i686 i386 GNU/Linux), it might work ok if you are using one or 2 ports but anything more than that it has issues. I was using JDK1.5.0_06 and older firmwares of Digi boxes. Let me know if you need any more specific information of the older system. Thanks Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Thursday, August 10, 2006 5:40 AM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even > after 10000 operations (now I am trying 100,000 :). This is all with > the original RXTX 2.1.7 (final) api's without any of my fixes that I > have been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying > the RXTX saying the suggested kernel for Redhat Linux is > 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Aug 1 01:11:30 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 1 Aug 2006 09:11:30 +0200 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <34B6BC40-1405-4A13-8054-0FC6CE10466A@buechse.de> This is a problem with lock files. You should find it somewhere in the documentation... On 01.08.2006, at 03:53, Richard P. Welty wrote: > trying to get my app running on a Mac OS X powerbook, when > the following is executed as the first thing inside the > run method of a Thread: > > > try { > port = (SerialPort) selectedPort.open( > this.getClass().getName(), 2000); > } catch ( PortInUseException ex){ > ex.printStackTrace(); > return; > } > > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java: > 354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run > (ScaleWatcher.java:143) > > i've not seen any documentation suggesting that rxtx would be finicky > about application names... > > thanks for any suggestions, > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From rwelty at suespammers.org Tue Aug 1 05:37:53 2006 From: rwelty at suespammers.org (Richard P. Welty) Date: Tue, 01 Aug 2006 07:37:53 -0400 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <44CF3D11.9060108@suespammers.org> Richard P. Welty wrote: > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) Aha, a confusing error message. it's really a lock file problem; the code is trying to fill in the application name but when it's getting "Unknown Application" and filling that in... richard From ajmas at sympatico.ca Tue Aug 1 13:10:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:10:59 -0400 Subject: [Rxtx] Application Name? Message-ID: <20060801191059.HFCD18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> You need the source code in CVS. The forth coming 2.18 will correct this, but currently the only place to find the correction is in CVS. No idea when 2.18 is due. > > From: "Richard P. Welty" > Date: 2006/08/01 Tue AM 07:37:53 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Application Name? > > Richard P. Welty wrote: > > > i get the following: > > > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > at > > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) > > Aha, a confusing error message. it's really a lock file problem; the > code is trying to fill in the application name but when it's getting > "Unknown Application" and filling that in... > > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:15:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:15:57 -0400 Subject: [Rxtx] Do interfaces break backwards compatibility? Message-ID: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> It is the class that decides to add serializable that needs to worry about those issues. For the most part serial ports and their connection states should be considered as transient, since there is no guarantee they will still be present or that their state will be, especially in a USB world. What you can store is the port settings and port id and then simply test for port availability next time. Nothing else should be assumed. > > From: Gregg Wonderly > Date: 2006/07/31 Mon PM 01:21:19 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Do interfaces break backwards compatibility? > > Doug Berkland wrote: > > As far as I can tell, nothing in either RXTX or Sun's JavaCOMM > > implements Serializable. Therefore, there are no worries from that > > either. (I can't think of a reason anything in JavaCOMM should > > implement Serializable either.) > > Any interface in javax.comm can become implemented by a serializable object. > Thus, if someone wants to provide remote access to a serial port, then they > might (and I think this is not wise) choose to subclass and add Serializable to > the interface list. > > It's that kind of Serialization compatibility that I'm talking about. > > Gregg Wonderly > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:18:11 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:18:11 -0400 Subject: [Rxtx] precompiled for Intel Mac? Message-ID: <20060801191811.FLJY27612.tomts16-srv.bellnexxia.net@smtp1.sympatico.ca> > > From: Joachim Buechse > There will be. However not before we have figured out some remaining issues. What issues are remaining? Andre From Pawan.Kharbanda at dot.state.co.us Tue Aug 1 16:55:08 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 1 Aug 2006 16:55:08 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Hi, I am also experiencing occasional JVM crash thru the native code. I am attaching the log from the crash. Any ideas what might be causing it???? Regards Pawan Kharbanda # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # --------------- T H R E A D --------------- Current thread (0x8d000480): JavaThread "Thread-119" [_thread_in_native, id=111 51] siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba Registers: EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 Top of Stack: (sp=0x8d3482b8) 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 0x8d348308: 00000000 00000002 00000000 00000000 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 Instructions: (pc=0xb75e39b2) 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~StubRoutines::call_stub V [libjvm.so+0x2607ec] V [libjvm.so+0x423828] V [libjvm.so+0x260045] V [libjvm.so+0x2600de] V [libjvm.so+0x2d7745] V [libjvm.so+0x4c2ba3] V [libjvm.so+0x424338] C [libpthread.so.0+0x4dd8] 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 ) =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, id=11026] 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, id=11023] From tjarvi at qbang.org Tue Aug 1 18:46:21 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 1 Aug 2006 18:46:21 -0600 (MDT) Subject: [Rxtx] JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Message-ID: On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) > C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] > 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, > id=11034] > 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, > id=11033] > 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, > id=11032] > 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, > id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] > 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, > id=11028] > 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, > id=11027] > 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, > id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] > 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- Index: termios.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/termios.c,v retrieving revision 1.9.2.57 diff -u -r1.9.2.57 termios.c --- termios.c 4 Jun 2006 02:50:01 -0000 1.9.2.57 +++ termios.c 11 Jun 2006 21:51:10 -0000 @@ -1048,26 +1048,29 @@ if ( !first_tl ) { port->prev = NULL; + port->next = NULL; first_tl = port; } else { - while ( index->next ) + while ( ( index->fd < port->fd ) && index->next ) index = index->next; - if ( port == first_tl ) + if ( index->fd > port->fd ) { - port->prev = NULL; - port->next = first_tl; - first_tl->prev = port; - first_tl = port; + /* inserting previously closed fd */ + port->prev = index->prev; + port->next=index + index->prev->next = port; + index->prev = port; } else { + /* adding to end of list */ port->prev = index; + port->next = NULL; index->next = port; } } - port->next = NULL; LEAVE( "add_port" ); return port; From gergg at cox.net Tue Aug 1 23:25:19 2006 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 02 Aug 2006 00:25:19 -0500 Subject: [Rxtx] Do interfaces break backwards compatibility? In-Reply-To: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <44D0373F.7020600@cox.net> Andre-John Mas wrote: > It is the class that decides to add serializable that needs to worry about those issues. > For the most part serial ports and their connection states should be considered as > transient, since there is no guarantee they will still be present or that their state > will be, especially in a USB world. Right, but when you provide an interface as the standard, that opens the doors for a lot more interpretation and variation. An abstract class can indicate a lot more about what the expected implementation is. Gregg Wonderly From lyon at docjava.com Wed Aug 2 06:02:15 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:02:15 -0400 Subject: [Rxtx] jsr spec and license issues Message-ID: Hi All, Trent and I have been discussing the license issues of the JSR spec and code that we develop, as a community. Here is what we have come up with: >During the development, the new JSR spec that we derive >will be >covered under the LGPL license. Since it is >just interfaces, any contributions will come back to me, for inclusion >into the specification. The goal is to provide a detailed set of >interfaces that >document the present state of our reference model. I am using >the RXTX as the reference model. If there is something missing from >the reference model, or if the reference model has something that should >not be there, we will need to discuss it. > >After Sun accepts the JSR, I, as the copyright holder, can issue >a version with a JSR compatible license. > >The goal is to migrate the interfaces into javax.comm. Does this sound like a reasonable plan to everyone? Thanks! - Doug From joachim at buechse.de Wed Aug 2 06:21:03 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 14:21:03 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Good day, quite frankly I think that this is a very bad idea. This specification (!) should be in the public domain and nowhere else. Defining a spec under the (L)GPL makes absolutely no sense. After all it is a specification not an implementation. There is no or only trivial code attached to it. So while nothing can be gained by putting it under the LGPL, a lot can be lost - for example the contribution of companies that do not like to open source their implementations. Furthermore you are plain wrong assuming you will be the copyright holder to additions made by other people. Best regards, Joachim On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for >> inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that >> should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Aug 2 06:39:28 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:39:28 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Hi All, I don't know anything about licensing issues. The below sounds reasonable. If we make this public domain, will that be compatible with Sun's JSR? Thanks! - DL P.S. I really don't care what we do, as long as there is some sort of collective agreement. >Good day, > >quite frankly I think that this is a very bad idea. This specification >(!) should be in the public domain and nowhere else. > >Defining a spec under the (L)GPL makes absolutely no sense. After all? >it is a specification not an implementation. There is no or only? >trivial code attached to it. So while nothing can be gained by? >putting it under the LGPL, a lot can be lost - for example the? >contribution of companies that do not like to open source their? >implementations. > >Furthermore you are plain wrong assuming you will be the copyright? >holder to additions made by other people. > >Best regards, >Joachim > > >On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for? >>> inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that? >>> should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> >> Does this sound like a reasonable plan to everyone? >> >> Thanks! >> - Doug >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 07:50:09 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 10:50:09 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D0AD91.4080103@gmail.com> Hi, I have been searching the web and here it is: http://jcp.org/en/resources/license_reference Here there is a list of the licenses that are compatible with the JCP for JSR submitting. I think that Apache, CDDL, CPL and OSL are the one that are compatible with our needs. But I think that Apache is the best for us, Doug why do not make a votation? Regards, Manuel > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. > >> Good day, >> >> quite frankly I think that this is a very bad idea. This specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From lyon at docjava.com Wed Aug 2 08:10:55 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 10:10:55 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D0AD91.4080103@gmail.com> References: <44D0AD91.4080103@gmail.com> Message-ID: Hi All, I have no objection to an Apache license for the JSR interfaces that we produce. Would anyone care to comment? Joachim: Does this address your public domain concerns? How does this impact the reference implementation (i.e. RXTX)? Thanks! - DL >Hi, >I have been searching the web and here it is: >http://jcp.org/en/resources/license_reference >Here there is a list of the licenses that are compatible with the JCP >for JSR submitting. >I think that Apache, CDDL, CPL and OSL are the one that are compatible >with our needs. >But I think that Apache is the best for us, Doug why do not make a votation? >Regards, >Manuel > >> Hi All, >> I don't know anything about licensing issues. >> The below sounds reasonable. If we make this public domain, >> will that be compatible with Sun's JSR? >> Thanks! >> - DL >> P.S. I really don't care what we do, as long as there is >> some sort of collective agreement. >>?? >>> Good day, >>> >>> quite frankly I think that this is a very bad idea. This specification >>> (!) should be in the public domain and nowhere else. >>> >>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>> it is a specification not an implementation. There is no or only >>> trivial code attached to it. So while nothing can be gained by >>> putting it under the LGPL, a lot can be lost - for example the >>> contribution of companies that do not like to open source their >>> implementations. >>> >>> Furthermore you are plain wrong assuming you will be the copyright >>> holder to additions made by other people. >>> >>> Best regards, > >> Joachim >>> >>> >>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>> >>>???? >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>?????? >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for >>>>> inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that >>>>> should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>>>???????? >>>> Does this sound like a reasonable plan to everyone? >>>> >>>> Thanks! >>>> - Doug >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>?????? >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>???? >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 08:20:29 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 11:20:29 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D0AD91.4080103@gmail.com> Message-ID: <44D0B4AD.2050106@gmail.com> Doug; > How does this impact the reference implementation (i.e. RXTX)? > Fuck I have not thinked about that, we would need that everyone who had colaborated with RXTX and have putted code on it to agree a license chaging. Or start from sractch. I don't know if Trent have the right to do that. Regards, Manuel > > >> Hi, >> I have been searching the web and here it is: >> http://jcp.org/en/resources/license_reference >> Here there is a list of the licenses that are compatible with the JCP >> for JSR submitting. >> I think that Apache, CDDL, CPL and OSL are the one that are compatible >> with our needs. >> But I think that Apache is the best for us, Doug why do not make a votation? >> Regards, >> Manuel >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> >> >> Joachim >> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 08:21:15 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 16:21:15 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Putting something in the public domain means, that it can be used by anyone for whatever (s)he thinks is appropriate. The authors define no restriction regarding it's use. That's how any specification should be. Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From berkland at spamcop.net Wed Aug 2 08:50:50 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 10:50:50 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> You may want to consider making it available under two separate licenses. 1 - LGPL as it is today The LGPL can be used by anyone wanting to extend the current functionality, as long as they provide code for anything they change. 2 - Sun Community Source License (SCSL) http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf The SCSL will allow anyone who wants to do a closed source implementation from the ground up to do so, if I'm reading it correctly, as long as they don't use any of the code from the Reference Implementation. This will satisfy any company that wants to have a closed-source implementation, but not help them out very much. On 8/2/06, Joachim Buechse wrote: > Putting something in the public domain means, that it can be used by > anyone for whatever (s)he thinks is appropriate. The authors define > no restriction regarding it's use. That's how any specification > should be. > > Best regards, > Joachim > > > On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > > > Hi All, > > I don't know anything about licensing issues. > > The below sounds reasonable. If we make this public domain, > > will that be compatible with Sun's JSR? > > Thanks! > > - DL > > P.S. I really don't care what we do, as long as there is > > some sort of collective agreement. > >> Good day, > >> > >> quite frankly I think that this is a very bad idea. This > >> specification > >> (!) should be in the public domain and nowhere else. > >> > >> Defining a spec under the (L)GPL makes absolutely no sense. After all > >> it is a specification not an implementation. There is no or only > >> trivial code attached to it. So while nothing can be gained by > >> putting it under the LGPL, a lot can be lost - for example the > >> contribution of companies that do not like to open source their > >> implementations. > >> > >> Furthermore you are plain wrong assuming you will be the copyright > >> holder to additions made by other people. > >> > >> Best regards, > >> Joachim > >> > >> > >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> > >>> Hi All, > >>> Trent and I have been discussing the license issues of the > >>> JSR spec and code that we develop, as a community. > >>> Here is what we have come up with: > >>> > >>>> During the development, the new JSR spec that we derive > >>>> will be > >>>> covered under the LGPL license. Since it is > >>>> just interfaces, any contributions will come back to me, for > >>>> inclusion > >>>> into the specification. The goal is to provide a detailed set of > >>>> interfaces that > >>>> document the present state of our reference model. I am using > >>>> the RXTX as the reference model. If there is something missing > >>>> from > >>>> the reference model, or if the reference model has something that > >>>> should > >>>> not be there, we will need to discuss it. > >>>> > >>>> After Sun accepts the JSR, I, as the copyright holder, can issue > >>>> a version with a JSR compatible license. > >>>> > >>>> The goal is to migrate the interfaces into javax.comm. > >>> > >>> Does this sound like a reasonable plan to everyone? > >>> > >>> Thanks! > >>> - Doug > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From naranjo.manuel at gmail.com Wed Aug 2 09:03:02 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 12:03:02 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> References: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> Message-ID: <44D0BEA6.2040408@gmail.com> Or even better, you can use Apache v2, which allows both Open Source and Closed Source forms ;-) > You may want to consider making it available under two separate licenses. > > 1 - LGPL as it is today > > The LGPL can be used by anyone wanting to extend the current > functionality, as long as they provide code for anything they change. > > 2 - Sun Community Source License (SCSL) > http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf > > The SCSL will allow anyone who wants to do a closed source > implementation from the ground up to do so, if I'm reading it > correctly, as long as they don't use any of the code from the > Reference Implementation. This will satisfy any company that wants to > have a closed-source implementation, but not help them out very much. > > On 8/2/06, Joachim Buechse wrote: > >> Putting something in the public domain means, that it can be used by >> anyone for whatever (s)he thinks is appropriate. The authors define >> no restriction regarding it's use. That's how any specification >> should be. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This >>>> specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> Joachim >>>> >>>> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing >>>>>> from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 09:46:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 17:46:25 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> I assume that javax.comm/RXTX is to be redefined using Interfaces. In this case we should separate 2 things: 1) The specification and it's incarnation in the form of java classes defining the interfaces. 2) The actual implementation of the functionality. It is possible that 1) may contain some trivial code in abstract or none abstract classes (ie PortFactory, PortRegistry, etc). Doug's original question was regarding 1) - unless I misunderstood. I personally think that 1) should be in the public domain. It should not be covered by any restrictions what-so-ever. Let it be free as in "totally free in any respect". I do not care under which license 2) is released. Why? Because it is in my very interest that all/almost all vendors include implementations with their distributions. Which will only happen if they do not need to respect open source licenses. (javax.comm is not nearly as important as the Apache web server or MySql, so nobody will take licensing risks). Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ssbello at gmail.com Wed Aug 2 10:28:30 2006 From: ssbello at gmail.com (Simone) Date: Wed, 2 Aug 2006 18:28:30 +0200 Subject: [Rxtx] pocketPC 2003 Message-ID: <39ed505d0608020928k6ceb01aen470c2e6a78c5a6b0@mail.gmail.com> Does anyone know if the Rxtx works on PocketPc 2003? If yes, could you, please, give me some suggestion. Thanks, Simone Bell? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/72e0fb87/attachment-0330.html From berkland at spamcop.net Wed Aug 2 13:00:10 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 15:00:10 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> Message-ID: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> How about these for the "Business Terms" of the new JSR: > The specification will be released in accordance with standard terms > as specified by the JCP process. > > The reference implementation (RI) will be delivered in binary form > free of charge from http://rxtx.org. Licensing details are expected to > be under the Binary Code License (BCL). > > The source for the reference implementation is expected to be > delivered via the Limited GNU Public License (LGPL) and available free > of charge. > > The TCK will be made available free of charge to all J2SE and J2EE licensees. > > The TCK will be offered for license at no charge, without support or > any trademark license rights, to qualified not-for-profit entities > (including not-for-profit) academic institutions) and qualified > individuals engaged in efforts to create compatible implementations of > the Specification. From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 13:13:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 13:13:33 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E495@hqexchange3.dot.state.co.us> Trent, I didn't exactly get it. Again I am not a C guy, maybe its very simple for you but I don't see any checks for FD (as written in the patch for termios.c) in the initialise_event_info_struct, I see some checks in the interruptEventLoop call. Second as you explained I open three("/dev/cuf01","/dev/cuf01","/dev/cuf01") ports, I close the 2nd ("/dev/cuf02", the other 2 are still open) , I never try to open the third ("/dev/cuf03") port again if it is already open. Are you planning to have a fix for this in the next release 2.1.8. Its very important for me to have a fix for this, its causing some major headaches for our project. I know you have your regular job too, I will appreciate any help. Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, August 01, 2006 6:46 PM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java > VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic > frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) C [librxtxSerial.so+0x69b2] > initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] > Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" > [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: > /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread > "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 > JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon > [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" > daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread > "AdapterThread" daemon [_thread_blocked, id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, > id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Wed Aug 2 13:14:20 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 16:14:20 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> Message-ID: <44D0F98C.1070600@gmail.com> +1 Agree > How about these for the "Business Terms" of the new JSR: > > >> The specification will be released in accordance with standard terms >> as specified by the JCP process. >> >> The reference implementation (RI) will be delivered in binary form >> free of charge from http://rxtx.org. Licensing details are expected to >> be under the Binary Code License (BCL). >> >> The source for the reference implementation is expected to be >> delivered via the Limited GNU Public License (LGPL) and available free >> of charge. >> >> The TCK will be made available free of charge to all J2SE and J2EE licensees. >> >> The TCK will be offered for license at no charge, without support or >> any trademark license rights, to qualified not-for-profit entities >> (including not-for-profit) academic institutions) and qualified >> individuals engaged in efforts to create compatible implementations of >> the Specification. >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From savagobr at yahoo.com Wed Aug 2 13:40:42 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:40:42 -0700 (PDT) Subject: [Rxtx] jsr spec and license issues Message-ID: <20060802194042.83599.qmail@web53807.mail.yahoo.com> Friends Apache seems ok... if I get it right, does it *almost* equals to BSD? Regarding public domain: I think that the good people that spent so much time on this library will like to keep some rights over its own work, don't you think? Best regards Savago --------------------------------- Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/79abdfd5/attachment-0330.html From savagobr at yahoo.com Wed Aug 2 13:58:04 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:58:04 -0700 (PDT) Subject: [Rxtx] JVM Crashing Message-ID: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago --------------------------------- Groups are talking. We´re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/47d561ae/attachment-0330.html From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 14:09:18 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 14:09:18 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E4AD@hqexchange3.dot.state.co.us> Thank You :) ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adenilson Cavalcanti Sent: Wednesday, August 02, 2006 1:58 PM To: rxtx at qbang.org Subject: Re: [Rxtx] JVM Crashing Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago ________________________________ Groups are talking. We?re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/b4eb22cf/attachment-0330.html From tjarvi at qbang.org Wed Aug 2 20:23:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 20:23:42 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > Hi Doug As mentioned off the list, the important point in my mind is that everyone is on the same base more than what license is decided upon. These things are just best addressed early so there isn't confusion. The Apache license is fairly standard in the Open Source community vs several of the relatively unknown [and obviously redundat even by their descriptions] offerings by Sun. Perhaps one option here that would kill a few birds with one stone is to dual license the interface as Apache and LGPL. This would allow everyone to use the interfaces without needing to do wastefull work for internal license requirements. Projects could choose between the two the license that best suits their needs. If there is a software shop doing Java that isn't familiar with the Apache license, they must be doing some strange Java. I do think it is foolhearty to blindly travel in public domain but nobody is trying to undermine the spec files. The intent is to use the work for a JSR submission that everyone can use without confusion later on down the line. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 21:01:16 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 20:01:16 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D166FC.9090005@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> Does this sound like a reasonable plan to everyone? >> > > Hi Doug > > As mentioned off the list, the important point in my mind is that everyone > is on the same base more than what license is decided upon. These things > are just best addressed early so there isn't confusion. > > The Apache license is fairly standard in the Open Source community vs > several of the relatively unknown [and obviously redundat even by > their descriptions] offerings by Sun. The JCP is a reasonable process for what the RxTx project intends to achieve by evolving the API. There isn't much to lose by going the JSR route. The community will benefit from a fair API like so many other that have undergone the process. Sun isn't going to own the API or manipulate it into anything weird anymore than anyone else is. I think your fears are rather vague and unfounded. Which isn't to say that I am a well-informed representative of the JCP, I've only sat through one JSR process and we ended up with javax.usb, and IBM got what it wanted out of the deal and the community got a very nice standard. Paul > > Perhaps one option here that would kill a few birds with one stone is to > dual license the interface as Apache and LGPL. This would allow everyone > to use the interfaces without needing to do wastefull work for internal > license requirements. Projects could choose between the two the license > that best suits their needs. If there is a software shop doing Java that > isn't familiar with the Apache license, they must be doing some strange > Java. > > I do think it is foolhearty to blindly travel in public domain but nobody > is trying to undermine the spec files. The intent is to use the work for > a JSR submission that everyone can use without confusion later on down the > line. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Aug 2 22:10:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 22:10:48 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D166FC.9090005@sun.com> References: <44D166FC.9090005@sun.com> Message-ID: On Wed, 2 Aug 2006, Paul Klissner wrote: > Trent Jarvi wrote: >> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> Does this sound like a reasonable plan to everyone? >>> >> >> Hi Doug >> >> As mentioned off the list, the important point in my mind is that everyone >> is on the same base more than what license is decided upon. These things >> are just best addressed early so there isn't confusion. >> >> The Apache license is fairly standard in the Open Source community vs >> several of the relatively unknown [and obviously redundat even by >> their descriptions] offerings by Sun. > > The JCP is a reasonable process for what the RxTx project intends > to achieve by evolving the API. > > There isn't much to lose by going the JSR route. The community will > benefit from a fair API like so many other that have undergone > the process. Sun isn't going to own the API or manipulate it > into anything weird anymore than anyone else is. I think your > fears are rather vague and unfounded. > > Which isn't to say that I am a well-informed representative > of the JCP, I've only sat through one JSR process and we ended > up with javax.usb, and IBM got what it wanted out of the deal > and the community got a very nice standard. > Hi Paul The JCP should work fine. As our intentions are in line, licensing so that everyone can use the interface code should not be a problem. Note that the current default right now is that the interfaces are copyrighted and no license for distribution is included. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 22:33:51 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 21:33:51 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D166FC.9090005@sun.com> Message-ID: <44D17CAF.1090802@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Paul Klissner wrote: > >> Trent Jarvi wrote: >>> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>> Does this sound like a reasonable plan to everyone? >>>> >>> Hi Doug >>> >>> As mentioned off the list, the important point in my mind is that everyone >>> is on the same base more than what license is decided upon. These things >>> are just best addressed early so there isn't confusion. >>> >>> The Apache license is fairly standard in the Open Source community vs >>> several of the relatively unknown [and obviously redundat even by >>> their descriptions] offerings by Sun. >> The JCP is a reasonable process for what the RxTx project intends >> to achieve by evolving the API. >> >> There isn't much to lose by going the JSR route. The community will >> benefit from a fair API like so many other that have undergone >> the process. Sun isn't going to own the API or manipulate it >> into anything weird anymore than anyone else is. I think your >> fears are rather vague and unfounded. >> >> Which isn't to say that I am a well-informed representative >> of the JCP, I've only sat through one JSR process and we ended >> up with javax.usb, and IBM got what it wanted out of the deal >> and the community got a very nice standard. >> > > Hi Paul > > The JCP should work fine. As our intentions are in line, licensing so > that everyone can use the interface code should not be a problem. Sorry, looks like my concerns were unfounded. I haven't been following the threads closely this week, as work got busy with an escalated issue and new project. Sorry about that. > > Note that the current default right now is that the interfaces are > copyrighted and no license for distribution is included. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Aug 3 03:45:56 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 03 Aug 2006 05:45:56 -0400 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: Hi All, I have been waiting a day for things to cool down. Licensing appears to be a hot-button topic. I have no objection to dual license the interfaces as both Apache and LGPL. Some thoughts: Goal: developers wish to work together on a common piece of code that the team needs. It makes sense that the code base they work on should be Apache-licensed. That makes it possible for the team to use and develop common code, even if the end result is LGPL'd as a whole. If we combine licenses, we must follow the terms of both licenses when distributing the combined work. Thus, the dual license contains the super set of terms in the licenses of Apached and LGPL. This should address concern about using Apache-licensed code within LGPL projects due to the FSF's claim that they are incompatible. Here is a draft statement for RXSL: The RXTX Specification Library (RXSL) uses a dual license strategy for the source code. These licenses are the GNU Lesser General Public License (LGPL) and the Apache License. I strongly encourage users to use the LGPL license and participate fully in the free software community. Dual licensing of the RXSL source code provides open and free access to the technology both for the GPL community and for other developers or companies that cannot use the GPL. Dual license is common practice in open source projects like OpenOffice, Perl and Mozilla. Through the combined use of LGPL and Apache license, developers will have a high degree of freedom yet compatibility and interoperability will be preserved. You can freely modify, extend, and improve the RXSL source code. The only question is whether or not you must provide the source code and contribute modifications to the community. The GNU and Apache licenses allow different ranges of flexibility in this regard, but in the end, regardless of the license used, any and all incompatible changes must be published openly. Note that there is the RXTX Reference Model that uses the org.rxtx package, which itself is protected by the LGPL. This may be part of the distribution, however, it can not be redistributed using a different license. Is everybody OK with this? Thanks Trent, great idea! - Doug From joachim at buechse.de Thu Aug 3 04:15:44 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 3 Aug 2006 12:15:44 +0200 Subject: [Rxtx] JVM Crashing In-Reply-To: <20060802195804.70935.qmail@web53812.mail.yahoo.com> References: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Message-ID: <6ABA2AB2-CECE-4C4B-A7D6-0CDF8B9C95A8@buechse.de> I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of > rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jvermillard at archean.fr Thu Aug 3 04:26:48 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Thu, 03 Aug 2006 12:26:48 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <1154600808.16732.18.camel@localhost.localdomain> Hi, I'm a developer of the Apache MINA framework. It's a network application framework which helps users develop high performance and high scalability network applications easily. http://directory.apache.org/subprojects/mina/index.html . I would like to integrate serial connection to the framework (actualy supporting TCP, UDP (broadcast) and in VM communications), but LGPL is an issue for me. An Apache License would be pretty usefull for me and integrate rxtx functionnalities easly. Thanks, Julien Le jeudi 03 ao?t 2006 ? 05:45 -0400, Dr. Douglas Lyon a ?crit : > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/755cca7f/smime-0330.bin From pascal at quies.net Thu Aug 3 04:32:35 2006 From: pascal at quies.net (Pascal S. de Kloe) Date: Thu, 3 Aug 2006 12:32:35 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <200608031232.35838.pascal@quies.net> Hi Doug, The Apache license is unnessesary complex. It puts all kinds of limitations on the usage. Is there a particular reason why people chose this or was it just the familiar name? I agree with Joachim (again) that the specification and the interfaces should be public domain. However, if we realy need a license then have a look at the X11 license because that one is compatible with the GPL and suits our needs: http://www.fsf.org/licensing/licenses/index_html http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3 ---- start: implementation Copyright (C) 2006 Sun Microsystems, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Sun Microsystems shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Sun Microsystems. Java is a trademark of Sun Microsystems, Inc. ---- end Op donderdag 3 augustus 2006 11:45, schreef Dr. Douglas Lyon: > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Aug 3 05:17:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 05:17:07 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154600808.16732.18.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: On Thu, 3 Aug 2006, Julien Vermillard wrote: > Hi, > > I'm a developer of the Apache MINA framework. It's a network application > framework which helps users develop high performance and high > scalability network applications easily. > http://directory.apache.org/subprojects/mina/index.html . I would like > to integrate serial connection to the framework (actualy supporting TCP, > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > An Apache License would be pretty usefull for me and integrate rxtx > functionnalities easly. > > Thanks, > > Julien > Hi Julien The rxtx license itself will not change. This is just the interface. You would be free to implement an rxtx replacement if the LGPL low level code is a problem for you. These licensing details would make it possible to take the interface code instead of needing to recode them for a new project. You are probably confusing the license problems with the GPL not the LGPL though you can share links to concerns off the list if you would like to go through them. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 11:59:48 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 11:59:48 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E516@hqexchange3.dot.state.co.us> Joachim, I think my both problems (JVM crashing & Port Locking) are being caused by the corruption of "Event Info Struct / EIS" I have noticed with in EIS my "FD" and "Closing" value being overwritten. The problem is definitely in SerialImp.c file. I am trying to understand what the code does and try to pin point the problem by trying few other options. I will keep everybody posted. Regards Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Joachim Buechse Sent: Thursday, August 03, 2006 4:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Thu Aug 3 13:50:07 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 14:50:07 -0500 Subject: [Rxtx] slow startup Message-ID: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete From brian at mbari.org Thu Aug 3 14:05:57 2006 From: brian at mbari.org (Brian Schlining) Date: Thu, 3 Aug 2006 13:05:57 -0700 Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> References: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Message-ID: Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B > Greetings, > I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/ > qbang.org). > > In testing things out, I ran the list ports example from the Wiki, > and it seems to take quite a while for the library to initialize? > Like on the order of 30+ seconds or so after startup (and the RXTX > banner prints), and before the application starts running. > > Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then > I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ > terminal server) and I'm wondering if they are not responding properly > and this is causing the slow startup? Or is this a known problem of > some kind, or maybe something on my system is screwy? > > Thanks, > Pete > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/6123f730/attachment-0329.html From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 14:13:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 14:13:47 -0600 Subject: [Rxtx] slow startup Message-ID: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Hi Pete, RXTX does open and close the ports in Windows. Try downloading utility like PORTMON(only for windows) and you can see that whenever you load RXTX it tries to register all the available COMM ports in the system. It is a little slow if you have virtual ports, we use digi as a terminal server, Its going to get worst of you have comm ports in 100's Thanks Pawan Kharbanda ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Brian Schlining Sent: Thursday, August 03, 2006 2:06 PM To: RXTX Developers and Users Subject: Re: [Rxtx] slow startup Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/94fd105d/attachment-0329.html From pete.flugstad at gmail.com Thu Aug 3 14:32:04 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 15:32:04 -0500 Subject: [Rxtx] slow startup In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Message-ID: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> On 8/3/06, Kharbanda, Pawan wrote: > RXTX does open and close the ports in Windows. Try downloading utility > like PORTMON(only for windows) and you can see that whenever you load RXTX > it tries to register all the available COMM ports in the system. It is a > little slow if you have virtual ports, we use digi as a terminal server, Its > going to get worst of you have comm ports in 100's Okay, I can understand that, but from the PORTMON output, it looks like it's opening each port TWICE: 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS ... 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS Also, assuming instead of listing the ports I wanted to just open one, I'm still seeing the 30 second delay, so it's scanning at startup regardless of what the Java code is going to do. Probably necessary, but annoying. I know, I know, contribute patches... :-) Thanks, Pete From tjarvi at qbang.org Thu Aug 3 15:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 15:04:42 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: On Thu, 3 Aug 2006, Pete Flugstad wrote: > On 8/3/06, Kharbanda, Pawan wrote: >> RXTX does open and close the ports in Windows. Try downloading utility >> like PORTMON(only for windows) and you can see that whenever you load RXTX >> it tries to register all the available COMM ports in the system. It is a >> little slow if you have virtual ports, we use digi as a terminal server, Its >> going to get worst of you have comm ports in 100's > > Okay, I can understand that, but from the PORTMON output, it looks > like it's opening each port TWICE: > > 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > ... > 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > > Also, assuming instead of listing the ports I wanted to just open one, > I'm still seeing the 30 second delay, so it's scanning at startup > regardless of what the Java code is going to do. Probably necessary, > but annoying. > > I know, I know, contribute patches... :-) > I think this problem is in RXTXCommDriver.java. I've just not tracked it down but it should be in the java code, not the native code so easy enough to track down. -- Trent Jarvi tjarvi at qbang.org From jvermillard at archean.fr Fri Aug 4 03:43:28 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:43:28 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: <1154684608.6181.4.camel@localhost.localdomain> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > Hi, > > > > I'm a developer of the Apache MINA framework. It's a network application > > framework which helps users develop high performance and high > > scalability network applications easily. > > http://directory.apache.org/subprojects/mina/index.html . I would like > > to integrate serial connection to the framework (actualy supporting TCP, > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > An Apache License would be pretty usefull for me and integrate rxtx > > functionnalities easly. > > > > Thanks, > > > > Julien > > > > Hi Julien > > The rxtx license itself will not change. This is just the interface. > You would be free to implement an rxtx replacement if the LGPL low level > code is a problem for you. These licensing details would make it possible > to take the interface code instead of needing to recode them for a new > project. > > You are probably confusing the license problems with the GPL not the LGPL > though you can share links to concerns off the list if you would like to > go through them. > > -- > Trent Jarvi > tjarvi at qbang.org Hi, I'm not a license expert but some guys at ASF said me you can't call LGPLed libs from java. some peoples interprete that as static linking and not dynamic linking (no idea why). So ASF/BSD licensied interface willl solve the license probleme. If you got some questions about the ASL and the way you can dual license LGPL/ASL you can ask it on legal-discuss at apache.org Julien -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/8d46c0aa/smime-0329.bin From jvermillard at archean.fr Fri Aug 4 03:51:30 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:51:30 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <1154685091.6181.6.camel@localhost.localdomain> erm from java -> from ASLed Java code Le vendredi 04 ao?t 2006 ? 11:43 +0200, Julien Vermillard a ?crit : > Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > Hi, > > I'm not a license expert but some guys at ASF said me you can't call > LGPLed libs from java. some peoples interprete that as static linking > and not dynamic linking (no idea why). So ASF/BSD licensied interface > willl solve the license probleme. > > If you got some questions about the ASL and the way you can dual license > LGPL/ASL you can ask it on legal-discuss at apache.org > > Julien > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dcc29d70/smime-0329.bin From guille at sms.nl Fri Aug 4 04:35:24 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Fri, 04 Aug 2006 12:35:24 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <7.0.1.0.0.20060804123322.036dc748@sms.nl> At 11:43 04/08/2006, Julien Vermillard wrote: >Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > >Hi, > >I'm not a license expert but some guys at ASF said me you can't call >LGPLed libs from java. some peoples interprete that as static linking >and not dynamic linking (no idea why). This interpretation is wrong. See the official position of the FSF regarding the LGPL and Java: http://www.gnu.org/licenses/lgpl-java.html http://www.fsf.org/licensing/licenses/lgpl-java.html Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From hambyiii at hotmail.com Fri Aug 4 04:52:47 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 10:52:47 +0000 Subject: [Rxtx] error getting InputStream Message-ID: Hi, I have written a program in Java for Windows xp using RXTX (which is why I am using this mailing list :). However, I am getting a problem. I am connecting to a serial port, like so: private CommPortIdentifier portID; private boolean openPort(String selectedPort) { boolean portFound = false; Enumeration portList; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portID.getName().equals(selectedPort)) { portFound = true; break; } } } return portFound; } and then I try and get the serial port input stream (leaving out the try and catch for the sake of space): SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); InputStream inputStream = serialPort.getInputStream(); but on the getInputStream() I get the following error message: Bad file descriptor in nativeavailable I cannot figure out where it is going wrong...anyone any ideas. A quick answer would be wonderful, as I am kinda under the hammer to get this fixed quickly Thanks in Advance Keith From tjarvi at qbang.org Fri Aug 4 05:13:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 05:13:19 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <7.0.1.0.0.20060804123322.036dc748@sms.nl> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> <7.0.1.0.0.20060804123322.036dc748@sms.nl> Message-ID: On Fri, 4 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 11:43 04/08/2006, Julien Vermillard wrote: >> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : >>> On Thu, 3 Aug 2006, Julien Vermillard wrote: >>> >>>> Hi, >>>> >>>> I'm a developer of the Apache MINA framework. It's a network application >>>> framework which helps users develop high performance and high >>>> scalability network applications easily. >>>> http://directory.apache.org/subprojects/mina/index.html . I would like >>>> to integrate serial connection to the framework (actualy supporting TCP, >>>> UDP (broadcast) and in VM communications), but LGPL is an issue for me. >>>> >>>> An Apache License would be pretty usefull for me and integrate rxtx >>>> functionnalities easly. >>>> >>>> Thanks, >>>> >>>> Julien >>>> >>> >>> Hi Julien >>> >>> The rxtx license itself will not change. This is just the interface. >>> You would be free to implement an rxtx replacement if the LGPL low level >>> code is a problem for you. These licensing details would make it possible >>> to take the interface code instead of needing to recode them for a new >>> project. >>> >>> You are probably confusing the license problems with the GPL not the LGPL >>> though you can share links to concerns off the list if you would like to >>> go through them. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >> >> Hi, >> >> I'm not a license expert but some guys at ASF said me you can't call >> LGPLed libs from java. some peoples interprete that as static linking >> and not dynamic linking (no idea why). > > This interpretation is wrong. See the official position of the FSF regarding > the LGPL and Java: > > http://www.gnu.org/licenses/lgpl-java.html > > http://www.fsf.org/licensing/licenses/lgpl-java.html > What I do with legal groups that go down that rat hole is give them a copy of the rxtx 2.0 license. Since the confused legal folks are going in a direction that does not represent the intent of the license or authors at that point and are confused about basic things in our industry that most consider facts, the discussions are very short. The rxtx 2.0 license just adds the following and has for 6 years or so. Not because the lawyers are right. They get confused about intent and even facts. The following is added to make confused lawyers that cant understand intent go far away and never come back. period. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. From hambyiii at hotmail.com Fri Aug 4 05:42:21 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 11:42:21 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Okay, I made a little mistake in my last message. The error is not occuring where I thought it was. Instead it is occuring when I do the following: byte[] readBuffer = new byte[128]; try { int numBytes = 0; try { Thread.sleep(500); } catch (InterruptedException e) {} while (inputStream.available() > 0) { numBytes = inputStream.read(readBuffer); } processReceivedData(readBuffer, numBytes); } catch (IOException e) { System.out.println(e.getMessage()); } So I guess the error is happening on the inputStream.read(readBuffer) again, any help is appreciated and again, thanks in advance Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 10:52:47 +0000 > >Hi, > >I have written a program in Java for Windows xp using RXTX (which is why I >am using this mailing list :). However, I am getting a problem. I am >connecting to a serial port, like so: > private CommPortIdentifier portID; > > private boolean openPort(String selectedPort) > { > boolean portFound = false; > Enumeration portList; > > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portID.getName().equals(selectedPort)) > { > portFound = true; > break; > } > } > } > > return portFound; > } > >and then I try and get the serial port input stream (leaving out the try >and >catch for the sake of space): > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >InputStream inputStream = serialPort.getInputStream(); > >but on the getInputStream() I get the following error message: > >Bad file descriptor in nativeavailable > >I cannot figure out where it is going wrong...anyone any ideas. A quick >answer would be wonderful, as I am kinda under the hammer to get this fixed >quickly > >Thanks in Advance >Keith > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From hambyiii at hotmail.com Fri Aug 4 07:08:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:08:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Hi, I know I am replying to myself a lot at the moment, but more information has come to light (These errors are actually happening on a client machine, on software that has worked for the past month, and only now has started to fail, which is why I am a little slow finding things out) The errors I have already written about are only symptoms of an orignal error. The original error occurs the first time I try to WRITE thte OutputStream: OutputStream oStream = serialPort.getOutputStream(); serialPort.notifyOnOutputEmpty(true); byte[] bs = encodeMessage(configString.toString()); oStream.write(bs); oStream.flush(); The error occurs on oStream.write(bs); and is: Input/output error in writeArray Now writeArray is native code, so I have no idea what is going on there. Any help would be appreciated Thanks Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 11:42:21 +0000 > >Okay, I made a little mistake in my last message. > >The error is not occuring where I thought it was. Instead it is occuring >when I do the following: > >byte[] readBuffer = new byte[128]; > >try { > > int numBytes = 0; > try { > Thread.sleep(500); > } > catch (InterruptedException e) > {} > > while (inputStream.available() > 0) > { > numBytes = inputStream.read(readBuffer); > } > > processReceivedData(readBuffer, numBytes); >} >catch (IOException e) >{ > System.out.println(e.getMessage()); >} > >So I guess the error is happening on the inputStream.read(readBuffer) > >again, any help is appreciated and again, thanks in advance >Keith > > >From: "Keith Thorne" > >Reply-To: RXTX Developers and Users > >To: rxtx at qbang.org > >Subject: [Rxtx] error getting InputStream > >Date: Fri, 04 Aug 2006 10:52:47 +0000 > > > >Hi, > > > >I have written a program in Java for Windows xp using RXTX (which is why >I > >am using this mailing list :). However, I am getting a problem. I am > >connecting to a serial port, like so: > > private CommPortIdentifier portID; > > > > private boolean openPort(String selectedPort) > > { > > boolean portFound = false; > > Enumeration portList; > > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > > while (portList.hasMoreElements()) > > { > > portID = (CommPortIdentifier) portList.nextElement(); > > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > > { > > if (portID.getName().equals(selectedPort)) > > { > > portFound = true; > > break; > > } > > } > > } > > > > return portFound; > > } > > > >and then I try and get the serial port input stream (leaving out the try > >and > >catch for the sake of space): > > > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); > >InputStream inputStream = serialPort.getInputStream(); > > > >but on the getInputStream() I get the following error message: > > > >Bad file descriptor in nativeavailable > > > >I cannot figure out where it is going wrong...anyone any ideas. A quick > >answer would be wonderful, as I am kinda under the hammer to get this >fixed > >quickly > > > >Thanks in Advance > >Keith > > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Aug 4 07:26:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: Hi Keith Can you tell us more about the physical serial port? Might it be 'vanishing?' On Fri, 4 Aug 2006, Keith Thorne wrote: > Hi, > > I know I am replying to myself a lot at the moment, but more information has > come to light (These errors are actually happening on a client machine, on > software that has worked for the past month, and only now has started to > fail, which is why I am a little slow finding things out) > > The errors I have already written about are only symptoms of an orignal > error. The original error occurs the first time I try to WRITE thte > OutputStream: > > OutputStream oStream = serialPort.getOutputStream(); > serialPort.notifyOnOutputEmpty(true); > > byte[] bs = encodeMessage(configString.toString()); > > oStream.write(bs); > oStream.flush(); > > The error occurs on oStream.write(bs); and is: > > Input/output error in writeArray > > Now writeArray is native code, so I have no idea what is going on there. Any > help would be appreciated > Thanks > Keith > > >> From: "Keith Thorne" >> Reply-To: RXTX Developers and Users >> To: rxtx at qbang.org >> Subject: Re: [Rxtx] error getting InputStream >> Date: Fri, 04 Aug 2006 11:42:21 +0000 >> >> Okay, I made a little mistake in my last message. >> >> The error is not occuring where I thought it was. Instead it is occuring >> when I do the following: >> >> byte[] readBuffer = new byte[128]; >> >> try { >> >> int numBytes = 0; >> try { >> Thread.sleep(500); >> } >> catch (InterruptedException e) >> {} >> >> while (inputStream.available() > 0) >> { >> numBytes = inputStream.read(readBuffer); >> } >> >> processReceivedData(readBuffer, numBytes); >> } >> catch (IOException e) >> { >> System.out.println(e.getMessage()); >> } >> >> So I guess the error is happening on the inputStream.read(readBuffer) >> >> again, any help is appreciated and again, thanks in advance >> Keith >> >>> From: "Keith Thorne" >>> Reply-To: RXTX Developers and Users >>> To: rxtx at qbang.org >>> Subject: [Rxtx] error getting InputStream >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 >>> >>> Hi, >>> >>> I have written a program in Java for Windows xp using RXTX (which is why >> I >>> am using this mailing list :). However, I am getting a problem. I am >>> connecting to a serial port, like so: >>> private CommPortIdentifier portID; >>> >>> private boolean openPort(String selectedPort) >>> { >>> boolean portFound = false; >>> Enumeration portList; >>> >>> portList = CommPortIdentifier.getPortIdentifiers(); >>> >>> while (portList.hasMoreElements()) >>> { >>> portID = (CommPortIdentifier) portList.nextElement(); >>> if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) >>> { >>> if (portID.getName().equals(selectedPort)) >>> { >>> portFound = true; >>> break; >>> } >>> } >>> } >>> >>> return portFound; >>> } >>> >>> and then I try and get the serial port input stream (leaving out the try >>> and >>> catch for the sake of space): >>> >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >>> InputStream inputStream = serialPort.getInputStream(); >>> >>> but on the getInputStream() I get the following error message: >>> >>> Bad file descriptor in nativeavailable >>> >>> I cannot figure out where it is going wrong...anyone any ideas. A quick >>> answer would be wonderful, as I am kinda under the hammer to get this >> fixed >>> quickly >>> >>> Thanks in Advance >>> Keith >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From hambyiii at hotmail.com Fri Aug 4 07:52:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:52:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more information >has > > come to light (These errors are actually happening on a client machine, >on > > software that has worked for the past month, and only now has started to > > fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an orignal > > error. The original error occurs the first time I try to WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); > >> } > >> catch (IOException e) > >> { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance > >> Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I am > >>> connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Fri Aug 4 08:21:07 2006 From: gergg at cox.net (Gregg Wonderly) Date: Fri, 04 Aug 2006 09:21:07 -0500 Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: <44D357D3.40303@cox.net> Keith Thorne wrote: > Okay, I made a little mistake in my last message. > > The error is not occuring where I thought it was. Instead it is occuring > when I do the following: > > byte[] readBuffer = new byte[128]; > > try { > > } > catch (IOException e) > { > System.out.println(e.getMessage()); > } > > So I guess the error is happening on the inputStream.read(readBuffer) This is one of the most frustrating things to see over and over. The exception tells you exactly which line the error is occuring on, if you will use it to see where. In Java, these days, every class should do the following. import java.util.logging.*; public class MyClass { Logger log = Logger.getLogger( getClass().getName() ); ...in some method... { String data = ...; // any extra data like addresses or // ports which might be wrong and // cause an exception. try { ... } catch( SomeException ex ) { log.log( Level.SEVERE, ex.toString()+": "+data, ex ); } } } By default, you will see all of the appropriate details of any exception logged at the WARNING or SEVERE level. You can read the javadocs about logging to get more information too. Once you do this, people can then turn up logging and get more information, or otherwise manage it with a logging configuration file or other tools such as JMX or my http://logman.dev.java.net project. Gregg Wonderly From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 09:15:24 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 09:15:24 -0600 Subject: [Rxtx] error getting InputStream Message-ID: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Keith, Please send the full stack trace of the exception, may be I can help you. On Trent's question regarding physical 'Serial Port', do you mean you have a USB(Connected to Client Machine) to 9 Pin Serial cable(Connected to H/W device)? Also please mention which java version you are using? Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Keith Thorne Sent: Friday, August 04, 2006 7:52 AM To: rxtx at qbang.org Subject: Re: [Rxtx] error getting InputStream The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more > > information >has > > come to light (These errors are actually happening on a client > > machine, >on > > software that has worked for the past month, and only now has > > started to fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an > > orignal error. The original error occurs the first time I try to > > WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); } catch (IOException > >> e) { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the > >> inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which > >>> is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I > >>> am connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out > >>> the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get > >>> this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 14:36:16 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 14:36:16 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Trent, As discussed over the phone yesterday, I am emailing you all the details of the bugs I have been experiencing. We do not use Serial Ports like most of the applications. Our application uses approx 80 -100 serial ports (attached thru Digi boxes) which are opened and closed every 20 sec to 1 minute depending upon the type of device. Some Serial ports are left opened all the time and receive event based serial calls while other devices uses polling (request and reply) to collect data. So the opening and closing of the Serial Ports is not really in a sequential order as you mentioned in our conversation yesterday. Also 2 same serial ports can never be opened at one time we have business locks to prevent that from happening. Our findings so far (of course with the help of RXTX user group): The real culprit is in the SerialImp.c file, somehow the other the Event Info Structure in the Linked List gets damaged and loses references to the original EIS structure. I believe both the problems are caused because of the corruption of EIS packet. I have noticed that the link list traversal of EIS in the following methods under SerialImp.c : 1)initialise_event_info_struct 2)finalize_event_info_struct 3)interruptEventLoop So culprit code might be in one of these methods. I am currently using JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and Fedora Core 5). I am also attaching a Test Class to replicate the problem. You need to modify the class and add your systems Serial ports into the code and execute. java TestOpenClosePort 100 It will open and close all the serial ports 100 times in there own thread. Please let me know, I will be available thru out this weekend and can help you as much as I can with testing. Regards Pawan Kharbanda CDOT-ITS 303-478-2991 (cell) 303-985-4350 (home) -------------- next part -------------- A non-text attachment was scrubbed... Name: TestOpenClosePort.java Type: application/octet-stream Size: 6139 bytes Desc: TestOpenClosePort.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dd3754d9/TestOpenClosePort-0328.obj From tjarvi at qbang.org Fri Aug 4 15:43:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 15:43:09 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: Thanks, I'll look at it tomorrow morning. I don't know when I'll find the solution but you may check email tomorrow afternoon to see if I think I found it. On Fri, 4 Aug 2006, Kharbanda, Pawan wrote: > Trent, > As discussed over the phone yesterday, I am emailing you all the > details of the bugs I have been experiencing. We do not use Serial Ports > like most of the applications. Our application uses approx 80 -100 > serial ports (attached thru Digi boxes) which are opened and closed > every 20 sec to 1 minute depending upon the type of device. Some Serial > ports are left opened all the time and receive event based serial calls > while other devices uses polling (request and reply) to collect data. So > the opening and closing of the Serial Ports is not really in a > sequential order as you mentioned in our conversation yesterday. Also 2 > same serial ports can never be opened at one time we have business locks > to prevent that from happening. > > Our findings so far (of course with the help of RXTX user group): > > The real culprit is in the SerialImp.c file, somehow the other the Event > Info Structure in the Linked List gets damaged and loses references to > the original EIS structure. I believe both the problems are caused > because of the corruption of EIS packet. I have noticed that the link > list traversal of EIS in the following methods under SerialImp.c : > > 1)initialise_event_info_struct > 2)finalize_event_info_struct > 3)interruptEventLoop > > So culprit code might be in one of these methods. I am currently using > JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and > Fedora Core 5). > > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > > Regards > Pawan Kharbanda > CDOT-ITS > 303-478-2991 (cell) > 303-985-4350 (home) > > > > > > > > > > From tjarvi at qbang.org Sat Aug 5 12:32:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:32:40 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:34:27 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:34:27 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> You need to run it few times. More the number of ports, more frequently you can reproduce. With just 2 ports it will be hard to reproduce frequently. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:33 PM To: Kharbanda, Pawan Cc: tjarvi at qbang.org; RXTX Developers and Users Subject: Re: Port Locking / JVM Crashing > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Aug 5 12:52:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:52:26 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> Message-ID: Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more frequently > you can reproduce. With just 2 ports it will be hard to reproduce > frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:57:49 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:57:49 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Trent, I have 5 ports of Digi and I can reproduce almost every time. Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX version -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:52 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more > frequently you can reproduce. With just 2 ports it will be hard to > reproduce frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need >> to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From tjarvi at qbang.org Sat Aug 5 13:06:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:06:07 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Message-ID: You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few thousand > iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:07:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:07:33 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E659@hqexchange3.dot.state.co.us> We use our own locks but I haven't turned off the RXTX locks. I am still using the RXTX locks that might be the difference. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:13:22 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:13:22 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Trent, How can you turn off the lock files? I can try using that. I never tried that, I thought you can't turn off the file locking. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From tjarvi at qbang.org Sat Aug 5 13:18:53 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:18:53 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Message-ID: Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java > -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except lockfiles > are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:31:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:31:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Trent, I am able to constantly replicate almost everytime even when I have locks disabled. Don't know the reason why you are not able to on your environment. Any suggestions??????? Cycle No (Thread ::: /dev/cuf04) ::::::: 7 Cycle No (Thread ::: /dev/cuf01) ::::::: 7 Cycle No (Thread ::: /dev/cuf02) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) Exiting Thread ::: /dev/cuf03 Cycle No (Thread ::: /dev/cuf03) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent Port /dev/cuf01 is Opened 0x01 Sent Port /dev/cub01 is Opened 0x01 Sent Port /dev/cuf01 is Closed Port /dev/cuf02 is Closed Port /dev/cuf03 is Closed Port /dev/cuf04 is Closed Port /dev/cub01 is Closed Exiting Thread ::: /dev/cuf03 Exiting Thread ::: /dev/cuf02 Cycle No (Thread ::: /dev/cuf03) ::::::: 8 Cycle No (Thread ::: /dev/cuf02) ::::::: 8 Exiting Thread ::: /dev/cuf04 Exiting Thread ::: /dev/cuf01 Cycle No (Thread ::: /dev/cuf01) ::::::: 8 Cycle No (Thread ::: /dev/cuf04) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened 0x01 Sent Port /dev/cuf01 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 # # An error report file with more information is saved as hs_err_pid21386.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:19 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) > 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux > java -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except > lockfiles are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code >>>> and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm >>> running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From tjarvi at qbang.org Sat Aug 5 14:14:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 14:14:49 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: I'd stick a couple $15 dual port serial boards in the machine to see if its kernel driver specific. I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more problematic. They do not get the same number of eyes looking for problems. You could try putting #undef TIOCSERGETLSR #undef TIOCGICOUNT in the very top of SerialImp.h or one or the other to flip bits of code off and on. The kernel here is 2.6.11.4-20a-smp from Suse. glibc is 2.3.4-23.4 from Suse the jre is 1.5.0_06-b05 from Sun. The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC ram. You should be able to reproduce what I'm seeing then go from there. I don't think I'm going to see this problem without having the same cornercase hardware you have. Maybe we can work that out off the list but I doubt I'm going to find it in rxtx at this point. I have seen problems in the past were kernel structs don't match user space struct and bad things happen but I was including a kernel struct to get functionality that had not made its way into user space at the time. The only thing I may be missing is that when I write 0x01 out the port, nothing comes back. That was not specified but you could easily disconnect anything connected to the ports to see if that changes anything. rxtx is far from bug free but I do not see anything yet. On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I am able to constantly replicate almost everytime even when I have > locks disabled. Don't know the reason why you are not able to on your > environment. Any suggestions??????? > > > Cycle No (Thread ::: /dev/cuf04) ::::::: 7 > Cycle No (Thread ::: /dev/cuf01) ::::::: 7 > Cycle No (Thread ::: /dev/cuf02) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > Exiting Thread ::: /dev/cuf03 > Cycle No (Thread ::: /dev/cuf03) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > Port /dev/cuf01 is Opened > 0x01 Sent > Port /dev/cub01 is Opened > 0x01 Sent > Port /dev/cuf01 is Closed > Port /dev/cuf02 is Closed > Port /dev/cuf03 is Closed > Port /dev/cuf04 is Closed > Port /dev/cub01 is Closed > Exiting Thread ::: /dev/cuf03 > Exiting Thread ::: /dev/cuf02 > Cycle No (Thread ::: /dev/cuf03) ::::::: 8 > Cycle No (Thread ::: /dev/cuf02) ::::::: 8 > Exiting Thread ::: /dev/cuf04 > Exiting Thread ::: /dev/cuf01 > Cycle No (Thread ::: /dev/cuf01) ::::::: 8 > Cycle No (Thread ::: /dev/cuf04) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > 0x01 Sent > Port /dev/cuf01 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 > # > # An error report file with more information is saved as > hs_err_pid21386.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > Aborted > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:19 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Lockfiles are a compile time option. I've turned them on now, corrected > a mistake resulting in only 3 ports being used and now have it going > through a few hundred iterations again without a crash. > > To disable lockfiles.. > > ./configure --disable-lockfiles && make install > > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > Port /dev/ttyS5 is Closed > Exiting Thread ::: /dev/ttyS1 > Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: > /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting > Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port > /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS1 is Closed > Port /dev/ttyS4 is Closed > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > > > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, How can you turn off the lock files? I can try using that. I >> never tried that, I thought you can't turn off the file locking. >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:06 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> You may try 4 ports instead of 5 to make sure thats not the issue. >> >> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >> 2.6.11.4-20a-smp >> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >> java -version java version "1.5.0_06" >> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >> >> I'm using rxtx 2.1-7 (final) with default configuration except >> lockfiles are disabled. I gathered that you are doing your own > resource locking. >> >> ... >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> ... >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>> version >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:52 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> Whats a few times? I've got 4 ports here and have run it a few >>> thousand iterations. >>> >>> Is that true for you if you run it with just four of your DIGI ports? >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> You need to run it few times. More the number of ports, more >>>> frequently you can reproduce. With just 2 ports it will be hard to >>>> reproduce frequently. >>>> >>>> ~pk >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:33 PM >>>> To: Kharbanda, Pawan >>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>> Subject: Re: Port Locking / JVM Crashing >>>> >>>>> I am also attaching a Test Class to replicate the problem. You need > >>>>> to >>>> >>>>> modify the class and add your systems Serial ports into the code >>>>> and >> >>>>> execute. >>>>> >>>>> java TestOpenClosePort 100 >>>>> >>>>> It will open and close all the serial ports 100 times in there own >>>>> thread. >>>>> >>>>> Please let me know, I will be available thru out this weekend and >>>>> can >>> >>>>> help you as much as I can with testing. >>>>> >>>> >>>> How reproducable is the problem with the above testcase? I'm >>>> running >> >>>> 100's of iterations without reproducing the problem. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> >>> >> > From rtlane01 at comcast.net Tue Aug 1 19:22:03 2006 From: rtlane01 at comcast.net (Randall T. Lane) Date: Tue, 01 Aug 2006 21:22:03 -0400 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] Message-ID: <44CFFE3B.90001@comcast.net> Rxtx Community: Please see my e-mail to Trent. Does anyone have any experience using rxtx to successfully communicate with hardware via USB? Thanks. Randy Lane -------------- next part -------------- An embedded message was scrubbed... From: Trent Jarvi Subject: Re: Help with RxTx for USB Communication Date: Tue, 1 Aug 2006 18:49:13 -0600 (MDT) Size: 3300 Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060801/9bbbc255/HelpwithRxTxforUSBCommunication-0326.mht From naranjo.manuel at gmail.com Sun Aug 6 16:59:28 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Sun, 06 Aug 2006 19:59:28 -0300 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44CFFE3B.90001@comcast.net> References: <44CFFE3B.90001@comcast.net> Message-ID: <44D67450.8010100@gmail.com> Randy: I have been able to communicate to AIRcable USB Bluetooth Dongle, with success. I'm not sure which are the options that you have to send to RXTX library, but you can indeed. Check that you do not have the port avaible for much long. I have heard of a problem with WinXP that it simply turn off virtual ports when they are too much long with out activity. If you want I can send you my code, because it is avaible under GPL, the new release is not avaible at AIRcable web site, but it should in short time. Regards, Manu > Rxtx Community: > > Please see my e-mail to Trent. Does anyone have any experience using > rxtx to successfully communicate with hardware via USB? > > Thanks. > > Randy Lane > > ------------------------------------------------------------------------ > > Asunto: > Re: Help with RxTx for USB Communication > De: > Trent Jarvi > Fecha: > Tue, 1 Aug 2006 18:49:13 -0600 (MDT) > Para: > "Randall T. Lane" > > Para: > "Randall T. Lane" > CC: > taj at www.linux.org.uk > > > On Tue, 1 Aug 2006, Randall T. Lane wrote: > >> Trent, >> >> I am working on a project written in Java (1.5) and need to >> communicate to an external device via a USB port. >> >> I have downloaded rxtx-2.1-7-bins-r2.zip from www.rxtx.org and setup >> a Java test project to learn how to use rxtx. I am able to list the >> serial ports available, however rxtx does not recognize my USB port. >> I am running on Windows XP. Here is some output from my test project >> ... >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> COM1 - Serial >> COM3 - Serial >> LPT1 - Parallel >> >> I would appreciate any help you could provide in getting rxtx to >> allow me to communicate via my USB port. >> >> Here is my code, if that would help. >> >> public static void main(String[] args) { >> listPorts(); >> // The listPorts() and getPortTypeName() methods are used for >> port identification. >> static void listPorts() >> { >> Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); >> while ( portEnum.hasMoreElements() ) >> { >> CommPortIdentifier portIdentifier = (CommPortIdentifier) >> portEnum.nextElement(); >> System.out.println(portIdentifier.getName() + " - " + >> getPortTypeName(portIdentifier.getPortType()) ); >> } } >> static String getPortTypeName ( int portType ) >> { >> switch ( portType ) >> { >> case CommPortIdentifier.PORT_I2C: >> return "I2C"; >> case CommPortIdentifier.PORT_PARALLEL: >> return "Parallel"; >> case CommPortIdentifier.PORT_RAW: >> return "Raw"; >> case CommPortIdentifier.PORT_RS485: >> return "RS485"; >> case CommPortIdentifier.PORT_SERIAL: >> return "Serial"; >> default: >> return "unknown type"; >> } >> } >> >> Thanks. >> >> Randy Lane >> > > Hi Randy > > The rxtx mail list is a better place to ask as there are more eyes. > I'm swamped with work. > > Be sure to look to see that your serial port dongle shows up as a > serial port in device manager and no other applications have it open. > USB serial dongles do work with rxtx. Some are less complete than > others. > > -- > Trent Jarvi > tjarvi at qbang.org > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From eddythejekyll at gmail.com Sun Aug 6 23:31:45 2006 From: eddythejekyll at gmail.com (Ed) Date: Sun, 6 Aug 2006 23:31:45 -0600 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? Message-ID: I have written a simple client server (RMI) application without using RxTx where the server controls a parallel port simply by addressing the port and banging the bits in order to drive a relay. It also reads the port's. I am doing this by making Runtime.exec calls to a binary that actually does the parallel port bit banging and reading. However, I'd like to use RxTx so it is a pure Java application, and I've so far installed and figured out how to discover the ports, but I'm having trouble finding good examples or some howto type documentation for this. I did find the two examples on the Wiki: one for serial IO and the other to discover the ports on a system. As I said, I have so far installed RxTx and gotten it to compile and run and I can identify the ports. When I run the server I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found Ports! Found port COM1 Found port COM3 Found port LPT1 LPT1 Not Currently owned EASSwitch Server starting. EASSwitch is bound. Server Ready. So it looks like thing are installed and working, but I feel all dressed up and no idea how to proceed. Basically, I just want to be able to toggle the data lines on the parallel port and read them. Very simple. No parallel printer type usage. Are there any examples I can work off of? If so, please advise. Thank you. -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060806/c7e39898/attachment-0326.html From hambyiii at hotmail.com Sun Aug 6 23:53:54 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Mon, 07 Aug 2006 05:53:54 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Message-ID: Hi, sorry I took the weekend to reply, but I was away for the last couple of days. Unfortunately I cannot send the full stack trace yet. The problem is not, unfortunately, happening on my computer, but on a clients computer, which I will go and visit today. I will hopefully be able to get a stack trace then. As to the physical connection, tt is indeed a USB from the computer, connected to a 9 pin serial device that connects to the hard-ware. My java version is 1.5.06 >From: "Kharbanda, Pawan" >Reply-To: RXTX Developers and Users >To: "RXTX Developers and Users" >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 09:15:24 -0600 > >Keith, > Please send the full stack trace of the exception, may be I can help >you. On Trent's question regarding physical 'Serial Port', do you mean >you have a USB(Connected to Client Machine) to 9 Pin Serial >cable(Connected to H/W device)? > >Also please mention which java version you are using? > >Thanks >Pawan Kharbanda > > >-----Original Message----- >From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >Of Keith Thorne >Sent: Friday, August 04, 2006 7:52 AM >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream > >The physical serial port is actually a USB connection that is then >changed to a "virtual serial port", so I can use the serial port >protocols to connect to it. The other end of the connection is a >hardware device that is constantly turned on. I am not sure about the >port 'vanishing'...we have another piece of software that came with the >hardware device, which we can test the device (and with it the virtual >serial port) with. This has no problem connecting to the serial port or >writing to/reading from the device. >It is only when my software is run, that the error occurs. Like I have >said, my software (using rxtx) is connecting to the serial port >successfully, but it is when I try and write to the serial port that I >get the error. > >Although to be truthful, I am not absolutely certain if the error is >happening on the oStream.write() or the oStream.flush(). I only think it >is the write(), because that is where the writeArray() function is >called. > >thanks >Keith > > > >From: Trent Jarvi > >Reply-To: RXTX Developers and Users > >To: RXTX Developers and Users > >Subject: Re: [Rxtx] error getting InputStream > >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > > > > >Hi Keith > > > >Can you tell us more about the physical serial port? Might it be > >'vanishing?' > > > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > > > Hi, > > > > > > I know I am replying to myself a lot at the moment, but more > > > information > >has > > > come to light (These errors are actually happening on a client > > > machine, > >on > > > software that has worked for the past month, and only now has > > > started to fail, which is why I am a little slow finding things out) > > > > > > The errors I have already written about are only symptoms of an > > > orignal error. The original error occurs the first time I try to > > > WRITE thte > > > OutputStream: > > > > > > OutputStream oStream = serialPort.getOutputStream(); > > > serialPort.notifyOnOutputEmpty(true); > > > > > > byte[] bs = encodeMessage(configString.toString()); > > > > > > oStream.write(bs); > > > oStream.flush(); > > > > > > The error occurs on oStream.write(bs); and is: > > > > > > Input/output error in writeArray > > > > > > Now writeArray is native code, so I have no idea what is going on >there. > >Any > > > help would be appreciated > > > Thanks > > > Keith > > > > > > > > >> From: "Keith Thorne" > > >> Reply-To: RXTX Developers and Users > > >> To: rxtx at qbang.org > > >> Subject: Re: [Rxtx] error getting InputStream > > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > > >> > > >> Okay, I made a little mistake in my last message. > > >> > > >> The error is not occuring where I thought it was. Instead it is > >occuring > > >> when I do the following: > > >> > > >> byte[] readBuffer = new byte[128]; > > >> > > >> try { > > >> > > >> int numBytes = 0; > > >> try { > > >> Thread.sleep(500); > > >> } > > >> catch (InterruptedException e) > > >> {} > > >> > > >> while (inputStream.available() > 0) > > >> { > > >> numBytes = inputStream.read(readBuffer); > > >> } > > >> > > >> processReceivedData(readBuffer, numBytes); } catch (IOException > > >> e) { > > >> System.out.println(e.getMessage()); > > >> } > > >> > > >> So I guess the error is happening on the > > >> inputStream.read(readBuffer) > > >> > > >> again, any help is appreciated and again, thanks in advance Keith > > >> > > >>> From: "Keith Thorne" > > >>> Reply-To: RXTX Developers and Users > > >>> To: rxtx at qbang.org > > >>> Subject: [Rxtx] error getting InputStream > > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > > >>> > > >>> Hi, > > >>> > > >>> I have written a program in Java for Windows xp using RXTX (which > > >>> is > >why > > >> I > > >>> am using this mailing list :). However, I am getting a problem. I > > >>> am connecting to a serial port, like so: > > >>> private CommPortIdentifier portID; > > >>> > > >>> private boolean openPort(String selectedPort) > > >>> { > > >>> boolean portFound = false; > > >>> Enumeration portList; > > >>> > > >>> portList = CommPortIdentifier.getPortIdentifiers(); > > >>> > > >>> while (portList.hasMoreElements()) > > >>> { > > >>> portID = (CommPortIdentifier) portList.nextElement(); > > >>> if (portID.getPortType() == > >CommPortIdentifier.PORT_SERIAL) > > >>> { > > >>> if (portID.getName().equals(selectedPort)) > > >>> { > > >>> portFound = true; > > >>> break; > > >>> } > > >>> } > > >>> } > > >>> > > >>> return portFound; > > >>> } > > >>> > > >>> and then I try and get the serial port input stream (leaving out > > >>> the > >try > > >>> and > > >>> catch for the sake of space): > > >>> > > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", > >2000); > > >>> InputStream inputStream = serialPort.getInputStream(); > > >>> > > >>> but on the getInputStream() I get the following error message: > > >>> > > >>> Bad file descriptor in nativeavailable > > >>> > > >>> I cannot figure out where it is going wrong...anyone any ideas. A > >quick > > >>> answer would be wonderful, as I am kinda under the hammer to get > > >>> this > > >> fixed > > >>> quickly > > >>> > > >>> Thanks in Advance > > >>> Keith > > >>> > > >>> > > >>> _______________________________________________ > > >>> Rxtx mailing list > > >>> Rxtx at qbang.org > > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > > >> > > >> > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Aug 7 06:22:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:22:03 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: Hmm.. I left the test running went I went home Saturday. It looks like something did show up after ~30k iterations. I'll look at it more in my free time. Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS5 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 29417 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 29417 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 29417 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00002aab14c2ec63, pid=20573, tid=1095125344 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6c63] initialise_event_info_struct+0x63 # [thread 1087756640 also had an error] Port /dev/ttyS5 is Opened 0x01 Sent [thread 1089861984 also had an error] Port /dev/ttyS4 is Opened 0x01 Sent [thread 1090914656 also had an error] # An error report file with more information is saved as [thread 1090914656 also had an error] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted On Sat, 5 Aug 2006, Trent Jarvi wrote: > > I'd stick a couple $15 dual port serial boards in the machine to see if its > kernel driver specific. > > I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more > problematic. They do not get the same number of eyes looking for problems. > > You could try putting > > #undef TIOCSERGETLSR > #undef TIOCGICOUNT > > in the very top of SerialImp.h or one or the other to flip bits of code off > and on. > > The kernel here is 2.6.11.4-20a-smp from Suse. > glibc is 2.3.4-23.4 from Suse > the jre is 1.5.0_06-b05 from Sun. > > The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC > ram. > > You should be able to reproduce what I'm seeing then go from there. I don't > think I'm going to see this problem without having the same cornercase > hardware you have. Maybe we can work that out off the list but I doubt I'm > going to find it in rxtx at this point. > > I have seen problems in the past were kernel structs don't match user space > struct and bad things happen but I was including a kernel struct to get > functionality that had not made its way into user space at the time. > > The only thing I may be missing is that when I write 0x01 out the port, > nothing comes back. That was not specified but you could easily disconnect > anything connected to the ports to see if that changes anything. > > rxtx is far from bug free but I do not see anything yet. > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, >> I am able to constantly replicate almost everytime even when I have >> locks disabled. Don't know the reason why you are not able to on your >> environment. Any suggestions??????? >> >> >> Cycle No (Thread ::: /dev/cuf04) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> Exiting Thread ::: /dev/cuf03 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> Port /dev/cuf01 is Opened >> 0x01 Sent >> Port /dev/cub01 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Closed >> Port /dev/cuf02 is Closed >> Port /dev/cuf03 is Closed >> Port /dev/cuf04 is Closed >> Port /dev/cub01 is Closed >> Exiting Thread ::: /dev/cuf03 >> Exiting Thread ::: /dev/cuf02 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 8 >> Exiting Thread ::: /dev/cuf04 >> Exiting Thread ::: /dev/cuf01 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf04) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 >> # >> # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 >> # >> # An error report file with more information is saved as >> hs_err_pid21386.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> Aborted >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:19 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Lockfiles are a compile time option. I've turned them on now, corrected >> a mistake resulting in only 3 ports being used and now have it going >> through a few hundred iterations again without a crash. >> >> To disable lockfiles.. >> >> ./configure --disable-lockfiles && make install >> >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> Port /dev/ttyS5 is Closed >> Exiting Thread ::: /dev/ttyS1 >> Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: >> /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting >> Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port >> /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> >> >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, How can you turn off the lock files? I can try using that. I >>> never tried that, I thought you can't turn off the file locking. >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 1:06 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> You may try 4 ports instead of 5 to make sure thats not the issue. >>> >>> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >>> 2.6.11.4-20a-smp >>> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >>> java -version java version "1.5.0_06" >>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >>> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >>> >>> I'm using rxtx 2.1-7 (final) with default configuration except >>> lockfiles are disabled. I gathered that you are doing your own >> resource locking. >>> >>> ... >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> Port /dev/ttyS4 is Closed >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> ... >>> >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>>> version >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:52 PM >>>> To: Kharbanda, Pawan >>>> Cc: Trent Jarvi; RXTX Developers and Users >>>> Subject: RE: Port Locking / JVM Crashing >>>> >>>> >>>> Whats a few times? I've got 4 ports here and have run it a few >>>> thousand iterations. >>>> >>>> Is that true for you if you run it with just four of your DIGI ports? >>>> >>>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>>> >>>>> You need to run it few times. More the number of ports, more >>>>> frequently you can reproduce. With just 2 ports it will be hard to >>>>> reproduce frequently. >>>>> >>>>> ~pk >>>>> >>>>> -----Original Message----- >>>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>>> Sent: Saturday, August 05, 2006 12:33 PM >>>>> To: Kharbanda, Pawan >>>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>>> Subject: Re: Port Locking / JVM Crashing >>>>> >>>>>> I am also attaching a Test Class to replicate the problem. You need >> >>>>>> to >>>>> >>>>>> modify the class and add your systems Serial ports into the code >>>>>> and >>> >>>>>> execute. >>>>>> >>>>>> java TestOpenClosePort 100 >>>>>> >>>>>> It will open and close all the serial ports 100 times in there own >>>>>> thread. >>>>>> >>>>>> Please let me know, I will be available thru out this weekend and >>>>>> can >>>> >>>>>> help you as much as I can with testing. >>>>>> >>>>> >>>>> How reproducable is the problem with the above testcase? I'm >>>>> running >>> >>>>> 100's of iterations without reproducing the problem. >>>>> >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> >>>> >>> >> > From iinjlv01 at gmail.com Mon Aug 7 06:22:07 2006 From: iinjlv01 at gmail.com (J LV) Date: Mon, 7 Aug 2006 14:22:07 +0200 Subject: [Rxtx] Data lost or Slow sampling Message-ID: Hello I am using RXTX to comm with a motion controller using Serial Port and i can write the commands using SerialPort or RXTXPort without problems, but when i try write and read at high sampling rate, for example to know the position and speed at every moment of a trajectory, i obtain a very irregular response times. I am using the most simple algorimth: 1-Write the command "is trajectory finished?" and wait for SerialPortEvent.DATA_AVAILABLE 2-Read the InputStreamReader of serial port while not empty 3-If trajectory finished then stop program, else, continue 4-Read actual time using System.currentTimeMillis() (t0) 5-Write the command "give me position" and wait for SerialPortEvent.DATA_AVAILABLE 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) 7-Read the InputStreamReader of serial port while not empty 8-Save position in Vector or ArrayList and repeat from 1 I don't know if the problem is the RXTX, my program or the motion controller hardware but i have response times from 16 millis to 78 millis at 19200 bauds!. I am using SwingWorked to threading SerialPort reading/writing process. Any idea or similar data leak problem? Thanks for RXTX project and sorry for my badde english! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/909a4cb3/attachment-0326.html From tjarvi at qbang.org Mon Aug 7 06:50:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:50:10 -0600 (MDT) Subject: [Rxtx] Data lost or Slow sampling In-Reply-To: References: Message-ID: On Mon, 7 Aug 2006, J LV wrote: > Hello > > I am using RXTX to comm with a motion controller using Serial Port and i can > write the commands using SerialPort or RXTXPort without problems, but when i > try write and read at high sampling rate, for example to know the position > and speed at every moment of a trajectory, i obtain a very irregular > response times. I am using the most simple algorimth: > 1-Write the command "is trajectory finished?" and wait for > SerialPortEvent.DATA_AVAILABLE > 2-Read the InputStreamReader of serial port while not empty > 3-If trajectory finished then stop program, else, continue > 4-Read actual time using System.currentTimeMillis() (t0) > 5-Write the command "give me position" and wait for > SerialPortEvent.DATA_AVAILABLE > 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) > 7-Read the InputStreamReader of serial port while not empty > 8-Save position in Vector or ArrayList and repeat from 1 > > > I don't know if the problem is the RXTX, my program or the motion controller > hardware but i have response times from 16 millis to 78 millis at 19200 > bauds!. I am using SwingWorked to threading SerialPort reading/writing > process. > > Any idea or similar data leak problem? > > Thanks for RXTX project and sorry for my badde english! > This can be platform dependant. What you may do for a starting point is use a loopback connection and time the same thing at 19200. Write the date, wait for data available, read the data. I would expect from write to data available to take around 10 ms from past experiences. You can experiment with turning on and off buffering in the port settings of the OS, if the OS supports more realtime like interrupts, that could help. You have a java schedual and the kernel schedual. Serial interrupts traditionally have very high priority but modern OSs tend to realize thats not good for GUIs, ... and delay responding to the interrupts. You should be able to have usec response times in a realtime OS. Windows and Linux are not typically setup as realtime OSs. For comparison, the last time I looked which was about 5 years ago, windows NT4 came back with data available in 8 ms and Linux came back in 10 ms. I would be interested in seeing what you get today. -- Trent Jarvi tjarvi at qbang.org From gergg at cox.net Mon Aug 7 09:21:56 2006 From: gergg at cox.net (Gregg Wonderly) Date: Mon, 07 Aug 2006 10:21:56 -0500 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? In-Reply-To: References: Message-ID: <44D75A94.9030205@cox.net> Ed wrote: > Are there any examples I can work off of? If so, please advise. Just read the javax.comm javadocs. You need to take the parallel port and write values to it based on which bits of which lines you want on and off. Gregg Wonderly From pete.flugstad at gmail.com Mon Aug 7 09:36:19 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 7 Aug 2006 10:36:19 -0500 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44D67450.8010100@gmail.com> References: <44CFFE3B.90001@comcast.net> <44D67450.8010100@gmail.com> Message-ID: <84d4a6d50608070836v97e9a29q96e98441ea903ac7@mail.gmail.com> FYI, I'm talking to a USB<->Serial dongle just fine under Windows XP Pro. I did have to install a driver for the thing - Windows XP by default, did not recognize it. Once installed, it just showed up as another COM port, and I've been pushing data over it with no problems. Pete From savagobr at yahoo.com Mon Aug 7 10:13:06 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Mon, 7 Aug 2006 09:13:06 -0700 (PDT) Subject: [Rxtx] Port Locking / JVM Crashing: 2 ports (Serial + usb) Message-ID: <20060807161306.9648.qmail@web53803.mail.yahoo.com> Trent This is curious, since I did reproduced the aformentioned bug using only 2 ports: /dev/ttyS0 and /dev/ttyUSB0. It only need to run for 500 times: $ java -cp . TestOpenClosePort 500 500 Port /dev/ttyS0 is Closed Excpetion ::: Thread ::: /dev/ttyUSB0null Exiting Thread ::: /dev/ttyUSB0 Cycle No (Thread ::: /dev/ttyUSB0) ::::::: 227 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 184 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x203d2044, pid=32368, tid=2986859424 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing) # Problematic frame: # C 0x203d2044 # # An error report file with more information is saved as /tmp/hs_err_pid32368.log # # If you would like to submit a bug report, please visit: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Best regards Savago ps: Test environment $ uname -a Linux localhost.localdomain 2.6.15-1.2054_FC5 #1 Tue Mar 14 15:48:33 EST 2006 i686 i686 i386 GNU/Linux $ java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) $gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.1 20060525 (Red Hat 4.1.1-1) --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/c6ca8094/attachment-0325.html From Pawan.Kharbanda at dot.state.co.us Mon Aug 7 17:23:25 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 7 Aug 2006 17:23:25 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Trent, I think I got the problem fixed after some code changes in the C (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the staging environment (with 10 devices) with real time data and haven't seen a JVM lock/ Port locking since last night. I am going to do further stress testing and will send all my code changes and my findings in next few days. I believe the problem was causing due to the digi drivers and how the Linux kernel talked to it, so after making some code changes and synchronization fixes, I got it to work. I am keeping my fingers crossed :) Thanks for all your help. You have been a great help. Will keep you posted. Cheers ~pk PS : We are going to test my new RXTX changes with the 2.6 Red Hat kernel (currently using 2.4.21-37.ELsmp) too. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 5:08 PM To: Kharbanda, Pawan Subject: RE: Port Locking / JVM Crashing Hi Pawan As mentioned I did reproduce the error but after several hours of cycles. I'm looking at RXTXPort.java and thinking about what may be happening. The error is in the C layer but it may be preventable in the java code. lets say two closes are overlapping or an operation is trying to happen while another port is closing. The structure may be out of sync by the time the code using the structure in another thread gets to the event info struct. So I'm wondering if synchronization in RXTXPort() and close() may help you. A second thing that may help is you can put printf("got here\n"); in each of the lines in initialize event info struct to verify that the problem is in walking the linked list. Thats my suspicion. So a properly timed close() while calling the constructor may be catching rxtx off guard. You can synchronize to test that and it may do away with the problem. From tjarvi at qbang.org Mon Aug 7 18:01:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 18:01:54 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Message-ID: Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do further > stress testing and will send all my code changes and my findings in next > few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to happen > while another port is closing. The structure may be out of sync by the > time the code using the structure in another thread gets to the event > info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may do > away with the problem. > From Pawan.Kharbanda at dot.state.co.us Tue Aug 8 13:49:14 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 8 Aug 2006 13:49:14 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Trent, I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and have absolutely no problem with JVM crashing or Port Locking even after 10000 operations (now I am trying 100,000 :). This is all with the original RXTX 2.1.7 (final) api's without any of my fixes that I have been trying for last 2-3 weeks. I will suggest that we update the INSTALL or Readme file accompnying the RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: 82000685_G 02/02/2006). This should helped everybody using the RXTX API's with RedHat Linux atleast. Regards Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 6:02 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do > further stress testing and will send all my code changes and my > findings in next few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers > crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to > happen while another port is closing. The structure may be out of > sync by the time the code using the structure in another thread gets > to the event info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may > do away with the problem. > From jimo at earthlink.net Wed Aug 9 21:21:00 2006 From: jimo at earthlink.net (Jim Owen) Date: Wed, 9 Aug 2006 20:21:00 -0700 Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat Message-ID: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Hi All, I've run into some difficulties with rxtx that have me baffled and need some help. I have an application that has used earlier versions of rxtx successfully and on a variety of platforms. We recently needed to deploy this application into an environment where we could not utilize lock files. I pulled down the 2.0.7 pre1 source distribution and executed configure with --disable-lockfiles. I then executed make and make install. When I execute the program, as root, I get the following error: ************************************************************************ Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) # Problematic frame: # C 0x00001004 # # An error report file with more information is saved as hs_err_pid20151.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # **************************************************************************** If I execute as a normal user, I get no errors, but no ports listed: (Using an earlier version, I get a serial and parallel port listed.) **************************************************************************** [jim at linuxDev ingenicoApp]$ java VerifyCommBuild Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Some ports appear to have been found, let's try to enumerate them. Complete. **************************************************************************** When I built rxtx, there was a warning given of the following: **************************************************************************** conftest.c: In function 'main': conftest.c:6: warning: incompatible implicit declaration of built-in function 'printf' conftest.c:7: warning: incompatible implicit declaration of built-in function 'exit' WARNING: Kernel include files do not match the current kernel **************************************************************************** uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux JAVA_HOME=/usr/java/j2sdk1.4.2_11 javax.comm.properties: Driver=gnu.io.RXTXCommDriver Here's the code for VerifyCommBuild.java that I'm using to test: **************************************************************************** import javax.comm.*; import java.util.Enumeration; /** * A quick app to check that the javax.comm (Serial) Communications extension has been properly * installed and configured on this machine. * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. */ public class VerifyCommBuild { public static void main(String args[]) { Enumeration ports; System.out.println("Verifying Comm Build Environment"); try { ports = CommPortIdentifier.getPortIdentifiers(); if (ports == null) { System.out.println("No comm ports found!"); return; } System.out.println("Some ports appear to have been found, let's try to enumerate them."); while (ports.hasMoreElements()) { System.out.println("Here is a port [" + ((CommPortIdentifier)ports.nextElement()).getName() + "]"); } } catch (Exception e) { System.out.println("Failed to enumerate ports [" + e.getMessage() + "]"); e.printStackTrace(); } System.out.println("Complete."); } } **************************************************************************** Any suggestions as to what I'm missing? Thanks, Jim Owen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060809/92503a81/attachment-0323.html From tjarvi at qbang.org Thu Aug 10 05:39:36 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 05:39:36 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Message-ID: On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even after > 10000 operations (now I am trying 100,000 :). This is all with the > original RXTX 2.1.7 (final) api's without any of my fixes that I have > been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying the > RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp > and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From oliver.archner at bayceer.uni-bayreuth.de Wed Aug 9 06:13:36 2006 From: oliver.archner at bayceer.uni-bayreuth.de (Oliver Archner) Date: Wed, 09 Aug 2006 14:13:36 +0200 Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() Message-ID: <44D9D170.5020806@bayceer.uni-bayreuth.de> Dear Users, i would like to send a byte to a parallel device. The following piece of code works well but throws an IOException in LPRPort$ParallelOutputStream.write() saying that everything is ok ?! Oliver import java.io.*; import gnu.io.*; public class Test { public static void main(String[] args) { RXTXCommDriver TxPort = new RXTXCommDriver(); ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", CommPortIdentifier.PORT_PARALLEL); OutputStream oStream = null; try { oStream = pPort.getOutputStream(); oStream.write((byte)0x51); } catch (IOException e) { e.printStackTrace(); } finally { try { if (oStream != null) oStream.close(); } catch (IOException e) { e.printStackTrace(); } } } } Output: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Der Vorgang wurde erfolgreich beendet. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at Test.main(Test.java:12) From tjarvi at qbang.org Thu Aug 10 18:12:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 18:12:27 -0600 (MDT) Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() In-Reply-To: <44D9D170.5020806@bayceer.uni-bayreuth.de> References: <44D9D170.5020806@bayceer.uni-bayreuth.de> Message-ID: On Wed, 9 Aug 2006, Oliver Archner wrote: > Dear Users, > > i would like to send a byte to a parallel device. > The following piece of code works well but throws an IOException in > LPRPort$ParallelOutputStream.write() saying that everything is ok ?! > > Oliver > > > import java.io.*; > import gnu.io.*; > > public class Test { > > public static void main(String[] args) { > RXTXCommDriver TxPort = new RXTXCommDriver(); > ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", > CommPortIdentifier.PORT_PARALLEL); > OutputStream oStream = null; > try { > oStream = pPort.getOutputStream(); > oStream.write((byte)0x51); > } catch (IOException e) { > e.printStackTrace(); > } finally { > try { > if (oStream != null) oStream.close(); > } catch (IOException e) { > e.printStackTrace(); > > } > } > > } > } > > Output: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Der Vorgang wurde erfolgreich beendet. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at Test.main(Test.java:12) WriteFile is returning a negative value or 0. I do not know what that exception is saying but it should be an IO Exception. The native code in question is line 405 in ParallelImp.c. If you find the documentation pointing out how the code is wrong, we can fix it. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 08:12:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 09:12:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question Message-ID: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Hello, I'm trying to send data over a serial port using the RXTX libraries. I've got the binaries for Windows XP from qbang.org. On the receiving side, I'm using event notification (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial Ports InputStream. Similarly on the transmist side, I use SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. First question: does this make sense? The code was largely adopted from an existing Windows C++ program and that's more or less how it operated (overlapped io using ReadFile, WriteFile, GetOverlappedResult, Events, etc). Second question: in a small standalone test program I wrote, everything seems to work just fine - whenever SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good chunk of data available (I explicitly set the in/out buffers to 1024 bytes) to read. However, when I pull my "library" into a much larger environment (OSGI framework based, but same JVM/OS/etc), whenever SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a byte or two available. Needless to say, this really kills performance. Everything appears to still operate properly, just really, really slowly. So, has anyone seen this problem before? I haven't dived into the details of RXTX library, and I'm wondering what the mechanism is here? How does the RXTX thread determine when to issue the SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to tweak in RXTX or the JVM to get this to operate more like the small test program? Seems like I want RXTX to call me back _less_ often. Thanks, Pete From tjarvi at qbang.org Fri Aug 11 09:55:23 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 09:55:23 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Hello, > > I'm trying to send data over a serial port using the RXTX > libraries. I've got the binaries for Windows XP from qbang.org. > > On the receiving side, I'm using event notification > (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial > Ports InputStream. Similarly on the transmist side, I use > SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. > > First question: does this make sense? The code was largely adopted > from an existing Windows C++ program and that's more or less how it > operated (overlapped io using ReadFile, WriteFile, > GetOverlappedResult, Events, etc). > > Second question: in a small standalone test program I wrote, > everything seems to work just fine - whenever > SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good > chunk of data available (I explicitly set the in/out buffers to 1024 > bytes) to read. > > However, when I pull my "library" into a much larger environment > (OSGI framework based, but same JVM/OS/etc), whenever > SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a > byte or two available. Needless to say, this really kills > performance. Everything appears to still operate properly, just > really, really slowly. > > So, has anyone seen this problem before? I haven't dived into the > details of RXTX library, and I'm wondering what the mechanism is here? > How does the RXTX thread determine when to issue the > SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to > tweak in RXTX or the JVM to get this to operate more like the small > test program? > Seems like I want RXTX to call me back _less_ often. > Hi Pete RXTX is doing overlapped IO in termios.c. In this file we map the windows functionality to termios (mostly POSIX). From there, we just talk termios to all platforms. What I guess is happening is the eventloop is waiting a specified amount of time. As you application uses more cpu cycles, you observe the difference in behavior. You could go into the C code and change this after looking at the eventLoop() code in serialImp.c and following that to the serial_ioctl() and serial_select() in termios.c Another option is to go into RXTXPort.java and put a sleep in the sendEvent() code. This way you would not have to recompile the native code (not very easy at this point). -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 13:27:36 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:27:36 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > Another option is to go into RXTXPort.java and put a sleep in the > sendEvent() code. This way you would not have to recompile the native > code (not very easy at this point). Are the instructions in the INSTALL file still valid? If so, it wasn't very hard to build it (I already had MinGW installed). Everything seemed to build just fine. Haven't tried to install/use it yet, but it wasn't a big deal (assuming those instructions were correct. Thanks, Pete From pete.flugstad at gmail.com Fri Aug 11 13:42:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:42:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, but there doesn't appear to be a way to select that via RXTX (which appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control is selected). Is there a way I'm not seeing? Thanks, Pete From eddythejekyll at gmail.com Fri Aug 11 15:20:44 2006 From: eddythejekyll at gmail.com (Ed) Date: Fri, 11 Aug 2006 15:20:44 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion Message-ID: I'm trying to read and write a parallel port on a standard (Dell) pc running RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. I'm having problems getting rxtx to return a port enumeration from getPortIdentifiers. I'm using a file PortChooser.java as a test file to get things going. This is from the Java CookBook 2nd edition (Chapter 12). The call // get list of ports available on this particular computer, // by calling static method in CommPortIdentifier. Enumeration pList = CommPortIdentifier.getPortIdentifiers(); returns a null pList; I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and compile without --disable-lockfiles I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ... When I compile with --disable-lockfiles the call to getPortIdentifiers simply returns a null Enumeration. I've read the documention and threads about this issue and I feel like I've tried everything, so at the moment I'm stumped. I can supply any further info that may help. Thanks in advance. Ed -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060811/80c4eeec/attachment-0321.html From tjarvi at qbang.org Fri Aug 11 18:29:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:29:48 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > On 8/11/06, Trent Jarvi wrote: >> Another option is to go into RXTXPort.java and put a sleep in the >> sendEvent() code. This way you would not have to recompile the native >> code (not very easy at this point). > > Are the instructions in the INSTALL file still valid? If so, it > wasn't very hard to build it > (I already had MinGW installed). Everything seemed to build just > fine. Haven't tried to install/use it yet, but it wasn't a big deal > (assuming those instructions were correct. > Hi Pete The instructions are correct. You will want to make sure that the exports worked. If the library does not work properly, then the exports failed. The exports are currently generated with nm, sed and grep in the Makefile which is often commented out. If the def file is old, it will cause problems. You should be good to go then. Look at the serial_select and eventLoop code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:33:32 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:33:32 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > but there doesn't appear to be a way to select that via RXTX (which > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > is selected). > > Is there a way I'm not seeing? > Hi Pete I'm guessing I didn't know the difference. At the time, I really didn't have windows API documentation. I just had some pages I found with altivista/google. Later microsoft made their documentation available on msdn or I learned about it. For rxtx, the calls need to be platform neutral. So if you see how to do each in termios, then we can get it going. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:45:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:45:24 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Fri, 11 Aug 2006, Ed wrote: > I'm trying to read and write a parallel port on a standard (Dell) pc running > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. > > I'm having problems getting rxtx to return a port enumeration from > getPortIdentifiers. I'm using a file > PortChooser.java as a test file to get things going. This is from the Java > CookBook 2nd edition (Chapter 12). The call > > // get list of ports available on this particular computer, > // by calling static method in CommPortIdentifier. > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > returns a null pList; > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and > compile without --disable-lockfiles I get: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > ... > > When I compile with --disable-lockfiles the call to getPortIdentifiers > simply returns a null Enumeration. > > I've read the documention and threads about this issue and I feel like I've > tried everything, so at the moment I'm stumped. > > I can supply any further info that may help. > > Thanks in advance. > > Ed > Hi Ed You may want to check the permissions of /dev/lp*. Also make sure lp or your kernel support for lp is loaded. It should show up in dmesg and lsmod. For my laptop with no printer port enabled in BIOS is see: lp: driver loaded but no devices found in desg |grep lp [] $ ls -l /dev/lp* crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 here root and group lp can read and write. Normal users cannot. Try a simple read as a user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: Permission denied Fix as root [] chmod 666 /dev/lp* [] $ ls -l /dev/lp* crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 Now as user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: No such device or address So this is saying there is no lp0 on my laptop. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:58:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:58:31 -0600 (MDT) Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat In-Reply-To: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> References: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Message-ID: On Wed, 9 Aug 2006, Jim Owen wrote: > Hi All, > > I've run into some difficulties with rxtx that have me baffled and need > some help. > > I have an application that has used earlier versions of rxtx > successfully and on a variety of platforms. We recently needed to deploy > this application into an environment where we could not utilize lock files. > > I pulled down the 2.0.7 pre1 source distribution and executed configure > with --disable-lockfiles. I then executed make and make install. > > When I execute the program, as root, I get the following error: > > ************************************************************************ > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) > # Problematic frame: > # C 0x00001004 > # > # An error report file with more information is saved as hs_err_pid20151.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > **************************************************************************** > > If I execute as a normal user, I get no errors, but no ports listed: > (Using an earlier version, I get a serial and parallel port listed.) > > **************************************************************************** > [jim at linuxDev ingenicoApp]$ java VerifyCommBuild > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Some ports appear to have been found, let's try to enumerate them. > Complete. > **************************************************************************** > > When I built rxtx, there was a warning given of the following: > > **************************************************************************** > conftest.c: In function 'main': > conftest.c:6: warning: incompatible implicit declaration of built-in > function 'printf' > conftest.c:7: warning: incompatible implicit declaration of built-in > function 'exit' > > WARNING: Kernel include files do not match the current kernel > **************************************************************************** > > > uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 > Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux > > JAVA_HOME=/usr/java/j2sdk1.4.2_11 > > javax.comm.properties: Driver=gnu.io.RXTXCommDriver > > Here's the code for VerifyCommBuild.java that I'm using to test: > > > **************************************************************************** > import javax.comm.*; > import java.util.Enumeration; > /** > * A quick app to check that the javax.comm (Serial) Communications > extension has been properly > * installed and configured on this machine. > * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. > */ > public class VerifyCommBuild > { > public static void main(String args[]) > { > Enumeration ports; > System.out.println("Verifying Comm Build Environment"); > try > { > ports = CommPortIdentifier.getPortIdentifiers(); > if (ports == null) > { > System.out.println("No comm ports found!"); > return; > } > System.out.println("Some ports appear to have been found, let's > try to enumerate them."); > while (ports.hasMoreElements()) > { > System.out.println("Here is a port [" + > ((CommPortIdentifier)ports.nextElement()).getName() > + "]"); > } > } catch (Exception e) > { > System.out.println("Failed to enumerate ports [" + > e.getMessage() + "]"); > e.printStackTrace(); > } > System.out.println("Complete."); > } > } > Hi Jim This is a new one to me. Have you tried it on another system. Maybe something isnt sane in your toolchain. -- Trent Jarvi tarvi at qbang.org From eddythejekyll at gmail.com Sat Aug 12 11:45:39 2006 From: eddythejekyll at gmail.com (Ed) Date: Sat, 12 Aug 2006 11:45:39 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Trent, Right after I sent the results indicated below I re-ran the app and it apparently found the parallel port. The difference was that I set the permissions to : /dev: wildcard lp* crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 I'm still not sure how to interpret the dmesg and lsmod before. However I'm thinking that since the user now has permission to access the lp* port, a request to access it loaded the lp and parport modules automatically and allowed me access. Here's the output of lsmod now: ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp lp 5540 0 (autoclean) parport 21608 1 (autoclean) [parport_pc lp] and dmesg: ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp On node 0 totalpages: 161776 lp0: using parport0 (polling). So I think I'm good, and ready to move on the next steps. Thanks Trent! Ed On 8/12/06, Ed wrote: > > Thanks for the reply Trent. > > I'm on a different system today but am trying your suggestons. This is a > debian 3.1r2 system and I'm running jdk 1.5.0_04. > > Take a look below, but I think I have no parallel port support on this > kernel, however I never get the "No such device or address" return from the > cat call as you did so I'm not sure how to interpret the results. > > When I run the test program (PortChooser.java), the getPortIdentifiers > call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is > more than I found on the RedHat system. Incidently --disable-lockfiles has > no effect. > > It looks as though there is no parallel support in this kernel: > falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > On node 0 totalpages: 161776 > falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > > I'm a little confused by the results when I cat to the lp0 device. It > seems from the dmesg output that I don't have parallel printer support, but > when I cat to the lp0 device, I get permission denied if I'm non-root user > and input/output error if I'm root. Apparently this means I have the device, > but no support in the kernel? > > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > ed at falcon:~/src/workspace/EASServer/src$ su > Password: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > > Here's my lp* device permissions. > /dev: > wildcard lp* > crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > If I change it to > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I get: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > falcon:/home/ed/src/workspace/EASServer/src# exit > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > cat: /dev/lp0: Input/output error > ed at falcon:~/src/workspace/EASServer/src$ > > What do you think? Should I recompile the kernel or is it something else? > > By the way, I added the user ed to the lp and uucp groups on this system. > > Thanks again, > > Ed > > On 8/11/06, Trent Jarvi wrote: > > > > On Fri, 11 Aug 2006, Ed wrote: > > > > > I'm trying to read and write a parallel port on a standard (Dell) pc > > running > > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > > gates. > > > > > > I'm having problems getting rxtx to return a port enumeration from > > > getPortIdentifiers. I'm using a file > > > PortChooser.java as a test file to get things going. This is from the > > Java > > > CookBook 2nd edition (Chapter 12). The call > > > > > > // get list of ports available on this particular computer, > > > // by calling static method in CommPortIdentifier. > > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > > > > > returns a null pList; > > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure > > and > > > compile without --disable-lockfiles I get: > > > > > > Stable Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7 > > > Java lib Version = RXTX-2.1-7 > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > ... > > > > > > When I compile with --disable-lockfiles the call to getPortIdentifiers > > > > > simply returns a null Enumeration. > > > > > > I've read the documention and threads about this issue and I feel like > > I've > > > tried everything, so at the moment I'm stumped. > > > > > > I can supply any further info that may help. > > > > > > Thanks in advance. > > > > > > Ed > > > > > > > Hi Ed > > > > You may want to check the permissions of /dev/lp*. Also make sure lp or > > your kernel support for lp is loaded. It should show up in dmesg and > > lsmod. > > > > For my laptop with no printer port enabled in BIOS is see: > > > > lp: driver loaded but no devices found > > > > in desg |grep lp > > > > [] $ ls -l /dev/lp* > > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > here root and group lp can read and write. Normal users cannot. > > > > Try a simple read as a user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > > > > Fix as root > > > > [] chmod 666 /dev/lp* > > [] $ ls -l /dev/lp* > > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > Now as user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: No such device or address > > > > So this is saying there is no lp0 on my laptop. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > > > -- > > Ed > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060812/c2afe1f8/attachment-0320.html From tjarvi at qbang.org Sat Aug 12 14:01:52 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 12 Aug 2006 14:01:52 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Remember that the lp code expects a printer - or something like it. There is a line that specifies the printer is online. If you are doing hobby work, you will need to raise that line or loop it back to something that is raised. If you just try reading a port with no device connected and online, there will be an error while trying to read. This should be addressed in the mail-list archives. On Sat, 12 Aug 2006, Ed wrote: > Trent, > Right after I sent the results indicated below I re-ran the app and it > apparently found the parallel port. The difference was that I set the > permissions to : > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I'm still not sure how to interpret the dmesg and lsmod before. However I'm > thinking that since the user now has permission to access the lp* port, a > request to access it loaded the lp and parport modules automatically and > allowed me access. Here's the output of lsmod now: > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > lp 5540 0 (autoclean) > parport 21608 1 (autoclean) [parport_pc lp] > > and dmesg: > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > On node 0 totalpages: 161776 > lp0: using parport0 (polling). > > So I think I'm good, and ready to move on the next steps. > > Thanks Trent! > > Ed > > > On 8/12/06, Ed wrote: >> >> Thanks for the reply Trent. >> >> I'm on a different system today but am trying your suggestons. This is a >> debian 3.1r2 system and I'm running jdk 1.5.0_04. >> >> Take a look below, but I think I have no parallel port support on this >> kernel, however I never get the "No such device or address" return from the >> cat call as you did so I'm not sure how to interpret the results. >> >> When I run the test program (PortChooser.java), the getPortIdentifiers >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is >> more than I found on the RedHat system. Incidently --disable-lockfiles has >> no effect. >> >> It looks as though there is no parallel support in this kernel: >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp >> On node 0 totalpages: 161776 >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp >> >> I'm a little confused by the results when I cat to the lp0 device. It >> seems from the dmesg output that I don't have parallel printer support, but >> when I cat to the lp0 device, I get permission denied if I'm non-root user >> and input/output error if I'm root. Apparently this means I have the >> device, >> but no support in the kernel? >> >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> >> cat: /dev/lp0: Permission denied >> ed at falcon:~/src/workspace/EASServer/src$ su >> Password: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> >> Here's my lp* device permissions. >> /dev: >> wildcard lp* >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> If I change it to >> /dev: >> wildcard lp* >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> I get: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> falcon:/home/ed/src/workspace/EASServer/src# exit >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> ed at falcon:~/src/workspace/EASServer/src$ >> >> What do you think? Should I recompile the kernel or is it something else? >> >> By the way, I added the user ed to the lp and uucp groups on this system. >> >> Thanks again, >> >> Ed >> >> On 8/11/06, Trent Jarvi wrote: >> > >> > On Fri, 11 Aug 2006, Ed wrote: >> > >> > > I'm trying to read and write a parallel port on a standard (Dell) pc >> > running >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the >> > gates. >> > > >> > > I'm having problems getting rxtx to return a port enumeration from >> > > getPortIdentifiers. I'm using a file >> > > PortChooser.java as a test file to get things going. This is from the >> > Java >> > > CookBook 2nd edition (Chapter 12). The call >> > > >> > > // get list of ports available on this particular computer, >> > > // by calling static method in CommPortIdentifier. >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); >> > > >> > > returns a null pList; >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure >> > and >> > > compile without --disable-lockfiles I get: >> > > >> > > Stable Library >> > > ========================================= >> > > Native lib Version = RXTX-2.1-7 >> > > Java lib Version = RXTX-2.1-7 >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > ... >> > > >> > > When I compile with --disable-lockfiles the call to getPortIdentifiers >> > >> > > simply returns a null Enumeration. >> > > >> > > I've read the documention and threads about this issue and I feel like >> > I've >> > > tried everything, so at the moment I'm stumped. >> > > >> > > I can supply any further info that may help. >> > > >> > > Thanks in advance. >> > > >> > > Ed >> > > >> > >> > Hi Ed >> > >> > You may want to check the permissions of /dev/lp*. Also make sure lp or >> > your kernel support for lp is loaded. It should show up in dmesg and >> > lsmod. >> > >> > For my laptop with no printer port enabled in BIOS is see: >> > >> > lp: driver loaded but no devices found >> > >> > in desg |grep lp >> > >> > [] $ ls -l /dev/lp* >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > here root and group lp can read and write. Normal users cannot. >> > >> > Try a simple read as a user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: Permission denied >> > >> > Fix as root >> > >> > [] chmod 666 /dev/lp* >> > [] $ ls -l /dev/lp* >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > Now as user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: No such device or address >> > >> > So this is saying there is no lp0 on my laptop. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > >> >> >> >> -- >> >> Ed >> > > > > From pete.flugstad at gmail.com Mon Aug 14 07:51:41 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 08:51:41 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: <84d4a6d50608140651h3cb2266ap90c47780abace00@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > On Fri, 11 Aug 2006, Pete Flugstad wrote: > > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > > but there doesn't appear to be a way to select that via RXTX (which > > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > > is selected). > > I'm guessing I didn't know the difference. At the time, I really didn't > have windows API documentation. I just had some pages I found with > altivista/google. Later microsoft made their documentation available on > msdn or I learned about it. > > For rxtx, the calls need to be platform neutral. So if you see how to do > each in termios, then we can get it going. so, RTSCTS_IN/OUT at the COMM API is mapped to HARDWARE_FLOW_CONTROL in the POSIX layer. Which termios.c maps to RTS_CONTROL_HANDSHAKE and fOutxCtsFlow = true. Since termios.c is Windows only anway... Would it work to change the mapping in termios.c to map hardware flow control to RTS_CONTROL_TOGGLE? I just wondering (I'm going to go look, but there's a lot of code in there) if the code does anything special playing with flow control signals? Thanks, Pete From pete.flugstad at gmail.com Mon Aug 14 09:42:48 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 10:42:48 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> On 8/3/06, Trent Jarvi wrote: > On Thu, 3 Aug 2006, Pete Flugstad wrote: > > Okay, I can understand that, but from the PORTMON output, it looks > > like it's opening each port TWICE: > > I think this problem is in RXTXCommDriver.java. I've just not tracked it > down but it should be in the java code, not the native code so easy > enough to track down. Okay, I'm trying to track this down... Looks like the CommPortIdentifier static initializer loads RXTXCommDriver, and then calls RXTXDriver.initialize. But then CommPortIdentifier.getPortIdentifiers does the exact same thing. So that's where the two scans are coming from. I would guess that one or the other can be removed? Probably the one in the CommPortIdentifier.getPortIdentifiers? Doing so removes the 2nd scan. Pete PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) val = System.getProperty("gnu.io.SerialPorts"); Shouldn't the comparison be != null? getProperty returns null if the variable is NOT found, and you only want to assign to val if it IS found, right? Same thing for the parallel port case. End result is the same I guess, since you check for null later, but probably should be fixed. From eddythejekyll at gmail.com Mon Aug 14 11:55:17 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 11:55:17 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: When I try to get the mode with int mode = pPort.getMode(); it returns 0 which isn't any of the valid modes. I tried setting it explicitely with pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced the requested mode in nativeSetSerialPortParams at gnu.io.LPRPort.setLPRMode(Native Method) at gnu.io.LPRPort.setMode(LPRPort.java:87) Except for LPT_MODE_ANY, but the getMode call still failed out with an invalid state. I'm wondering if it's because I don't have the line pulled high like you said. This isn't a printer connected. It's a relay board with pins 2-9 tied to data, and 18-25 to gnd. The rest are open. I looked at a DB25 pinout diagram and I'm not sure which pin I need to tie high, and I looked through the archives, but didn't find a reference to something definitive. Can someone help me with which pin is the "online" pin as Trent mentioned? DB25 spec has ( I hope this formats correctly in this email) BUSY (11), SEL (13) or INIT (16) are candidates, but I'm guessing. Any clues? *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Thanks, Ed On 8/12/06, Trent Jarvi wrote: > > > Remember that the lp code expects a printer - or something like it. There > is a line that specifies the printer is online. If you are doing hobby > work, you will need to raise that line or loop it back to something that > is raised. > > If you just try reading a port with no device connected and online, there > will be an error while trying to read. This should be addressed in the > mail-list archives. > > On Sat, 12 Aug 2006, Ed wrote: > > > Trent, > > Right after I sent the results indicated below I re-ran the app and it > > apparently found the parallel port. The difference was that I set the > > permissions to : > > /dev: > > wildcard lp* > > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > > > I'm still not sure how to interpret the dmesg and lsmod before. However > I'm > > thinking that since the user now has permission to access the lp* port, > a > > request to access it loaded the lp and parport modules automatically and > > allowed me access. Here's the output of lsmod now: > > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > > lp 5540 0 (autoclean) > > parport 21608 1 (autoclean) [parport_pc lp] > > > > and dmesg: > > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > > On node 0 totalpages: 161776 > > lp0: using parport0 (polling). > > > > So I think I'm good, and ready to move on the next steps. > > > > Thanks Trent! > > > > Ed > > > > > > On 8/12/06, Ed wrote: > >> > >> Thanks for the reply Trent. > >> > >> I'm on a different system today but am trying your suggestons. This is > a > >> debian 3.1r2 system and I'm running jdk 1.5.0_04. > >> > >> Take a look below, but I think I have no parallel port support on this > >> kernel, however I never get the "No such device or address" return from > the > >> cat call as you did so I'm not sure how to interpret the results. > >> > >> When I run the test program (PortChooser.java), the getPortIdentifiers > >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this > is > >> more than I found on the RedHat system. Incidently --disable-lockfiles > has > >> no effect. > >> > >> It looks as though there is no parallel support in this kernel: > >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > >> On node 0 totalpages: 161776 > >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > >> > >> I'm a little confused by the results when I cat to the lp0 device. It > >> seems from the dmesg output that I don't have parallel printer support, > but > >> when I cat to the lp0 device, I get permission denied if I'm non-root > user > >> and input/output error if I'm root. Apparently this means I have the > >> device, > >> but no support in the kernel? > >> > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> > >> cat: /dev/lp0: Permission denied > >> ed at falcon:~/src/workspace/EASServer/src$ su > >> Password: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> > >> Here's my lp* device permissions. > >> /dev: > >> wildcard lp* > >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> If I change it to > >> /dev: > >> wildcard lp* > >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> I get: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> falcon:/home/ed/src/workspace/EASServer/src# exit > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> ed at falcon:~/src/workspace/EASServer/src$ > >> > >> What do you think? Should I recompile the kernel or is it something > else? > >> > >> By the way, I added the user ed to the lp and uucp groups on this > system. > >> > >> Thanks again, > >> > >> Ed > >> > >> On 8/11/06, Trent Jarvi wrote: > >> > > >> > On Fri, 11 Aug 2006, Ed wrote: > >> > > >> > > I'm trying to read and write a parallel port on a standard (Dell) > pc > >> > running > >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > >> > gates. > >> > > > >> > > I'm having problems getting rxtx to return a port enumeration from > >> > > getPortIdentifiers. I'm using a file > >> > > PortChooser.java as a test file to get things going. This is from > the > >> > Java > >> > > CookBook 2nd edition (Chapter 12). The call > >> > > > >> > > // get list of ports available on this particular computer, > >> > > // by calling static method in CommPortIdentifier. > >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > >> > > > >> > > returns a null pList; > >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I > configure > >> > and > >> > > compile without --disable-lockfiles I get: > >> > > > >> > > Stable Library > >> > > ========================================= > >> > > Native lib Version = RXTX-2.1-7 > >> > > Java lib Version = RXTX-2.1-7 > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > ... > >> > > > >> > > When I compile with --disable-lockfiles the call to > getPortIdentifiers > >> > > >> > > simply returns a null Enumeration. > >> > > > >> > > I've read the documention and threads about this issue and I feel > like > >> > I've > >> > > tried everything, so at the moment I'm stumped. > >> > > > >> > > I can supply any further info that may help. > >> > > > >> > > Thanks in advance. > >> > > > >> > > Ed > >> > > > >> > > >> > Hi Ed > >> > > >> > You may want to check the permissions of /dev/lp*. Also make sure lp > or > >> > your kernel support for lp is loaded. It should show up in dmesg and > >> > lsmod. > >> > > >> > For my laptop with no printer port enabled in BIOS is see: > >> > > >> > lp: driver loaded but no devices found > >> > > >> > in desg |grep lp > >> > > >> > [] $ ls -l /dev/lp* > >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > here root and group lp can read and write. Normal users cannot. > >> > > >> > Try a simple read as a user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: Permission denied > >> > > >> > Fix as root > >> > > >> > [] chmod 666 /dev/lp* > >> > [] $ ls -l /dev/lp* > >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > Now as user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: No such device or address > >> > > >> > So this is saying there is no lp0 on my laptop. > >> > > >> > -- > >> > Trent Jarvi > >> > tjarvi at qbang.org > >> > > >> > >> > >> > >> -- > >> > >> Ed > >> > > > > > > > > > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/59164078/attachment-0318.html From eddythejekyll at gmail.com Mon Aug 14 14:19:58 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 14:19:58 -0600 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? Message-ID: I'm using the ParallelPort class to drive a relay board. According to Mr. Jarvi, since this board isn't a printer, there will be a read error unless I hold the "printer online" line high in order to make the API think I'm talking to a printer. The problem is, I can't figure out which line is the "printer online". My DB25 spec lists the following: *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Anyone know which one I should tie high? I tried the busy line and it still errored out on the read. Thanks in advance, -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/66cf3c3e/attachment-0318.html From tjarvi at qbang.org Mon Aug 14 18:06:29 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:06:29 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Mon, 14 Aug 2006, Ed wrote: > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > which isn't any of the valid modes. I tried setting it explicitely with > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced > the requested mode in nativeSetSerialPortParams > at gnu.io.LPRPort.setLPRMode(Native Method) > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > invalid state. This is because rxtx only supports the basics. JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } One could program in more support. When I did that I just had a daisy wheel printer to test with and doing any more would have been blind. So that behavior is expected. I'll look to see if the Parallel Complete book mentions which pins you need to raise. If you look in the source code [ParallelImp.c] you can see this code isn't well tested. It has worked for hobby use in the past as I'd guess you are trying to do. But my experience with the code is as is mentioned in the top of the source: /* fear he who enter here. It appears that things have changed. An attempt has been made to put things the way the should be. It compiles and ParallelBlackBox runs. No further guarantees. Well... One.. it will print "Hello World!" on an epson DX 10 printer. you know.. the 10 character per second daisy wheel printer ;) - Trent Jarvi */ That comment is from 1997 or so. Since then some windows support was contributed but it is still very green code. We get about four requests for parallel support a year so its just not a well traveled area. It would be nice to have some documentation for the people trying to hook parallel ports to electronic projects. That appears to be the exclusive use of the Parallel support. The wiki pages are intended to let people share information like this to help each other in their projects as they figure out the details. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Aug 14 18:40:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:40:40 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: > PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): > > if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) > val = System.getProperty("gnu.io.SerialPorts"); > > Shouldn't the comparison be != null? getProperty returns null if the > variable is NOT found, and you only want to assign to val if it IS > found, right? Same thing for the > parallel port case. End result is the same I guess, since you check > for null later, > but probably should be fixed. I think this is just a fallback to the second property. gnu.io.SerialPorts isn't documented but perhaps it is used. It should behave properly as documented in INSTALL. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 14 18:56:55 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 19:56:55 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: <44E11BD7.5030102@gmail.com> Trent Jarvi wrote: >> PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): >> >> if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) >> val = System.getProperty("gnu.io.SerialPorts"); >> > > I think this is just a fallback to the second property. > gnu.io.SerialPorts isn't documented but perhaps it is used. It should > behave properly as documented in INSTALL. Doh - yup, I missed the fact that the property names were different... Pete From berkland at spamcop.net Mon Aug 14 19:58:21 2006 From: berkland at spamcop.net (Doug Berkland) Date: Mon, 14 Aug 2006 21:58:21 -0400 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? In-Reply-To: References: Message-ID: <269e40090608141858g698c2579v8d962deca3f4df53@mail.gmail.com> Based on memory and this page as confirmation, I would say pin 13 is the "Online" pin for SPP (standard parallel port). http://www.quatech.com/support/comm-over-parallel.php On 8/14/06, Ed wrote: > > I'm using the ParallelPort class to drive a relay board. According to Mr. > Jarvi, since this board isn't a printer, there will be a read error unless I > hold the "printer online" line high in order to make the API think I'm > talking to a printer. The problem is, I can't figure out which line is the > "printer online". My DB25 spec lists the following: > > *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and > Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data > Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 > D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select > 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select > In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit > 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 > Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and > Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground > > Anyone know which one I should tie high? I tried the busy line and it > still errored out on the read. > > Thanks in advance, > > -- > Ed > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/842bb770/attachment-0318.html From eddythejekyll at gmail.com Mon Aug 14 20:25:42 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 20:25:42 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Ah, I see. I've seen the caveats about limited Parallel support, but I thought it was mainly about the javax.comm package. The gnu.io is derived from javax.comm package right? That is, is the parallel support in rxtx is a superset of what's in javax.comm? I'm using this not for hobby usage, but for some simple instrumenation and control. If the project mandates it, I'll gladly work on extending the support. In the meantime, I need to get some sanity checks working, and repair my relay board (I smoked the ULN2803 chip, apparently by tying the BUSY (pin 11) to vcc). I guess I'll try the SEL pin next (and a supply of 2803s) with a ~1K pullup. The caveat in the comment block isn't very encouraging (!), but I borrowed an old Epson Stylus Color 600 printer to see what I can do. If I can write out characters to it I'll be happy. Parallel printers aren't easy to find these days. I haven't yet looked at the native source, yet, but I've just imported it into eclipse and I'll surf around a bit. Ed On 8/14/06, Trent Jarvi wrote: > > On Mon, 14 Aug 2006, Ed wrote: > > > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > > which isn't any of the valid modes. I tried setting it explicitely with > > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to > proced > > the requested mode in nativeSetSerialPortParams > > at gnu.io.LPRPort.setLPRMode(Native Method) > > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > > invalid state. > > This is because rxtx only supports the basics. > > JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > jclass jclazz, jint mode) > { > switch(mode) > { > case LPT_MODE_ANY: > break; > case LPT_MODE_SPP: > case LPT_MODE_PS2: > case LPT_MODE_EPP: > case LPT_MODE_ECP: > case LPT_MODE_NIBBLE: > default: > throw_java_exception( env, > UNSUPPORTED_COMM_OPERATION, > "nativeSetSerialPortParams", > "setLPRMode was unable to proced the > requested \ > mode" > ); > } > return(JNI_TRUE); > } > > One could program in more support. When I did that I just had a daisy > wheel printer to test with and doing any more would have been blind. > > So that behavior is expected. I'll look to see if the Parallel Complete > book mentions which pins you need to raise. If you look in the source > code [ParallelImp.c] you can see this code isn't well tested. It has > worked for hobby use in the past as I'd guess you are trying to do. But > my experience with the code is as is mentioned in the top of the source: > > /* > fear he who enter here. It appears that things have changed. An > attempt > has been made to put things the way the should be. > > It compiles and ParallelBlackBox runs. No further guarantees. > > Well... One.. it will print "Hello World!" on an epson DX 10 > printer. > you know.. the 10 character per second daisy wheel printer ;) > > - Trent Jarvi > */ > > That comment is from 1997 or so. > > Since then some windows support was contributed but it is still very green > code. We get about four requests for parallel support a year so its just > not a well traveled area. > > It would be nice to have some documentation for the people trying to hook > parallel ports to electronic projects. That appears to be the exclusive > use of the Parallel support. The wiki pages are intended to let people > share information like this to help each other in their projects as they > figure out the details. > > -- > Trent Jarvi > tjarvi at qbang.org > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/fbb5ddb4/attachment-0318.html From lyon at docjava.com Tue Aug 15 06:06:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 15 Aug 2006 08:06:27 -0400 Subject: [Rxtx] smoking is bad for your health In-Reply-To: References: Message-ID: Hi All, If you are connecting to the parallel port and smoking chips, it is time for extra stuff to buffer the parallel port. You may be want more current, in which case driver transistors are needed, or, if you are using the port as an output only device, you may like to add your own bus transceiver (e.g., 74245), set for output. Do be careful to design this properly; http://www.beyondlogic.org/spp/parallel.htm Some people like to use Octal D-type F.F's with OC outputs, like a 74374, http://upgrade.cntc.ac.kr/data/ttl/74374.html I like this one, as it has the D FF's and can latch the outputs for presentation to slower electronics (like relays). But careful! A relay that needs more current than the family of the device you have selected will look like a short to ground, and you will smoke your bug! And MOBO's do NOT come with the ability to drive any load you like. Check the power specs on your relay and be sure to protect the chip against back EMF with a diode. It is best to smoke test this on a bread board BEFORE hooking it to the computer. And be sure you smoke test the corner points in the ckt for a while, lest it fail in the field. - Doug >Ah, I see. I've seen the caveats about limited >Parallel support, but I thought it was mainly >about the javax.comm package. The >gnu.io is derived from javax.comm >package right? That is, is the parallel support >in rxtx is a superset of what's in javax.comm? > >I'm using this not for hobby usage, but for some >simple instrumenation and control. If the >project mandates it, I'll gladly work on >extending the support. In the meantime, I need >to get some sanity checks working, and repair my >relay board (I smoked the ULN2803 chip, >apparently by tying the BUSY (pin 11) to vcc). I >guess I'll try the SEL pin next (and a supply of >2803s) with a ~1K pullup. > >The caveat in the comment block isn't very >encouraging (!), ?but?I borrowed an old Epson >Stylus Color 600 printer to see what I can do. >?If I can write out characters to it I'll be >happy. Parallel printers aren't easy to find >these days. > > I haven't yet looked at the native source, yet, >but I've just imported it into eclipse and I'll >surf around a bit. > >Ed > >On 8/14/06, Trent Jarvi <tjarvi at qbang.org> wrote: > >On Mon, 14 Aug 2006, Ed wrote: > >> When I try to get the mode with int mode = pPort.getMode(); it returns 0 >> which isn't any of the valid modes. I tried setting it explicitely with >> pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with >> >> gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced >> the requested mode in nativeSetSerialPortParams >> at gnu.io.LPRPort.setLPRMode(Native Method) >> at gnu.io.LPRPort.setMode(LPRPort.java:87) >> >> Except for LPT_MODE_ANY, but the getMode call still failed out with an >> invalid state. > >This is because rxtx only supports the basics. > >JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > ???????jclass jclazz, jint mode) >{ > ???????switch(mode) > ???????{ > ???????????????case LPT_MODE_ANY: > ???????????????????????break; > ???????????????case LPT_MODE_SPP: > ???????????????case LPT_MODE_PS2: > ???????????????case LPT_MODE_EPP: > ???????????????case LPT_MODE_ECP: > ???????????????case LPT_MODE_NIBBLE: > ???????????????default: > ???????????????????????throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, > ???????????????????????????????"nativeSetSerialPortParams", > ???????????????????????????????"setLPRMode was >unable to proced the requested \ > ???????????????????????????????mode" > ???????????????????????); > ???????} > ???????return(JNI_TRUE); >} > >One could program in more support.??When I did that I just had a daisy >wheel printer to test with and doing any more would have been blind. > >So that behavior is expected.??I'll look to see if the Parallel Complete >book mentions which pins you need to raise.??If you look in the source >code [ParallelImp.c] you can see this code isn't well tested.??It has >worked for hobby use in the past as I'd guess you are trying to do.??But >my experience with the code is as is mentioned in the top of the source: > >/* > fear he who enter here.??It appears that things have changed.??An attempt > has been made to put things the way the should be. > > ???????It compiles and ParallelBlackBox runs.??No further guarantees. > > ???????Well... One.. it will print "Hello World!" on an epson DX 10 printer. > ???????you know.. the 10 character per second daisy wheel printer ;) > > ???????- Trent Jarvi >*/ > >That comment is from 1997 or so. > >Since then some windows support was contributed but it is still very green >code.??We get about four requests for parallel support a year so its just >not a well traveled area. > >It would be nice to have some documentation for the people trying to hook >parallel ports to electronic projects.??That appears to be the exclusive >use of the Parallel support.??The wiki pages are intended to let people >share information like this to help each other in their projects as they >figure out the details. > >-- >Trent Jarvi >tjarvi at qbang.org > > > > >-- >Ed > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 15 13:26:16 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 15 Aug 2006 14:26:16 -0500 Subject: [Rxtx] crash with too much memory Message-ID: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded from qbang.org. I'm exercising the RXTX COMM serial interface, both in a small standalone test and with the same code pulled into a large OSGI framework setup. If I use the stock .jar/.dll's, then everything works correctly in both situations. I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 (mingw-special)). If I use my locally built version, then my small test case works just fine, both when run inside Eclipse and when run standalone on the command line. However, when I try and use my locally built .jar/.dll's in the large framework environment, then I get a JVM crash with the attached log. Normally this would lead me to think that I was running out of memory or something in the large environment, and when I try and play with the JVM memory args, some interesting things show up. In our large environment, we have -Xms32M/-Xmx1024M - this appears to be the problem. If I set max to something like 64M, then things work. The cross over point from working to failing seems to be around 32M/110M (works) and 32M/111M (fails). But 128M/128M works while 128M/129M fails. So it seems to have to do with how much memory is actually available, or something like that. The thing that occurs to me is if my GCC is somehow generating something like "near" calls. But when the JVM has a lot of RAM available, it puts the DLL up somehwere in the address space and then the near calls fail - far calls are needed. So, I'm thinking this is probably a difference in the MinGW GCC I'm using and the one that was used to build the stock binaries from qbang, or maybe some command line args were changed? So, I'm hoping someone will have an idea of what's going on here... Thanks, Pete From tjarvi at qbang.org Tue Aug 15 18:54:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 15 Aug 2006 18:54:04 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: On Tue, 15 Aug 2006, Pete Flugstad wrote: > I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded > from qbang.org. > > I'm exercising the RXTX COMM serial interface, both in a small > standalone test and with the same code pulled into a large OSGI > framework setup. > > If I use the stock .jar/.dll's, then everything works correctly in > both situations. > > I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 > (mingw-special)). > > If I use my locally built version, then my small test case works just > fine, both when run inside Eclipse and when run standalone on the > command line. However, when I try and use my locally built > .jar/.dll's in the large framework environment, then I get a JVM crash > with the attached log. > > Normally this would lead me to think that I was running out of memory > or something in the large environment, and when I try and play with > the JVM memory args, some interesting things show up. > > In our large environment, we have -Xms32M/-Xmx1024M - this appears to > be the problem. If I set max to something like 64M, then things work. > The cross over point from working to failing seems to be around > 32M/110M (works) and 32M/111M (fails). > But 128M/128M works while 128M/129M fails. So it seems to have to do > with how much memory is actually available, or something like that. > > The thing that occurs to me is if my GCC is somehow generating > something like "near" calls. But when the JVM has a lot of RAM > available, it puts the DLL up somehwere in the address space and then > the near calls fail - far calls are needed. > > So, I'm thinking this is probably a difference in the MinGW GCC I'm > using and the one that was used to build the stock binaries from > qbang, or maybe some command line args were changed? > > So, I'm hoping someone will have an idea of what's going on here... > Hi Pete The binaries are from the src. They should be reproducable. I did extensive testing of rxtx several years ago using mingw as the compiler. The version was 2.95. I have not changed versions since. There are way too many variables as it is. I have a linux->mingw cross compiler rpm I use for all windows use. If you want a copy of it you can have it. It isn't anything 'special' :) -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Thu Aug 17 11:49:24 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 17 Aug 2006 12:49:24 -0500 Subject: [Rxtx] crash with too much memory In-Reply-To: References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> On 8/15/06, Trent Jarvi wrote: > I did extensive testing of rxtx several years ago using mingw as the > compiler. The version was 2.95. I have not changed versions since. > There are way too many variables as it is. FYI, I believe I've solved this problem by changing how the dll's were built. The original mingw makefile was generating Serial.def, then performing various operations with dlltool and ld. I modified the makefile to create the dll using this page: as a guide. With that, there's no longer any need to deal with Serial.def and the makefile becomes _much_ simpler. This appears to have addressed my problems with crashing. FWIW, GCC 2.95 is _really_ old - you should consider investigating upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is supposed to generate a native binary (i.e. just like MinGW). Thanks, Pete From claretlc at yahoo.com Thu Aug 17 12:34:48 2006 From: claretlc at yahoo.com (Clare Cooley) Date: Thu, 17 Aug 2006 11:34:48 -0700 (PDT) Subject: [Rxtx] parallel port communication Message-ID: <20060817183448.76911.qmail@web53908.mail.yahoo.com> Hi, I'm trying to write a 1 to a bit 15 on a parallel port cable that isn't attached to a printer.(It's a control box for eye-tracking equipment.)I need to do this in Java. I looked at the javax.comm documentation, and it said, "Application programs should not directly create ParallelPortEvent objects." So is there a way to do this with your package? If not, do you have any suggestions of where to look? It really needs to be done in Java. Thanks, Clare Cooley __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From pat at xvalheru.org Thu Aug 17 13:13:52 2006 From: pat at xvalheru.org (pat) Date: Thu, 17 Aug 2006 21:13:52 +0200 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060817190751.M5586@xvalheru.org> Hi there, I've question(s) for you. I need to communicate with scale, I've used the Sun's direver. Now I've switched to Rxtx and the speed of the communication is perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, but the difference between the crash time is 5 second ... . My question is: Is there a stable driver ??? Or what I have to do to have stable enough serial port driver ??? OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. Thanks to all for the help. Pat From tjarvi at qbang.org Fri Aug 18 05:13:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 05:13:42 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> Message-ID: On Thu, 17 Aug 2006, Pete Flugstad wrote: > On 8/15/06, Trent Jarvi wrote: >> I did extensive testing of rxtx several years ago using mingw as the >> compiler. The version was 2.95. I have not changed versions since. >> There are way too many variables as it is. > > FWIW, GCC 2.95 is _really_ old - you should consider investigating > upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is > supposed to generate a native binary (i.e. just like MinGW). > It is really old but also well known like C itself. I have considered upgrading. The ToyBox builds should be gcc 3* cross-compiled. I'm not going to be validating gcc 3* w32 binaries though. It's looking like we will need to focus support on MSFT's toolchain for 64 bit windows support until it is possible for gcc to support w64. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Aug 18 05:32:10 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 07:32:10 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: Hi All, Does anyone know how to produce mac intel binaries on a Fedora Linux box? Thanks! - Doug From tjarvi at qbang.org Fri Aug 18 06:42:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 06:42:05 -0600 (MDT) Subject: [Rxtx] cross compilation for the mac In-Reply-To: References: Message-ID: On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Does anyone know how to produce > mac intel binaries on a Fedora Linux > box? > > Thanks! > - Doug Hi Doug You need to build the cross toolchain which means copying the Darwin/Mac binaries over to fedora. It would be nontrivial but possible. Do the Darwin libraries work with Mac in general? I'm not aware of the licensing issues associated with grabbing Mac binaries. Same with OpenSolaris/Solaris. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Aug 18 08:15:26 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 10:15:26 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> In theory building against Darwin would be sufficient to getting things working on MacOS X. You need to remember that Darwin is the low-level OS, while MacOS X adds the everything else on top. IOKit, which is the I/O API, is available as part of Darwin. The only thing you will need extra are the Java libraries. One thing is that I would recommend that when producing binaries for the Mac, is to ensure they are Universal binaries (PPC+Intel). Andre > > From: Trent Jarvi > Date: 2006/08/18 Fri AM 08:42:05 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] cross compilation for the mac > > On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > > > Hi All, > > Does anyone know how to produce > > mac intel binaries on a Fedora Linux > > box? > > > > Thanks! > > - Doug > > Hi Doug > > You need to build the cross toolchain which means copying the Darwin/Mac > binaries over to fedora. It would be nontrivial but possible. > > Do the Darwin libraries work with Mac in general? I'm not aware of the > licensing issues associated with grabbing Mac binaries. > > Same with OpenSolaris/Solaris. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Aug 18 13:43:16 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 15:43:16 -0400 Subject: [Rxtx] cross compilation for the mac In-Reply-To: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: >In theory building against Darwin would be sufficient to getting >things working on MacOS X. You need to remember that Darwin is the >low-level OS, while MacOS X adds the everything else on top. IOKit, >which is the I/O API, is available as part of Darwin. The only thing >you will need extra are the Java libraries. > >One thing is that I would recommend that when producing binaries for >the Mac, is to ensure they are Universal binaries (PPC+Intel). > >Andre I find the xcode ide for generating a mix of universal binaries and java very difficult to make work. Is there a way to do this with make files? Thanks! - Doug From ajmas at sympatico.ca Fri Aug 18 13:54:55 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 15:54:55 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818195455.PGAP29052.tomts13-srv.bellnexxia.net@smtp1.sympatico.ca> It should be doable. XCode hands off the compilation process to gcc et al, for the compilation of C/C++ code and to javac et al. for the Java side. While ant is the favoured tool for 'automated' Java compilation, make can easily be used. All is needed is someone to volounteer to do the work. Andre "Dr. Douglas Lyon" wrote > > >In theory building against Darwin would be sufficient to getting > >things working on MacOS X. You need to remember that Darwin is the > >low-level OS, while MacOS X adds the everything else on top. IOKit, > >which is the I/O API, is available as part of Darwin. The only thing > >you will need extra are the Java libraries. > > > >One thing is that I would recommend that when producing binaries for > >the Mac, is to ensure they are Universal binaries (PPC+Intel). > > > >Andre > > I find the xcode ide for generating a mix of universal binaries > and java very difficult to make work. Is there a way to do this > with make files? > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Fri Aug 18 16:34:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 16:34:46 -0600 (MDT) Subject: [Rxtx] serial driver newbe question and problem In-Reply-To: <20060817190751.M5586@xvalheru.org> References: <20060817190751.M5586@xvalheru.org> Message-ID: On Thu, 17 Aug 2006, pat wrote: > Hi there, > > I've question(s) for you. I need to communicate with scale, I've used the > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > but the difference between the crash time is 5 second ... . > > My question is: Is there a stable driver ??? Or what I have to do to have > stable enough serial port driver ??? > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > Thanks to all for the help. > > Pat > Could you describe the hardware you have, the version of rxtx and provide the log of the crash? Did you download binaries? I've not been seeing a jvm crash with rxtx -- Trent Jarvi tjarvi at qbang.org From lunareclipse03 at web.de Sat Aug 19 12:11:48 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 19 Aug 2006 20:11:48 +0200 Subject: [Rxtx] Problem solved! Message-ID: <920065539@web.de> Hi everybody, I posted some months ago and asked about some help on my very special problem concerning my win32 port of a communications library. Now I just want to inform you that no further "mindstorming" is needed because I solved the problem by completely rewriting the win32 port of the library. Now everything works fine. Thank you all for your time and patience. --Sven Ahlemann __________________________________________________________________________ Erweitern Sie FreeMail zu einem noch leistungsst?rkeren E-Mail-Postfach! Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131 From ajmas at sympatico.ca Mon Aug 21 09:58:23 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 21 Aug 2006 11:58:23 -0400 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060821155823.TLSM18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Next time that happens, including a copy of the crash log, produced by Windows could probably help too. Andre Trent Jarvi wrote: > > On Thu, 17 Aug 2006, pat wrote: > > > Hi there, > > > > I've question(s) for you. I need to communicate with scale, I've used the > > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > > but the difference between the crash time is 5 second ... . > > > > My question is: Is there a stable driver ??? Or what I have to do to have > > stable enough serial port driver ??? > > > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > > > Thanks to all for the help. > > > > Pat > > > > Could you describe the hardware you have, the version of rxtx and > provide the log of the crash? Did you download binaries? > > I've not been seeing a jvm crash with rxtx > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From adrian.l.parker at gmail.com Thu Aug 24 09:10:39 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Thu, 24 Aug 2006 11:10:39 -0400 Subject: [Rxtx] Portability issues Message-ID: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use RXTX 2.0? Does it provide system librairies that javax.comm does not? I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, or 2000, or server 2003). Can this be done with a single implementation of RXTX? I don't want to have different versions of Java code that have different package names. References: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Message-ID: On Thu, 24 Aug 2006, Adrian Parker wrote: > Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use > RXTX 2.0? Does it provide system librairies that javax.comm does not? > > I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's > OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, > or 2000, or server 2003). Can this be done with a single implementation of > RXTX? I don't want to have different versions of Java code that have > different package names. > Hi Adrian. The native code can support all of the platforms you mention. I've never compiled for unixware or openunix but the patches are in the code. So you would need to compile for that target. >From there you would probably be best off going with rxtx 2.1 so you have all the classes in one package. You can opt to use rxtx 2.0 with Sun's commapi for Solaris v 2. The main differences are rxtx 2.1 comes with all the source/classes and is in package gnu.io while Sun's requires rxtx for some platforms but is in package javax.comm. The low level code is the same in either case as far as rxtx is concerned. -- Trent Jarvi tarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 04:12:52 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 06:12:52 -0400 Subject: [Rxtx] Serial.addEventListener bug? Message-ID: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on OpenServer 5.0.7). Its what Sun packages. I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an exception. It seems to throw the exception if no listener was previously declared (although I've not had chance to verify). Is this desireable behaviour? Sun's original API doesn't mention anything about an exception on this function, http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) Of course this is an old version of RXTX, so perhaps this has been changed. -- Adrian Parker Simulation Software Developer DLCSPM 4-4-3 (c) Building A31, CFB Kingston Tel: (613) 541-5010 x3020 CSN: 271-3020 Email: parker at lsec.dnd.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/22e2ea57/attachment-0308.html From tjarvi at qbang.org Fri Aug 25 05:15:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 25 Aug 2006 05:15:44 -0600 (MDT) Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: On Fri, 25 Aug 2006, Adrian Parker wrote: > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > OpenServer 5.0.7). Its what Sun packages. > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > exception. It seems to throw the exception if no listener was previously > declared (although I've not had chance to verify). > > Is this desireable behaviour? Sun's original API doesn't mention anything > about an exception on this function, > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > Of course this is an old version of RXTX, so perhaps this has been changed. > > > What exception was thrown? You can replace 1.4-8 with 2.0 for testing purposes. They are the same package. I doubt Sun shipped or packaged that. I think Caldera/SCOx/... did at one point. There may still be updates on their pages. I recall them sending patches here which are in current rxtx. -- Trent Jarvi tjarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 05:28:32 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 07:28:32 -0400 Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: <7da71e910608250428q32b86632g9a67b1b4efe69830@mail.gmail.com> On 8/25/06, Trent Jarvi wrote: > > On Fri, 25 Aug 2006, Adrian Parker wrote: > > > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > > OpenServer 5.0.7). Its what Sun packages. > > > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > > exception. It seems to throw the exception if no listener was > previously > > declared (although I've not had chance to verify). > > > > Is this desireable behaviour? Sun's original API doesn't mention > anything > > about an exception on this function, > > > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > > > Of course this is an old version of RXTX, so perhaps this has been > changed. > > > > > > > > What exception was thrown? Its weird. I catch an Exception. But when on that exception I call getClass().getName() I end up with a NullPointerException. You can replace 1.4-8 with 2.0 for testing > purposes. They are the same package. > > I doubt Sun shipped or packaged that. Doh! I meant to say SCO sorry. I was surfing Sun's site when I wrote that :) Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/e43aed3a/attachment-0308.html From sjudd at seas.upenn.edu Sat Aug 26 16:42:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Sat, 26 Aug 2006 18:42:09 -0400 Subject: [Rxtx] Mac commapi Message-ID: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? If so, where do I get it? Sun has various versions at http://www.sun.com/download/products.xml?id=43208d3d but they are for SolarisSparc, SolarisX86, Linux, and Generic. Do I use the Generic one? If so, read on; otherwise redirect me. While using the Generic version, my attempt to run the BlackBox sample program elicits a message saying it "can't find javax.comm.properties". I found a note in the rxtx.org HowTo (for Linux) saying to create this thing in /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties but where should it go on the Mac? After reading many versions of documentation around, and updates and revisions and re-authorings, I have worked my way into a state of confusion and high uncertainty. Please release me. sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060826/02d6b163/attachment-0278.html From tod at todbot.com Sat Aug 26 17:08:33 2006 From: tod at todbot.com (Tod E. Kurt) Date: Sat, 26 Aug 2006 16:08:33 -0700 Subject: [Rxtx] Mac commapi In-Reply-To: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Message-ID: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> You don't need Sun's CommAPI. You just need RXTX. Once you download RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and the native library is ("librxtxSerial.jnilib" on Mac OS X) via the standard methods. For instance, if you've placed those two files in a directory called 'rxtxlib' and you want to run a Java class called HelloWorld in the current directory, do the following: % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar HelloWorld On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? > If so, where do I get it? Sun has various versions at > http://www.sun.com/download/products.xml?id=43208d3d > but they are for SolarisSparc, SolarisX86, Linux, and Generic. > Do I use the Generic one? > If so, read on; otherwise redirect me. > > While using the Generic version, my attempt to run the BlackBox > sample program > elicits a message saying it "can't find javax.comm.properties". > I found a note in the rxtx.org HowTo (for Linux) saying to create > this thing in > /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties > but where should it go on the Mac? > > After reading many versions of documentation around, and updates > and revisions > and re-authorings, I have worked my way into a state of confusion > and high > uncertainty. Please release me. > > sj > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From sjudd at seas.upenn.edu Sun Aug 27 22:55:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Mon, 28 Aug 2006 00:55:09 -0400 Subject: [Rxtx] Mac commapi In-Reply-To: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> Message-ID: This was immensely helpful. Thank you, Tod. I wish it had been explicit somewhere in the documentation; it would have saved me 2 days of grief. One hugely valuable thing like this little set of instructions is that it implicitly lists all the hundreds of things you DON"T have to do. I know it seems obvious to those in the know, but every little bit of help on an arcane topic like this opens up the product to an exponentially wider group of dilettantes. I managed to get the SerialDemo program (from Sun) to work too. Hurrah! However, it required changing all the javax.comm references to gnu.io which I had heard of due to all my rambling readings. Is there not a demo program on rxtx.org already available that would not have needed this? BTW, the link on the Projects page for jPIC[Source] sends a *.hex file to a PIC 16F877 or similar chip... takes me to nowhere useful. I do not understand what the name "Toybox" is meant to imply. Thanks, sj On 2006 Aug 26, at 7:08 PM, Tod E. Kurt wrote: > You don't need Sun's CommAPI. You just need RXTX. Once you download > RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and > the native library is ("librxtxSerial.jnilib" on Mac OS X) via the > standard methods. > > For instance, if you've placed those two files in a directory called > 'rxtxlib' and you want to run a Java class called HelloWorld in the > current directory, do the following: > > % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar > HelloWorld > > > On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > >> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? >> If so, where do I get it? Sun has various versions at >> http://www.sun.com/download/products.xml?id=43208d3d >> but they are for SolarisSparc, SolarisX86, Linux, and Generic. >> Do I use the Generic one? >> If so, read on; otherwise redirect me. >> >> While using the Generic version, my attempt to run the BlackBox >> sample program >> elicits a message saying it "can't find javax.comm.properties". >> I found a note in the rxtx.org HowTo (for Linux) saying to create >> this thing in >> /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties >> but where should it go on the Mac? >> >> After reading many versions of documentation around, and updates >> and revisions and re-authorings, I have worked my way into a state >> of confusion and high uncertainty. Please release me. >> >> sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060827/b80d6389/attachment-0278.html From pete.flugstad at gmail.com Mon Aug 28 12:38:27 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 13:38:27 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE Message-ID: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Okay, my understanding is that originally, RTS meant "Request to Send" - the DTE (the PC) would assert this and the DCE (modem) would assert "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send data. This really only provided uni-directional flow control, from the PC to the modem. Now, as I understand it, the more modern usage of RTS is that it is used for the DTE to assert flow control back to the DCE - basically it means "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) raises this, then the DCE(modem) is free to send data to the DTE - this allows the DTE(PC) to exert flow control back towards the DCE(modem). This discussion is based on the Serial HOWTO from: and lots of other reading... Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which is defined as: > Enables RTS flow-control handshaking. The driver raises the RTS line, > enabling the DCE to send, when the input buffer has enough room to > receive data. The driver lowers the RTS line, preventing the DCE to > send, when the input buffer does not have enough room to receive > data. If this value is used, it is an error for the application to adjust > the line with EscapeCommFunction. which clearly reflects the newer usage style - it keeps the RTS line high as long as there is space to _receive_ data. And takes it low when the receive/input buffer is getting full to stop the modem from sending it data. Does this jive with other peoples understanding of RTS usage? Unfortunately, the hardware I'm trying to talk to wants to use the OLD style of RTS line usage. An existing Windows C++ program uses RTS_CONTROL_TOGGLE, which documentation states: > Specifies that the RTS line will be high if bytes are available for transmission. > After all buffered bytes have been sent, the RTS line will be low. If this value is > set, it would be an error for an application to adjust the line with > EscapeCommFunction. This value is ignored in Windows 95; it causes the > driver to act as if RTS_CONTROL_ENABLE were specified. This seems to be the OLD RTS behavior, right? So, what I seem to need is to be able to control the RTS line, either using TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS when getting ready to TX and clear it when the output buffer is empty). Does this make sense, or am I off in the weeds? Thanks, Pete From tjarvi at qbang.org Mon Aug 28 18:21:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 28 Aug 2006 18:21:10 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: On Mon, 28 Aug 2006, Pete Flugstad wrote: > Okay, my understanding is that originally, RTS meant "Request to Send" > - the DTE (the PC) would assert this and the DCE (modem) would assert > "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send > data. This really only provided uni-directional flow control, from the PC to > the modem. > > Now, as I understand it, the more modern usage of RTS is that it is used > for the DTE to assert flow control back to the DCE - basically it means > "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) > raises this, then the DCE(modem) is free to send data to the DTE - this > allows the DTE(PC) to exert flow control back towards the DCE(modem). > > This discussion is based on the Serial HOWTO from: > > > > and lots of other reading... > > Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > is defined as: > >> Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > > which clearly reflects the newer usage style - it keeps the RTS line high > as long as there is space to _receive_ data. And takes it low when the > receive/input buffer is getting full to stop the modem from sending it data. > > Does this jive with other peoples understanding of RTS usage? > > Unfortunately, the hardware I'm trying to talk to wants to use the OLD > style of RTS line usage. An existing Windows C++ program uses > RTS_CONTROL_TOGGLE, which documentation states: > >> Specifies that the RTS line will be high if bytes are available for transmission. >> After all buffered bytes have been sent, the RTS line will be low. If this value is >> set, it would be an error for an application to adjust the line with >> EscapeCommFunction. This value is ignored in Windows 95; it causes the >> driver to act as if RTS_CONTROL_ENABLE were specified. > > This seems to be the OLD RTS behavior, right? > > So, what I seem to need is to be able to control the RTS line, either using > TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS > when getting ready to TX and clear it when the output buffer is empty). > > Does this make sense, or am I off in the weeds? > Hi Pete OK. That sounds right. I do not know how you would communicate the difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through CommAPI as it stands. I take it you did not find anything either? Perhaps the best thing to do for your code is to toggle the RTS yourself. This could be a feature in the future JSR API perhaps. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 28 20:54:34 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 21:54:34 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <44F3AC6A.10908@gmail.com> Trent Jarvi wrote: > OK. That sounds right. I do not know how you would communicate the > difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through > CommAPI as it stands. I take it you did not find anything either? > > Perhaps the best thing to do for your code is to toggle the > RTS yourself. This could be a feature in the future JSR API perhaps. Yeah, this is what I ended up doing. I had to modify the dll in order to be able to set hardware flow control (which I do want), but leave the RTS flow control at RS_CONTROL_ENABLE. After that I just toggle setRTS(true) when I'm ready to send and setRTS(false) when I get a OUTPUT_BUFFER_EMPTY notification. Haven't tested with real hardware yet, but it seems to work OK. Thanks for the feedback! Pete From Bob_Jacobsen at lbl.gov Tue Aug 29 08:49:02 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 29 Aug 2006 07:49:02 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >is defined as: > > > Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > >which clearly reflects the newer usage style - it keeps the RTS line high >as long as there is space to _receive_ data. And takes it low when the >receive/input buffer is getting full to stop the modem from sending it data. > >Does this jive with other peoples understanding of RTS usage? Can you point to any devices that actually implement this "new" understanding? I think the person who wrote that documentation paragraph is just confused. The original "RTS/CTS" handshaking was extended to input (from DCE to DTE) handshaking via the DTR (Data Terminal Ready) line. I think the person who wrote the double-quoted paragraph above was just confused between the directions, and mixed them up. If you change "RTS" to "DTR" in that paragraph, you get: > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > enabling the DCE to send, when the input buffer has enough room to > > receive data. The driver lowers the DTR line, preventing the DCE to > > send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. which describes how dozens of devices actually work for controlling flow into the DTE (computer). This then leaves RTS/CTS (with RTS usually just stuck high) for controlling flow into the DCE (peripheral). Again, lots of hardware devices actually do this. I don't work on Windows, so can't be sure of what happens. But on the MacOS X version of RXTX, CTS low stops transmission, exactly as the "old" style would expect. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From mschned at basis.com Tue Aug 29 12:57:45 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 12:57:45 -0600 Subject: [Rxtx] Porting to AIX Message-ID: <01f201c6cb9d$034d4f20$341416ac@basis.com> Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar From mschned at basis.com Tue Aug 29 13:58:05 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 13:58:05 -0600 Subject: [Rxtx] Porting to AIX References: <01f201c6cb9d$034d4f20$341416ac@basis.com> Message-ID: <024901c6cba5$714c3560$341416ac@basis.com> After looking through the build messages closer, there is an error building SerialImp.c: gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type Looks like B57600 is not defined and there are no definitions for DEVICEDIR and LOCKDIR on AIX. Can I just a the following to SerialImp.h? #if defined(__aix__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __aix__ */ Mark Schnedar ----- Original Message ----- From: "Mark E. Schnedar" To: Sent: Tuesday, August 29, 2006 12:57 PM Subject: [Rxtx] Porting to AIX Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 29 15:25:35 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 29 Aug 2006 16:25:35 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <84d4a6d50608291425i1fb819d3i615cf9b85b1e9617@mail.gmail.com> On 8/29/06, Bob Jacobsen wrote: > Can you point to any devices that actually implement this "new" understanding? > > I think the person who wrote that documentation paragraph is just confused. The paragraph is from the Windows documentation of its DCB structure which is used to configure the Serial Device. This is what RXTX uses internally. My version is from MSDN, and Google finds the same text here: (search for fRtsControl). I have not seen any mention anywhere of it being incorrect (and yes, I did look, because I thought the same thing). My discussion is based on trying to use RXTX to talk to a device that used the old style of one-way flow control (RTS is raised to SEND data from the PC to the device). An existing VC++ app use the old-style RTS_CONTROL_TOGGLE. RXTX did not - it used the newer style RTS_CONTROL_HANDSHAKE, so things didn't work - the device was seeing RTS HIGH all the time, so it was thinking that the PC was ready to TX all the time. When I switch RXTX to using RTS_CONTROL_ENABLED and manually control RTS, then things work correctly. The behavior is consistent with this understanding if I hook two serial ports on Windows XP in lookback (via null modem). I'd be very surprised if this had not been corrected by M$ by this time. The same structure has been around since WinNT (mid 1990's) - their documentation is typically pretty good. > > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > > enabling the DCE to send, when the input buffer has enough room to > > > receive data. The driver lowers the DTR line, preventing the DCE to > > > send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. There is a seperate field, fDtrControl, which you can set to DTR_CONTROL_HANDSHAKE, that appears to do exactly this. > This then leaves RTS/CTS (with RTS usually just stuck high) for > controlling flow into the DCE (peripheral). Again, lots of hardware > devices actually do this. > > I don't work on Windows, so can't be sure of what happens. But on > the MacOS X version of RXTX, CTS low stops transmission, exactly as > the "old" style would expect. Well, the Linux Serial HOWTO is where I got most of my information. And yes, I thought it was wrong as well, but it's apparently how things are implemented: Donno - but it works for me... Pete From tjarvi at qbang.org Tue Aug 29 19:11:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 29 Aug 2006 19:11:40 -0600 (MDT) Subject: [Rxtx] Porting to AIX In-Reply-To: <024901c6cba5$714c3560$341416ac@basis.com> References: <01f201c6cb9d$034d4f20$341416ac@basis.com> <024901c6cba5$714c3560$341416ac@basis.com> Message-ID: Hi Mark That should do it. You can put ifdef around the B57600 as we did with higher baudrates. You may want to use tip, minicom, kermit or some other serial application on the AIX to confirm that the lockfiles created are correct. Neat stuff. On Tue, 29 Aug 2006, Mark E. Schnedar wrote: > After looking through the build messages closer, > there is an error building SerialImp.c: > > gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o > /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type > > Looks like B57600 is not defined and there are no > definitions for DEVICEDIR and LOCKDIR on AIX. > > Can I just a the following to SerialImp.h? > > #if defined(__aix__) > # define DEVICEDIR "/dev/" > # define LOCKDIR "/var/lock" > # define LOCKFILEPREFIX "LCK.." > # define FHS > #endif /* __aix__ */ > > Mark Schnedar > > > ----- Original Message ----- > From: "Mark E. Schnedar" > To: > Sent: Tuesday, August 29, 2006 12:57 PM > Subject: [Rxtx] Porting to AIX > > > Hi, > > I'm new to rxtx. Currently my company has an interpreter product > that uses rxtx on Windows and Linux. I am trying to get rxtx to > build on AIX. I downloaded rxtx, ran ./configure and make. When > I run make I get the following error: > > libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object > make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 > > Do you have any suggestions on how to fix this problem? > > I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error > on both systems). I did have our system administrator load > automake, autoconf, make (gnu), and gcc. Here are the versions: > > AIX 4.3.3 AIX 5.3.0 > rxtx: 2.1-7r2 2.1-7r2 > autoconf: 2.53 2.59 > automake: 1.5 1.8.5 > make: 3.79.1 3.80 > gcc: (used native cc) 4.0.0 > > Any help would be appreciated. > > Mark Schnedar > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From guille at sms.nl Wed Aug 30 01:14:32 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 09:14:32 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <7.0.1.0.0.20060830091204.03652de0@sms.nl> At 16:49 29/08/2006, Bob Jacobsen wrote: >At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > > > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >is defined as: > > > > > Enables RTS flow-control handshaking. The driver raises the RTS line, > >> enabling the DCE to send, when the input buffer has enough room to > >> receive data. The driver lowers the RTS line, preventing the DCE to > >> send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. > > > >which clearly reflects the newer usage style - it keeps the RTS line high > >as long as there is space to _receive_ data. And takes it low when the > >receive/input buffer is getting full to stop the modem from sending it data. > > > >Does this jive with other peoples understanding of RTS usage? > >Can you point to any devices that actually implement this "new" understanding? Many (most) of the embedded devices we work with implement this kind of flow control. The host (DTE) raises RTS when it can receive data, and lowers it when the input buffers are full. In turn it watches the CTS line to see whether it can send data to the DCE. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From tjarvi at qbang.org Wed Aug 30 01:23:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 30 Aug 2006 01:23:46 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830091204.03652de0@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 16:49 29/08/2006, Bob Jacobsen wrote: >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: >>> >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >>> is defined as: >>> >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, >>>> enabling the DCE to send, when the input buffer has enough room to >>>> receive data. The driver lowers the RTS line, preventing the DCE to >>>> send, when the input buffer does not have enough room to receive >>>> data. If this value is used, it is an error for the application to adjust >>>> the line with EscapeCommFunction. >>> >>> which clearly reflects the newer usage style - it keeps the RTS line high >>> as long as there is space to _receive_ data. And takes it low when the >>> receive/input buffer is getting full to stop the modem from sending it data. >>> >>> Does this jive with other peoples understanding of RTS usage? >> >> Can you point to any devices that actually implement this "new" understanding? > > Many (most) of the embedded devices we work with implement this kind of flow > control. The host (DTE) raises RTS when it can receive data, and lowers it > when the input buffers are full. In turn it watches the CTS line to see > whether it can send data to the DCE. > I think this explains some hardware control 'bugs' I've seen. -- Trent Jarvi tjarvi at qbang.org From guille at sms.nl Wed Aug 30 02:01:35 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 10:01:35 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> At 09:23 30/08/2006, Trent Jarvi wrote: >On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > > > At 16:49 29/08/2006, Bob Jacobsen wrote: > >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >>> > >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >>> is defined as: > >>> > >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, > >>>> enabling the DCE to send, when the input buffer has enough room to > >>>> receive data. The driver lowers the RTS line, preventing the DCE to > >>>> send, when the input buffer does not have enough room to receive > >>>> data. If this value is used, it is an error for the > application to adjust > >>>> the line with EscapeCommFunction. > >>> > >>> which clearly reflects the newer usage style - it keeps the RTS line high > >>> as long as there is space to _receive_ data. And takes it low when the > >>> receive/input buffer is getting full to stop the modem from > sending it data. > >>> > >>> Does this jive with other peoples understanding of RTS usage? > >> > >> Can you point to any devices that actually implement this "new" > understanding? > > > > Many (most) of the embedded devices we work with implement this > kind of flow > > control. The host (DTE) raises RTS when it can receive data, and lowers it > > when the input buffers are full. In turn it watches the CTS line to see > > whether it can send data to the DCE. > > > >I think this explains some hardware control 'bugs' I've seen. I think the above is the most widespread use, but that may just mean it is the most widespread use in our specific segment (embedded systems). Some UART chips (e.g. from Exar) implement this kind of flow control directly in hardware. For example the Exar can be configured to suspend transmission when it sees CTS low, and resume transmission when it sees CTS high. This is also consistent with our experience. Maybe this helps clarify: http://www.tldp.org/HOWTO/Text-Terminal-HOWTO-10.html#ss10.7 Note the "Old RTS/CTS handshaking is different" section, which refers to "older terminals" whereas newer equipment would use RTS/CTS flow control (or equivalently DTR/DTS) as described above. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From Bob_Jacobsen at lbl.gov Wed Aug 30 07:55:31 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 30 Aug 2006 06:55:31 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> <7.0.1.0.0.20060830095557.0374ff28@sms.nl> Message-ID: I think we all agree that CTS inactive means "Send no more from DTE to DCE". The question is how to express the other direction, "Send no more from DCE to DTE". There are two parts to this question: What do various DTE-like devices do, and what do various DCE-like devices expect? Electrically, the lines that go that direction are DTR, DCD, and RTS (plus some special-purpose lines that are rarely present). All three devices I work most with respect the DTR lead. On the other hand, the FTDI chips for doing serial over USB provide either (RTS and CTS) or (DTR and DSR) as the two leads. What we're probably seeing is two different approaches, that have propagated separately. That's a problem. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From Pawan.Kharbanda at dot.state.co.us Wed Aug 30 09:07:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 30 Aug 2006 09:07:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0455E5E5@hqexchange3.dot.state.co.us> Trent, Sorry for not responding earlier to your email. I was actually waiting for the release of our software on the new Hardware. As I mentioned in my previous emails, RXTX crashes and locks up serial ports with the older version of Redhat (Linux 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:28:55 EDT 2005 i686 i686 i386 GNU/Linux), it might work ok if you are using one or 2 ports but anything more than that it has issues. I was using JDK1.5.0_06 and older firmwares of Digi boxes. Let me know if you need any more specific information of the older system. Thanks Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Thursday, August 10, 2006 5:40 AM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even > after 10000 operations (now I am trying 100,000 :). This is all with > the original RXTX 2.1.7 (final) api's without any of my fixes that I > have been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying > the RXTX saying the suggested kernel for Redhat Linux is > 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Aug 1 01:11:30 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 1 Aug 2006 09:11:30 +0200 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <34B6BC40-1405-4A13-8054-0FC6CE10466A@buechse.de> This is a problem with lock files. You should find it somewhere in the documentation... On 01.08.2006, at 03:53, Richard P. Welty wrote: > trying to get my app running on a Mac OS X powerbook, when > the following is executed as the first thing inside the > run method of a Thread: > > > try { > port = (SerialPort) selectedPort.open( > this.getClass().getName(), 2000); > } catch ( PortInUseException ex){ > ex.printStackTrace(); > return; > } > > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java: > 354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run > (ScaleWatcher.java:143) > > i've not seen any documentation suggesting that rxtx would be finicky > about application names... > > thanks for any suggestions, > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From rwelty at suespammers.org Tue Aug 1 05:37:53 2006 From: rwelty at suespammers.org (Richard P. Welty) Date: Tue, 01 Aug 2006 07:37:53 -0400 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <44CF3D11.9060108@suespammers.org> Richard P. Welty wrote: > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) Aha, a confusing error message. it's really a lock file problem; the code is trying to fill in the application name but when it's getting "Unknown Application" and filling that in... richard From ajmas at sympatico.ca Tue Aug 1 13:10:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:10:59 -0400 Subject: [Rxtx] Application Name? Message-ID: <20060801191059.HFCD18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> You need the source code in CVS. The forth coming 2.18 will correct this, but currently the only place to find the correction is in CVS. No idea when 2.18 is due. > > From: "Richard P. Welty" > Date: 2006/08/01 Tue AM 07:37:53 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Application Name? > > Richard P. Welty wrote: > > > i get the following: > > > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > at > > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) > > Aha, a confusing error message. it's really a lock file problem; the > code is trying to fill in the application name but when it's getting > "Unknown Application" and filling that in... > > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:15:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:15:57 -0400 Subject: [Rxtx] Do interfaces break backwards compatibility? Message-ID: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> It is the class that decides to add serializable that needs to worry about those issues. For the most part serial ports and their connection states should be considered as transient, since there is no guarantee they will still be present or that their state will be, especially in a USB world. What you can store is the port settings and port id and then simply test for port availability next time. Nothing else should be assumed. > > From: Gregg Wonderly > Date: 2006/07/31 Mon PM 01:21:19 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Do interfaces break backwards compatibility? > > Doug Berkland wrote: > > As far as I can tell, nothing in either RXTX or Sun's JavaCOMM > > implements Serializable. Therefore, there are no worries from that > > either. (I can't think of a reason anything in JavaCOMM should > > implement Serializable either.) > > Any interface in javax.comm can become implemented by a serializable object. > Thus, if someone wants to provide remote access to a serial port, then they > might (and I think this is not wise) choose to subclass and add Serializable to > the interface list. > > It's that kind of Serialization compatibility that I'm talking about. > > Gregg Wonderly > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:18:11 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:18:11 -0400 Subject: [Rxtx] precompiled for Intel Mac? Message-ID: <20060801191811.FLJY27612.tomts16-srv.bellnexxia.net@smtp1.sympatico.ca> > > From: Joachim Buechse > There will be. However not before we have figured out some remaining issues. What issues are remaining? Andre From Pawan.Kharbanda at dot.state.co.us Tue Aug 1 16:55:08 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 1 Aug 2006 16:55:08 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Hi, I am also experiencing occasional JVM crash thru the native code. I am attaching the log from the crash. Any ideas what might be causing it???? Regards Pawan Kharbanda # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # --------------- T H R E A D --------------- Current thread (0x8d000480): JavaThread "Thread-119" [_thread_in_native, id=111 51] siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba Registers: EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 Top of Stack: (sp=0x8d3482b8) 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 0x8d348308: 00000000 00000002 00000000 00000000 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 Instructions: (pc=0xb75e39b2) 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~StubRoutines::call_stub V [libjvm.so+0x2607ec] V [libjvm.so+0x423828] V [libjvm.so+0x260045] V [libjvm.so+0x2600de] V [libjvm.so+0x2d7745] V [libjvm.so+0x4c2ba3] V [libjvm.so+0x424338] C [libpthread.so.0+0x4dd8] 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 ) =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, id=11026] 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, id=11023] From tjarvi at qbang.org Tue Aug 1 18:46:21 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 1 Aug 2006 18:46:21 -0600 (MDT) Subject: [Rxtx] JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Message-ID: On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) > C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] > 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, > id=11034] > 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, > id=11033] > 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, > id=11032] > 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, > id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] > 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, > id=11028] > 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, > id=11027] > 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, > id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] > 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- Index: termios.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/termios.c,v retrieving revision 1.9.2.57 diff -u -r1.9.2.57 termios.c --- termios.c 4 Jun 2006 02:50:01 -0000 1.9.2.57 +++ termios.c 11 Jun 2006 21:51:10 -0000 @@ -1048,26 +1048,29 @@ if ( !first_tl ) { port->prev = NULL; + port->next = NULL; first_tl = port; } else { - while ( index->next ) + while ( ( index->fd < port->fd ) && index->next ) index = index->next; - if ( port == first_tl ) + if ( index->fd > port->fd ) { - port->prev = NULL; - port->next = first_tl; - first_tl->prev = port; - first_tl = port; + /* inserting previously closed fd */ + port->prev = index->prev; + port->next=index + index->prev->next = port; + index->prev = port; } else { + /* adding to end of list */ port->prev = index; + port->next = NULL; index->next = port; } } - port->next = NULL; LEAVE( "add_port" ); return port; From gergg at cox.net Tue Aug 1 23:25:19 2006 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 02 Aug 2006 00:25:19 -0500 Subject: [Rxtx] Do interfaces break backwards compatibility? In-Reply-To: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <44D0373F.7020600@cox.net> Andre-John Mas wrote: > It is the class that decides to add serializable that needs to worry about those issues. > For the most part serial ports and their connection states should be considered as > transient, since there is no guarantee they will still be present or that their state > will be, especially in a USB world. Right, but when you provide an interface as the standard, that opens the doors for a lot more interpretation and variation. An abstract class can indicate a lot more about what the expected implementation is. Gregg Wonderly From lyon at docjava.com Wed Aug 2 06:02:15 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:02:15 -0400 Subject: [Rxtx] jsr spec and license issues Message-ID: Hi All, Trent and I have been discussing the license issues of the JSR spec and code that we develop, as a community. Here is what we have come up with: >During the development, the new JSR spec that we derive >will be >covered under the LGPL license. Since it is >just interfaces, any contributions will come back to me, for inclusion >into the specification. The goal is to provide a detailed set of >interfaces that >document the present state of our reference model. I am using >the RXTX as the reference model. If there is something missing from >the reference model, or if the reference model has something that should >not be there, we will need to discuss it. > >After Sun accepts the JSR, I, as the copyright holder, can issue >a version with a JSR compatible license. > >The goal is to migrate the interfaces into javax.comm. Does this sound like a reasonable plan to everyone? Thanks! - Doug From joachim at buechse.de Wed Aug 2 06:21:03 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 14:21:03 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Good day, quite frankly I think that this is a very bad idea. This specification (!) should be in the public domain and nowhere else. Defining a spec under the (L)GPL makes absolutely no sense. After all it is a specification not an implementation. There is no or only trivial code attached to it. So while nothing can be gained by putting it under the LGPL, a lot can be lost - for example the contribution of companies that do not like to open source their implementations. Furthermore you are plain wrong assuming you will be the copyright holder to additions made by other people. Best regards, Joachim On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for >> inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that >> should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Aug 2 06:39:28 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:39:28 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Hi All, I don't know anything about licensing issues. The below sounds reasonable. If we make this public domain, will that be compatible with Sun's JSR? Thanks! - DL P.S. I really don't care what we do, as long as there is some sort of collective agreement. >Good day, > >quite frankly I think that this is a very bad idea. This specification >(!) should be in the public domain and nowhere else. > >Defining a spec under the (L)GPL makes absolutely no sense. After all? >it is a specification not an implementation. There is no or only? >trivial code attached to it. So while nothing can be gained by? >putting it under the LGPL, a lot can be lost - for example the? >contribution of companies that do not like to open source their? >implementations. > >Furthermore you are plain wrong assuming you will be the copyright? >holder to additions made by other people. > >Best regards, >Joachim > > >On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for? >>> inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that? >>> should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> >> Does this sound like a reasonable plan to everyone? >> >> Thanks! >> - Doug >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 07:50:09 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 10:50:09 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D0AD91.4080103@gmail.com> Hi, I have been searching the web and here it is: http://jcp.org/en/resources/license_reference Here there is a list of the licenses that are compatible with the JCP for JSR submitting. I think that Apache, CDDL, CPL and OSL are the one that are compatible with our needs. But I think that Apache is the best for us, Doug why do not make a votation? Regards, Manuel > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. > >> Good day, >> >> quite frankly I think that this is a very bad idea. This specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From lyon at docjava.com Wed Aug 2 08:10:55 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 10:10:55 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D0AD91.4080103@gmail.com> References: <44D0AD91.4080103@gmail.com> Message-ID: Hi All, I have no objection to an Apache license for the JSR interfaces that we produce. Would anyone care to comment? Joachim: Does this address your public domain concerns? How does this impact the reference implementation (i.e. RXTX)? Thanks! - DL >Hi, >I have been searching the web and here it is: >http://jcp.org/en/resources/license_reference >Here there is a list of the licenses that are compatible with the JCP >for JSR submitting. >I think that Apache, CDDL, CPL and OSL are the one that are compatible >with our needs. >But I think that Apache is the best for us, Doug why do not make a votation? >Regards, >Manuel > >> Hi All, >> I don't know anything about licensing issues. >> The below sounds reasonable. If we make this public domain, >> will that be compatible with Sun's JSR? >> Thanks! >> - DL >> P.S. I really don't care what we do, as long as there is >> some sort of collective agreement. >>?? >>> Good day, >>> >>> quite frankly I think that this is a very bad idea. This specification >>> (!) should be in the public domain and nowhere else. >>> >>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>> it is a specification not an implementation. There is no or only >>> trivial code attached to it. So while nothing can be gained by >>> putting it under the LGPL, a lot can be lost - for example the >>> contribution of companies that do not like to open source their >>> implementations. >>> >>> Furthermore you are plain wrong assuming you will be the copyright >>> holder to additions made by other people. >>> >>> Best regards, > >> Joachim >>> >>> >>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>> >>>???? >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>?????? >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for >>>>> inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that >>>>> should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>>>???????? >>>> Does this sound like a reasonable plan to everyone? >>>> >>>> Thanks! >>>> - Doug >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>?????? >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>???? >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 08:20:29 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 11:20:29 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D0AD91.4080103@gmail.com> Message-ID: <44D0B4AD.2050106@gmail.com> Doug; > How does this impact the reference implementation (i.e. RXTX)? > Fuck I have not thinked about that, we would need that everyone who had colaborated with RXTX and have putted code on it to agree a license chaging. Or start from sractch. I don't know if Trent have the right to do that. Regards, Manuel > > >> Hi, >> I have been searching the web and here it is: >> http://jcp.org/en/resources/license_reference >> Here there is a list of the licenses that are compatible with the JCP >> for JSR submitting. >> I think that Apache, CDDL, CPL and OSL are the one that are compatible >> with our needs. >> But I think that Apache is the best for us, Doug why do not make a votation? >> Regards, >> Manuel >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> >> >> Joachim >> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 08:21:15 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 16:21:15 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Putting something in the public domain means, that it can be used by anyone for whatever (s)he thinks is appropriate. The authors define no restriction regarding it's use. That's how any specification should be. Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From berkland at spamcop.net Wed Aug 2 08:50:50 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 10:50:50 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> You may want to consider making it available under two separate licenses. 1 - LGPL as it is today The LGPL can be used by anyone wanting to extend the current functionality, as long as they provide code for anything they change. 2 - Sun Community Source License (SCSL) http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf The SCSL will allow anyone who wants to do a closed source implementation from the ground up to do so, if I'm reading it correctly, as long as they don't use any of the code from the Reference Implementation. This will satisfy any company that wants to have a closed-source implementation, but not help them out very much. On 8/2/06, Joachim Buechse wrote: > Putting something in the public domain means, that it can be used by > anyone for whatever (s)he thinks is appropriate. The authors define > no restriction regarding it's use. That's how any specification > should be. > > Best regards, > Joachim > > > On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > > > Hi All, > > I don't know anything about licensing issues. > > The below sounds reasonable. If we make this public domain, > > will that be compatible with Sun's JSR? > > Thanks! > > - DL > > P.S. I really don't care what we do, as long as there is > > some sort of collective agreement. > >> Good day, > >> > >> quite frankly I think that this is a very bad idea. This > >> specification > >> (!) should be in the public domain and nowhere else. > >> > >> Defining a spec under the (L)GPL makes absolutely no sense. After all > >> it is a specification not an implementation. There is no or only > >> trivial code attached to it. So while nothing can be gained by > >> putting it under the LGPL, a lot can be lost - for example the > >> contribution of companies that do not like to open source their > >> implementations. > >> > >> Furthermore you are plain wrong assuming you will be the copyright > >> holder to additions made by other people. > >> > >> Best regards, > >> Joachim > >> > >> > >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> > >>> Hi All, > >>> Trent and I have been discussing the license issues of the > >>> JSR spec and code that we develop, as a community. > >>> Here is what we have come up with: > >>> > >>>> During the development, the new JSR spec that we derive > >>>> will be > >>>> covered under the LGPL license. Since it is > >>>> just interfaces, any contributions will come back to me, for > >>>> inclusion > >>>> into the specification. The goal is to provide a detailed set of > >>>> interfaces that > >>>> document the present state of our reference model. I am using > >>>> the RXTX as the reference model. If there is something missing > >>>> from > >>>> the reference model, or if the reference model has something that > >>>> should > >>>> not be there, we will need to discuss it. > >>>> > >>>> After Sun accepts the JSR, I, as the copyright holder, can issue > >>>> a version with a JSR compatible license. > >>>> > >>>> The goal is to migrate the interfaces into javax.comm. > >>> > >>> Does this sound like a reasonable plan to everyone? > >>> > >>> Thanks! > >>> - Doug > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From naranjo.manuel at gmail.com Wed Aug 2 09:03:02 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 12:03:02 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> References: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> Message-ID: <44D0BEA6.2040408@gmail.com> Or even better, you can use Apache v2, which allows both Open Source and Closed Source forms ;-) > You may want to consider making it available under two separate licenses. > > 1 - LGPL as it is today > > The LGPL can be used by anyone wanting to extend the current > functionality, as long as they provide code for anything they change. > > 2 - Sun Community Source License (SCSL) > http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf > > The SCSL will allow anyone who wants to do a closed source > implementation from the ground up to do so, if I'm reading it > correctly, as long as they don't use any of the code from the > Reference Implementation. This will satisfy any company that wants to > have a closed-source implementation, but not help them out very much. > > On 8/2/06, Joachim Buechse wrote: > >> Putting something in the public domain means, that it can be used by >> anyone for whatever (s)he thinks is appropriate. The authors define >> no restriction regarding it's use. That's how any specification >> should be. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This >>>> specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> Joachim >>>> >>>> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing >>>>>> from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 09:46:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 17:46:25 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> I assume that javax.comm/RXTX is to be redefined using Interfaces. In this case we should separate 2 things: 1) The specification and it's incarnation in the form of java classes defining the interfaces. 2) The actual implementation of the functionality. It is possible that 1) may contain some trivial code in abstract or none abstract classes (ie PortFactory, PortRegistry, etc). Doug's original question was regarding 1) - unless I misunderstood. I personally think that 1) should be in the public domain. It should not be covered by any restrictions what-so-ever. Let it be free as in "totally free in any respect". I do not care under which license 2) is released. Why? Because it is in my very interest that all/almost all vendors include implementations with their distributions. Which will only happen if they do not need to respect open source licenses. (javax.comm is not nearly as important as the Apache web server or MySql, so nobody will take licensing risks). Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ssbello at gmail.com Wed Aug 2 10:28:30 2006 From: ssbello at gmail.com (Simone) Date: Wed, 2 Aug 2006 18:28:30 +0200 Subject: [Rxtx] pocketPC 2003 Message-ID: <39ed505d0608020928k6ceb01aen470c2e6a78c5a6b0@mail.gmail.com> Does anyone know if the Rxtx works on PocketPc 2003? If yes, could you, please, give me some suggestion. Thanks, Simone Bell? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/72e0fb87/attachment-0331.html From berkland at spamcop.net Wed Aug 2 13:00:10 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 15:00:10 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> Message-ID: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> How about these for the "Business Terms" of the new JSR: > The specification will be released in accordance with standard terms > as specified by the JCP process. > > The reference implementation (RI) will be delivered in binary form > free of charge from http://rxtx.org. Licensing details are expected to > be under the Binary Code License (BCL). > > The source for the reference implementation is expected to be > delivered via the Limited GNU Public License (LGPL) and available free > of charge. > > The TCK will be made available free of charge to all J2SE and J2EE licensees. > > The TCK will be offered for license at no charge, without support or > any trademark license rights, to qualified not-for-profit entities > (including not-for-profit) academic institutions) and qualified > individuals engaged in efforts to create compatible implementations of > the Specification. From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 13:13:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 13:13:33 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E495@hqexchange3.dot.state.co.us> Trent, I didn't exactly get it. Again I am not a C guy, maybe its very simple for you but I don't see any checks for FD (as written in the patch for termios.c) in the initialise_event_info_struct, I see some checks in the interruptEventLoop call. Second as you explained I open three("/dev/cuf01","/dev/cuf01","/dev/cuf01") ports, I close the 2nd ("/dev/cuf02", the other 2 are still open) , I never try to open the third ("/dev/cuf03") port again if it is already open. Are you planning to have a fix for this in the next release 2.1.8. Its very important for me to have a fix for this, its causing some major headaches for our project. I know you have your regular job too, I will appreciate any help. Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, August 01, 2006 6:46 PM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java > VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic > frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) C [librxtxSerial.so+0x69b2] > initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] > Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" > [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: > /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread > "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 > JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon > [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" > daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread > "AdapterThread" daemon [_thread_blocked, id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, > id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Wed Aug 2 13:14:20 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 16:14:20 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> Message-ID: <44D0F98C.1070600@gmail.com> +1 Agree > How about these for the "Business Terms" of the new JSR: > > >> The specification will be released in accordance with standard terms >> as specified by the JCP process. >> >> The reference implementation (RI) will be delivered in binary form >> free of charge from http://rxtx.org. Licensing details are expected to >> be under the Binary Code License (BCL). >> >> The source for the reference implementation is expected to be >> delivered via the Limited GNU Public License (LGPL) and available free >> of charge. >> >> The TCK will be made available free of charge to all J2SE and J2EE licensees. >> >> The TCK will be offered for license at no charge, without support or >> any trademark license rights, to qualified not-for-profit entities >> (including not-for-profit) academic institutions) and qualified >> individuals engaged in efforts to create compatible implementations of >> the Specification. >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From savagobr at yahoo.com Wed Aug 2 13:40:42 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:40:42 -0700 (PDT) Subject: [Rxtx] jsr spec and license issues Message-ID: <20060802194042.83599.qmail@web53807.mail.yahoo.com> Friends Apache seems ok... if I get it right, does it *almost* equals to BSD? Regarding public domain: I think that the good people that spent so much time on this library will like to keep some rights over its own work, don't you think? Best regards Savago --------------------------------- Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/79abdfd5/attachment-0331.html From savagobr at yahoo.com Wed Aug 2 13:58:04 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:58:04 -0700 (PDT) Subject: [Rxtx] JVM Crashing Message-ID: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago --------------------------------- Groups are talking. We´re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/47d561ae/attachment-0331.html From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 14:09:18 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 14:09:18 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E4AD@hqexchange3.dot.state.co.us> Thank You :) ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adenilson Cavalcanti Sent: Wednesday, August 02, 2006 1:58 PM To: rxtx at qbang.org Subject: Re: [Rxtx] JVM Crashing Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago ________________________________ Groups are talking. We?re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/b4eb22cf/attachment-0331.html From tjarvi at qbang.org Wed Aug 2 20:23:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 20:23:42 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > Hi Doug As mentioned off the list, the important point in my mind is that everyone is on the same base more than what license is decided upon. These things are just best addressed early so there isn't confusion. The Apache license is fairly standard in the Open Source community vs several of the relatively unknown [and obviously redundat even by their descriptions] offerings by Sun. Perhaps one option here that would kill a few birds with one stone is to dual license the interface as Apache and LGPL. This would allow everyone to use the interfaces without needing to do wastefull work for internal license requirements. Projects could choose between the two the license that best suits their needs. If there is a software shop doing Java that isn't familiar with the Apache license, they must be doing some strange Java. I do think it is foolhearty to blindly travel in public domain but nobody is trying to undermine the spec files. The intent is to use the work for a JSR submission that everyone can use without confusion later on down the line. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 21:01:16 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 20:01:16 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D166FC.9090005@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> Does this sound like a reasonable plan to everyone? >> > > Hi Doug > > As mentioned off the list, the important point in my mind is that everyone > is on the same base more than what license is decided upon. These things > are just best addressed early so there isn't confusion. > > The Apache license is fairly standard in the Open Source community vs > several of the relatively unknown [and obviously redundat even by > their descriptions] offerings by Sun. The JCP is a reasonable process for what the RxTx project intends to achieve by evolving the API. There isn't much to lose by going the JSR route. The community will benefit from a fair API like so many other that have undergone the process. Sun isn't going to own the API or manipulate it into anything weird anymore than anyone else is. I think your fears are rather vague and unfounded. Which isn't to say that I am a well-informed representative of the JCP, I've only sat through one JSR process and we ended up with javax.usb, and IBM got what it wanted out of the deal and the community got a very nice standard. Paul > > Perhaps one option here that would kill a few birds with one stone is to > dual license the interface as Apache and LGPL. This would allow everyone > to use the interfaces without needing to do wastefull work for internal > license requirements. Projects could choose between the two the license > that best suits their needs. If there is a software shop doing Java that > isn't familiar with the Apache license, they must be doing some strange > Java. > > I do think it is foolhearty to blindly travel in public domain but nobody > is trying to undermine the spec files. The intent is to use the work for > a JSR submission that everyone can use without confusion later on down the > line. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Aug 2 22:10:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 22:10:48 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D166FC.9090005@sun.com> References: <44D166FC.9090005@sun.com> Message-ID: On Wed, 2 Aug 2006, Paul Klissner wrote: > Trent Jarvi wrote: >> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> Does this sound like a reasonable plan to everyone? >>> >> >> Hi Doug >> >> As mentioned off the list, the important point in my mind is that everyone >> is on the same base more than what license is decided upon. These things >> are just best addressed early so there isn't confusion. >> >> The Apache license is fairly standard in the Open Source community vs >> several of the relatively unknown [and obviously redundat even by >> their descriptions] offerings by Sun. > > The JCP is a reasonable process for what the RxTx project intends > to achieve by evolving the API. > > There isn't much to lose by going the JSR route. The community will > benefit from a fair API like so many other that have undergone > the process. Sun isn't going to own the API or manipulate it > into anything weird anymore than anyone else is. I think your > fears are rather vague and unfounded. > > Which isn't to say that I am a well-informed representative > of the JCP, I've only sat through one JSR process and we ended > up with javax.usb, and IBM got what it wanted out of the deal > and the community got a very nice standard. > Hi Paul The JCP should work fine. As our intentions are in line, licensing so that everyone can use the interface code should not be a problem. Note that the current default right now is that the interfaces are copyrighted and no license for distribution is included. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 22:33:51 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 21:33:51 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D166FC.9090005@sun.com> Message-ID: <44D17CAF.1090802@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Paul Klissner wrote: > >> Trent Jarvi wrote: >>> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>> Does this sound like a reasonable plan to everyone? >>>> >>> Hi Doug >>> >>> As mentioned off the list, the important point in my mind is that everyone >>> is on the same base more than what license is decided upon. These things >>> are just best addressed early so there isn't confusion. >>> >>> The Apache license is fairly standard in the Open Source community vs >>> several of the relatively unknown [and obviously redundat even by >>> their descriptions] offerings by Sun. >> The JCP is a reasonable process for what the RxTx project intends >> to achieve by evolving the API. >> >> There isn't much to lose by going the JSR route. The community will >> benefit from a fair API like so many other that have undergone >> the process. Sun isn't going to own the API or manipulate it >> into anything weird anymore than anyone else is. I think your >> fears are rather vague and unfounded. >> >> Which isn't to say that I am a well-informed representative >> of the JCP, I've only sat through one JSR process and we ended >> up with javax.usb, and IBM got what it wanted out of the deal >> and the community got a very nice standard. >> > > Hi Paul > > The JCP should work fine. As our intentions are in line, licensing so > that everyone can use the interface code should not be a problem. Sorry, looks like my concerns were unfounded. I haven't been following the threads closely this week, as work got busy with an escalated issue and new project. Sorry about that. > > Note that the current default right now is that the interfaces are > copyrighted and no license for distribution is included. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Aug 3 03:45:56 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 03 Aug 2006 05:45:56 -0400 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: Hi All, I have been waiting a day for things to cool down. Licensing appears to be a hot-button topic. I have no objection to dual license the interfaces as both Apache and LGPL. Some thoughts: Goal: developers wish to work together on a common piece of code that the team needs. It makes sense that the code base they work on should be Apache-licensed. That makes it possible for the team to use and develop common code, even if the end result is LGPL'd as a whole. If we combine licenses, we must follow the terms of both licenses when distributing the combined work. Thus, the dual license contains the super set of terms in the licenses of Apached and LGPL. This should address concern about using Apache-licensed code within LGPL projects due to the FSF's claim that they are incompatible. Here is a draft statement for RXSL: The RXTX Specification Library (RXSL) uses a dual license strategy for the source code. These licenses are the GNU Lesser General Public License (LGPL) and the Apache License. I strongly encourage users to use the LGPL license and participate fully in the free software community. Dual licensing of the RXSL source code provides open and free access to the technology both for the GPL community and for other developers or companies that cannot use the GPL. Dual license is common practice in open source projects like OpenOffice, Perl and Mozilla. Through the combined use of LGPL and Apache license, developers will have a high degree of freedom yet compatibility and interoperability will be preserved. You can freely modify, extend, and improve the RXSL source code. The only question is whether or not you must provide the source code and contribute modifications to the community. The GNU and Apache licenses allow different ranges of flexibility in this regard, but in the end, regardless of the license used, any and all incompatible changes must be published openly. Note that there is the RXTX Reference Model that uses the org.rxtx package, which itself is protected by the LGPL. This may be part of the distribution, however, it can not be redistributed using a different license. Is everybody OK with this? Thanks Trent, great idea! - Doug From joachim at buechse.de Thu Aug 3 04:15:44 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 3 Aug 2006 12:15:44 +0200 Subject: [Rxtx] JVM Crashing In-Reply-To: <20060802195804.70935.qmail@web53812.mail.yahoo.com> References: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Message-ID: <6ABA2AB2-CECE-4C4B-A7D6-0CDF8B9C95A8@buechse.de> I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of > rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jvermillard at archean.fr Thu Aug 3 04:26:48 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Thu, 03 Aug 2006 12:26:48 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <1154600808.16732.18.camel@localhost.localdomain> Hi, I'm a developer of the Apache MINA framework. It's a network application framework which helps users develop high performance and high scalability network applications easily. http://directory.apache.org/subprojects/mina/index.html . I would like to integrate serial connection to the framework (actualy supporting TCP, UDP (broadcast) and in VM communications), but LGPL is an issue for me. An Apache License would be pretty usefull for me and integrate rxtx functionnalities easly. Thanks, Julien Le jeudi 03 ao?t 2006 ? 05:45 -0400, Dr. Douglas Lyon a ?crit : > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/755cca7f/smime-0331.bin From pascal at quies.net Thu Aug 3 04:32:35 2006 From: pascal at quies.net (Pascal S. de Kloe) Date: Thu, 3 Aug 2006 12:32:35 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <200608031232.35838.pascal@quies.net> Hi Doug, The Apache license is unnessesary complex. It puts all kinds of limitations on the usage. Is there a particular reason why people chose this or was it just the familiar name? I agree with Joachim (again) that the specification and the interfaces should be public domain. However, if we realy need a license then have a look at the X11 license because that one is compatible with the GPL and suits our needs: http://www.fsf.org/licensing/licenses/index_html http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3 ---- start: implementation Copyright (C) 2006 Sun Microsystems, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Sun Microsystems shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Sun Microsystems. Java is a trademark of Sun Microsystems, Inc. ---- end Op donderdag 3 augustus 2006 11:45, schreef Dr. Douglas Lyon: > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Aug 3 05:17:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 05:17:07 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154600808.16732.18.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: On Thu, 3 Aug 2006, Julien Vermillard wrote: > Hi, > > I'm a developer of the Apache MINA framework. It's a network application > framework which helps users develop high performance and high > scalability network applications easily. > http://directory.apache.org/subprojects/mina/index.html . I would like > to integrate serial connection to the framework (actualy supporting TCP, > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > An Apache License would be pretty usefull for me and integrate rxtx > functionnalities easly. > > Thanks, > > Julien > Hi Julien The rxtx license itself will not change. This is just the interface. You would be free to implement an rxtx replacement if the LGPL low level code is a problem for you. These licensing details would make it possible to take the interface code instead of needing to recode them for a new project. You are probably confusing the license problems with the GPL not the LGPL though you can share links to concerns off the list if you would like to go through them. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 11:59:48 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 11:59:48 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E516@hqexchange3.dot.state.co.us> Joachim, I think my both problems (JVM crashing & Port Locking) are being caused by the corruption of "Event Info Struct / EIS" I have noticed with in EIS my "FD" and "Closing" value being overwritten. The problem is definitely in SerialImp.c file. I am trying to understand what the code does and try to pin point the problem by trying few other options. I will keep everybody posted. Regards Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Joachim Buechse Sent: Thursday, August 03, 2006 4:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Thu Aug 3 13:50:07 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 14:50:07 -0500 Subject: [Rxtx] slow startup Message-ID: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete From brian at mbari.org Thu Aug 3 14:05:57 2006 From: brian at mbari.org (Brian Schlining) Date: Thu, 3 Aug 2006 13:05:57 -0700 Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> References: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Message-ID: Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B > Greetings, > I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/ > qbang.org). > > In testing things out, I ran the list ports example from the Wiki, > and it seems to take quite a while for the library to initialize? > Like on the order of 30+ seconds or so after startup (and the RXTX > banner prints), and before the application starts running. > > Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then > I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ > terminal server) and I'm wondering if they are not responding properly > and this is causing the slow startup? Or is this a known problem of > some kind, or maybe something on my system is screwy? > > Thanks, > Pete > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/6123f730/attachment-0330.html From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 14:13:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 14:13:47 -0600 Subject: [Rxtx] slow startup Message-ID: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Hi Pete, RXTX does open and close the ports in Windows. Try downloading utility like PORTMON(only for windows) and you can see that whenever you load RXTX it tries to register all the available COMM ports in the system. It is a little slow if you have virtual ports, we use digi as a terminal server, Its going to get worst of you have comm ports in 100's Thanks Pawan Kharbanda ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Brian Schlining Sent: Thursday, August 03, 2006 2:06 PM To: RXTX Developers and Users Subject: Re: [Rxtx] slow startup Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/94fd105d/attachment-0330.html From pete.flugstad at gmail.com Thu Aug 3 14:32:04 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 15:32:04 -0500 Subject: [Rxtx] slow startup In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Message-ID: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> On 8/3/06, Kharbanda, Pawan wrote: > RXTX does open and close the ports in Windows. Try downloading utility > like PORTMON(only for windows) and you can see that whenever you load RXTX > it tries to register all the available COMM ports in the system. It is a > little slow if you have virtual ports, we use digi as a terminal server, Its > going to get worst of you have comm ports in 100's Okay, I can understand that, but from the PORTMON output, it looks like it's opening each port TWICE: 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS ... 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS Also, assuming instead of listing the ports I wanted to just open one, I'm still seeing the 30 second delay, so it's scanning at startup regardless of what the Java code is going to do. Probably necessary, but annoying. I know, I know, contribute patches... :-) Thanks, Pete From tjarvi at qbang.org Thu Aug 3 15:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 15:04:42 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: On Thu, 3 Aug 2006, Pete Flugstad wrote: > On 8/3/06, Kharbanda, Pawan wrote: >> RXTX does open and close the ports in Windows. Try downloading utility >> like PORTMON(only for windows) and you can see that whenever you load RXTX >> it tries to register all the available COMM ports in the system. It is a >> little slow if you have virtual ports, we use digi as a terminal server, Its >> going to get worst of you have comm ports in 100's > > Okay, I can understand that, but from the PORTMON output, it looks > like it's opening each port TWICE: > > 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > ... > 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > > Also, assuming instead of listing the ports I wanted to just open one, > I'm still seeing the 30 second delay, so it's scanning at startup > regardless of what the Java code is going to do. Probably necessary, > but annoying. > > I know, I know, contribute patches... :-) > I think this problem is in RXTXCommDriver.java. I've just not tracked it down but it should be in the java code, not the native code so easy enough to track down. -- Trent Jarvi tjarvi at qbang.org From jvermillard at archean.fr Fri Aug 4 03:43:28 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:43:28 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: <1154684608.6181.4.camel@localhost.localdomain> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > Hi, > > > > I'm a developer of the Apache MINA framework. It's a network application > > framework which helps users develop high performance and high > > scalability network applications easily. > > http://directory.apache.org/subprojects/mina/index.html . I would like > > to integrate serial connection to the framework (actualy supporting TCP, > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > An Apache License would be pretty usefull for me and integrate rxtx > > functionnalities easly. > > > > Thanks, > > > > Julien > > > > Hi Julien > > The rxtx license itself will not change. This is just the interface. > You would be free to implement an rxtx replacement if the LGPL low level > code is a problem for you. These licensing details would make it possible > to take the interface code instead of needing to recode them for a new > project. > > You are probably confusing the license problems with the GPL not the LGPL > though you can share links to concerns off the list if you would like to > go through them. > > -- > Trent Jarvi > tjarvi at qbang.org Hi, I'm not a license expert but some guys at ASF said me you can't call LGPLed libs from java. some peoples interprete that as static linking and not dynamic linking (no idea why). So ASF/BSD licensied interface willl solve the license probleme. If you got some questions about the ASL and the way you can dual license LGPL/ASL you can ask it on legal-discuss at apache.org Julien -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/8d46c0aa/smime-0330.bin From jvermillard at archean.fr Fri Aug 4 03:51:30 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:51:30 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <1154685091.6181.6.camel@localhost.localdomain> erm from java -> from ASLed Java code Le vendredi 04 ao?t 2006 ? 11:43 +0200, Julien Vermillard a ?crit : > Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > Hi, > > I'm not a license expert but some guys at ASF said me you can't call > LGPLed libs from java. some peoples interprete that as static linking > and not dynamic linking (no idea why). So ASF/BSD licensied interface > willl solve the license probleme. > > If you got some questions about the ASL and the way you can dual license > LGPL/ASL you can ask it on legal-discuss at apache.org > > Julien > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dcc29d70/smime-0330.bin From guille at sms.nl Fri Aug 4 04:35:24 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Fri, 04 Aug 2006 12:35:24 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <7.0.1.0.0.20060804123322.036dc748@sms.nl> At 11:43 04/08/2006, Julien Vermillard wrote: >Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > >Hi, > >I'm not a license expert but some guys at ASF said me you can't call >LGPLed libs from java. some peoples interprete that as static linking >and not dynamic linking (no idea why). This interpretation is wrong. See the official position of the FSF regarding the LGPL and Java: http://www.gnu.org/licenses/lgpl-java.html http://www.fsf.org/licensing/licenses/lgpl-java.html Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From hambyiii at hotmail.com Fri Aug 4 04:52:47 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 10:52:47 +0000 Subject: [Rxtx] error getting InputStream Message-ID: Hi, I have written a program in Java for Windows xp using RXTX (which is why I am using this mailing list :). However, I am getting a problem. I am connecting to a serial port, like so: private CommPortIdentifier portID; private boolean openPort(String selectedPort) { boolean portFound = false; Enumeration portList; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portID.getName().equals(selectedPort)) { portFound = true; break; } } } return portFound; } and then I try and get the serial port input stream (leaving out the try and catch for the sake of space): SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); InputStream inputStream = serialPort.getInputStream(); but on the getInputStream() I get the following error message: Bad file descriptor in nativeavailable I cannot figure out where it is going wrong...anyone any ideas. A quick answer would be wonderful, as I am kinda under the hammer to get this fixed quickly Thanks in Advance Keith From tjarvi at qbang.org Fri Aug 4 05:13:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 05:13:19 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <7.0.1.0.0.20060804123322.036dc748@sms.nl> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> <7.0.1.0.0.20060804123322.036dc748@sms.nl> Message-ID: On Fri, 4 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 11:43 04/08/2006, Julien Vermillard wrote: >> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : >>> On Thu, 3 Aug 2006, Julien Vermillard wrote: >>> >>>> Hi, >>>> >>>> I'm a developer of the Apache MINA framework. It's a network application >>>> framework which helps users develop high performance and high >>>> scalability network applications easily. >>>> http://directory.apache.org/subprojects/mina/index.html . I would like >>>> to integrate serial connection to the framework (actualy supporting TCP, >>>> UDP (broadcast) and in VM communications), but LGPL is an issue for me. >>>> >>>> An Apache License would be pretty usefull for me and integrate rxtx >>>> functionnalities easly. >>>> >>>> Thanks, >>>> >>>> Julien >>>> >>> >>> Hi Julien >>> >>> The rxtx license itself will not change. This is just the interface. >>> You would be free to implement an rxtx replacement if the LGPL low level >>> code is a problem for you. These licensing details would make it possible >>> to take the interface code instead of needing to recode them for a new >>> project. >>> >>> You are probably confusing the license problems with the GPL not the LGPL >>> though you can share links to concerns off the list if you would like to >>> go through them. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >> >> Hi, >> >> I'm not a license expert but some guys at ASF said me you can't call >> LGPLed libs from java. some peoples interprete that as static linking >> and not dynamic linking (no idea why). > > This interpretation is wrong. See the official position of the FSF regarding > the LGPL and Java: > > http://www.gnu.org/licenses/lgpl-java.html > > http://www.fsf.org/licensing/licenses/lgpl-java.html > What I do with legal groups that go down that rat hole is give them a copy of the rxtx 2.0 license. Since the confused legal folks are going in a direction that does not represent the intent of the license or authors at that point and are confused about basic things in our industry that most consider facts, the discussions are very short. The rxtx 2.0 license just adds the following and has for 6 years or so. Not because the lawyers are right. They get confused about intent and even facts. The following is added to make confused lawyers that cant understand intent go far away and never come back. period. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. From hambyiii at hotmail.com Fri Aug 4 05:42:21 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 11:42:21 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Okay, I made a little mistake in my last message. The error is not occuring where I thought it was. Instead it is occuring when I do the following: byte[] readBuffer = new byte[128]; try { int numBytes = 0; try { Thread.sleep(500); } catch (InterruptedException e) {} while (inputStream.available() > 0) { numBytes = inputStream.read(readBuffer); } processReceivedData(readBuffer, numBytes); } catch (IOException e) { System.out.println(e.getMessage()); } So I guess the error is happening on the inputStream.read(readBuffer) again, any help is appreciated and again, thanks in advance Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 10:52:47 +0000 > >Hi, > >I have written a program in Java for Windows xp using RXTX (which is why I >am using this mailing list :). However, I am getting a problem. I am >connecting to a serial port, like so: > private CommPortIdentifier portID; > > private boolean openPort(String selectedPort) > { > boolean portFound = false; > Enumeration portList; > > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portID.getName().equals(selectedPort)) > { > portFound = true; > break; > } > } > } > > return portFound; > } > >and then I try and get the serial port input stream (leaving out the try >and >catch for the sake of space): > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >InputStream inputStream = serialPort.getInputStream(); > >but on the getInputStream() I get the following error message: > >Bad file descriptor in nativeavailable > >I cannot figure out where it is going wrong...anyone any ideas. A quick >answer would be wonderful, as I am kinda under the hammer to get this fixed >quickly > >Thanks in Advance >Keith > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From hambyiii at hotmail.com Fri Aug 4 07:08:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:08:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Hi, I know I am replying to myself a lot at the moment, but more information has come to light (These errors are actually happening on a client machine, on software that has worked for the past month, and only now has started to fail, which is why I am a little slow finding things out) The errors I have already written about are only symptoms of an orignal error. The original error occurs the first time I try to WRITE thte OutputStream: OutputStream oStream = serialPort.getOutputStream(); serialPort.notifyOnOutputEmpty(true); byte[] bs = encodeMessage(configString.toString()); oStream.write(bs); oStream.flush(); The error occurs on oStream.write(bs); and is: Input/output error in writeArray Now writeArray is native code, so I have no idea what is going on there. Any help would be appreciated Thanks Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 11:42:21 +0000 > >Okay, I made a little mistake in my last message. > >The error is not occuring where I thought it was. Instead it is occuring >when I do the following: > >byte[] readBuffer = new byte[128]; > >try { > > int numBytes = 0; > try { > Thread.sleep(500); > } > catch (InterruptedException e) > {} > > while (inputStream.available() > 0) > { > numBytes = inputStream.read(readBuffer); > } > > processReceivedData(readBuffer, numBytes); >} >catch (IOException e) >{ > System.out.println(e.getMessage()); >} > >So I guess the error is happening on the inputStream.read(readBuffer) > >again, any help is appreciated and again, thanks in advance >Keith > > >From: "Keith Thorne" > >Reply-To: RXTX Developers and Users > >To: rxtx at qbang.org > >Subject: [Rxtx] error getting InputStream > >Date: Fri, 04 Aug 2006 10:52:47 +0000 > > > >Hi, > > > >I have written a program in Java for Windows xp using RXTX (which is why >I > >am using this mailing list :). However, I am getting a problem. I am > >connecting to a serial port, like so: > > private CommPortIdentifier portID; > > > > private boolean openPort(String selectedPort) > > { > > boolean portFound = false; > > Enumeration portList; > > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > > while (portList.hasMoreElements()) > > { > > portID = (CommPortIdentifier) portList.nextElement(); > > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > > { > > if (portID.getName().equals(selectedPort)) > > { > > portFound = true; > > break; > > } > > } > > } > > > > return portFound; > > } > > > >and then I try and get the serial port input stream (leaving out the try > >and > >catch for the sake of space): > > > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); > >InputStream inputStream = serialPort.getInputStream(); > > > >but on the getInputStream() I get the following error message: > > > >Bad file descriptor in nativeavailable > > > >I cannot figure out where it is going wrong...anyone any ideas. A quick > >answer would be wonderful, as I am kinda under the hammer to get this >fixed > >quickly > > > >Thanks in Advance > >Keith > > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Aug 4 07:26:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: Hi Keith Can you tell us more about the physical serial port? Might it be 'vanishing?' On Fri, 4 Aug 2006, Keith Thorne wrote: > Hi, > > I know I am replying to myself a lot at the moment, but more information has > come to light (These errors are actually happening on a client machine, on > software that has worked for the past month, and only now has started to > fail, which is why I am a little slow finding things out) > > The errors I have already written about are only symptoms of an orignal > error. The original error occurs the first time I try to WRITE thte > OutputStream: > > OutputStream oStream = serialPort.getOutputStream(); > serialPort.notifyOnOutputEmpty(true); > > byte[] bs = encodeMessage(configString.toString()); > > oStream.write(bs); > oStream.flush(); > > The error occurs on oStream.write(bs); and is: > > Input/output error in writeArray > > Now writeArray is native code, so I have no idea what is going on there. Any > help would be appreciated > Thanks > Keith > > >> From: "Keith Thorne" >> Reply-To: RXTX Developers and Users >> To: rxtx at qbang.org >> Subject: Re: [Rxtx] error getting InputStream >> Date: Fri, 04 Aug 2006 11:42:21 +0000 >> >> Okay, I made a little mistake in my last message. >> >> The error is not occuring where I thought it was. Instead it is occuring >> when I do the following: >> >> byte[] readBuffer = new byte[128]; >> >> try { >> >> int numBytes = 0; >> try { >> Thread.sleep(500); >> } >> catch (InterruptedException e) >> {} >> >> while (inputStream.available() > 0) >> { >> numBytes = inputStream.read(readBuffer); >> } >> >> processReceivedData(readBuffer, numBytes); >> } >> catch (IOException e) >> { >> System.out.println(e.getMessage()); >> } >> >> So I guess the error is happening on the inputStream.read(readBuffer) >> >> again, any help is appreciated and again, thanks in advance >> Keith >> >>> From: "Keith Thorne" >>> Reply-To: RXTX Developers and Users >>> To: rxtx at qbang.org >>> Subject: [Rxtx] error getting InputStream >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 >>> >>> Hi, >>> >>> I have written a program in Java for Windows xp using RXTX (which is why >> I >>> am using this mailing list :). However, I am getting a problem. I am >>> connecting to a serial port, like so: >>> private CommPortIdentifier portID; >>> >>> private boolean openPort(String selectedPort) >>> { >>> boolean portFound = false; >>> Enumeration portList; >>> >>> portList = CommPortIdentifier.getPortIdentifiers(); >>> >>> while (portList.hasMoreElements()) >>> { >>> portID = (CommPortIdentifier) portList.nextElement(); >>> if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) >>> { >>> if (portID.getName().equals(selectedPort)) >>> { >>> portFound = true; >>> break; >>> } >>> } >>> } >>> >>> return portFound; >>> } >>> >>> and then I try and get the serial port input stream (leaving out the try >>> and >>> catch for the sake of space): >>> >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >>> InputStream inputStream = serialPort.getInputStream(); >>> >>> but on the getInputStream() I get the following error message: >>> >>> Bad file descriptor in nativeavailable >>> >>> I cannot figure out where it is going wrong...anyone any ideas. A quick >>> answer would be wonderful, as I am kinda under the hammer to get this >> fixed >>> quickly >>> >>> Thanks in Advance >>> Keith >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From hambyiii at hotmail.com Fri Aug 4 07:52:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:52:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more information >has > > come to light (These errors are actually happening on a client machine, >on > > software that has worked for the past month, and only now has started to > > fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an orignal > > error. The original error occurs the first time I try to WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); > >> } > >> catch (IOException e) > >> { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance > >> Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I am > >>> connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Fri Aug 4 08:21:07 2006 From: gergg at cox.net (Gregg Wonderly) Date: Fri, 04 Aug 2006 09:21:07 -0500 Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: <44D357D3.40303@cox.net> Keith Thorne wrote: > Okay, I made a little mistake in my last message. > > The error is not occuring where I thought it was. Instead it is occuring > when I do the following: > > byte[] readBuffer = new byte[128]; > > try { > > } > catch (IOException e) > { > System.out.println(e.getMessage()); > } > > So I guess the error is happening on the inputStream.read(readBuffer) This is one of the most frustrating things to see over and over. The exception tells you exactly which line the error is occuring on, if you will use it to see where. In Java, these days, every class should do the following. import java.util.logging.*; public class MyClass { Logger log = Logger.getLogger( getClass().getName() ); ...in some method... { String data = ...; // any extra data like addresses or // ports which might be wrong and // cause an exception. try { ... } catch( SomeException ex ) { log.log( Level.SEVERE, ex.toString()+": "+data, ex ); } } } By default, you will see all of the appropriate details of any exception logged at the WARNING or SEVERE level. You can read the javadocs about logging to get more information too. Once you do this, people can then turn up logging and get more information, or otherwise manage it with a logging configuration file or other tools such as JMX or my http://logman.dev.java.net project. Gregg Wonderly From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 09:15:24 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 09:15:24 -0600 Subject: [Rxtx] error getting InputStream Message-ID: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Keith, Please send the full stack trace of the exception, may be I can help you. On Trent's question regarding physical 'Serial Port', do you mean you have a USB(Connected to Client Machine) to 9 Pin Serial cable(Connected to H/W device)? Also please mention which java version you are using? Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Keith Thorne Sent: Friday, August 04, 2006 7:52 AM To: rxtx at qbang.org Subject: Re: [Rxtx] error getting InputStream The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more > > information >has > > come to light (These errors are actually happening on a client > > machine, >on > > software that has worked for the past month, and only now has > > started to fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an > > orignal error. The original error occurs the first time I try to > > WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); } catch (IOException > >> e) { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the > >> inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which > >>> is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I > >>> am connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out > >>> the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get > >>> this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 14:36:16 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 14:36:16 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Trent, As discussed over the phone yesterday, I am emailing you all the details of the bugs I have been experiencing. We do not use Serial Ports like most of the applications. Our application uses approx 80 -100 serial ports (attached thru Digi boxes) which are opened and closed every 20 sec to 1 minute depending upon the type of device. Some Serial ports are left opened all the time and receive event based serial calls while other devices uses polling (request and reply) to collect data. So the opening and closing of the Serial Ports is not really in a sequential order as you mentioned in our conversation yesterday. Also 2 same serial ports can never be opened at one time we have business locks to prevent that from happening. Our findings so far (of course with the help of RXTX user group): The real culprit is in the SerialImp.c file, somehow the other the Event Info Structure in the Linked List gets damaged and loses references to the original EIS structure. I believe both the problems are caused because of the corruption of EIS packet. I have noticed that the link list traversal of EIS in the following methods under SerialImp.c : 1)initialise_event_info_struct 2)finalize_event_info_struct 3)interruptEventLoop So culprit code might be in one of these methods. I am currently using JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and Fedora Core 5). I am also attaching a Test Class to replicate the problem. You need to modify the class and add your systems Serial ports into the code and execute. java TestOpenClosePort 100 It will open and close all the serial ports 100 times in there own thread. Please let me know, I will be available thru out this weekend and can help you as much as I can with testing. Regards Pawan Kharbanda CDOT-ITS 303-478-2991 (cell) 303-985-4350 (home) -------------- next part -------------- A non-text attachment was scrubbed... Name: TestOpenClosePort.java Type: application/octet-stream Size: 6139 bytes Desc: TestOpenClosePort.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dd3754d9/TestOpenClosePort-0329.obj From tjarvi at qbang.org Fri Aug 4 15:43:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 15:43:09 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: Thanks, I'll look at it tomorrow morning. I don't know when I'll find the solution but you may check email tomorrow afternoon to see if I think I found it. On Fri, 4 Aug 2006, Kharbanda, Pawan wrote: > Trent, > As discussed over the phone yesterday, I am emailing you all the > details of the bugs I have been experiencing. We do not use Serial Ports > like most of the applications. Our application uses approx 80 -100 > serial ports (attached thru Digi boxes) which are opened and closed > every 20 sec to 1 minute depending upon the type of device. Some Serial > ports are left opened all the time and receive event based serial calls > while other devices uses polling (request and reply) to collect data. So > the opening and closing of the Serial Ports is not really in a > sequential order as you mentioned in our conversation yesterday. Also 2 > same serial ports can never be opened at one time we have business locks > to prevent that from happening. > > Our findings so far (of course with the help of RXTX user group): > > The real culprit is in the SerialImp.c file, somehow the other the Event > Info Structure in the Linked List gets damaged and loses references to > the original EIS structure. I believe both the problems are caused > because of the corruption of EIS packet. I have noticed that the link > list traversal of EIS in the following methods under SerialImp.c : > > 1)initialise_event_info_struct > 2)finalize_event_info_struct > 3)interruptEventLoop > > So culprit code might be in one of these methods. I am currently using > JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and > Fedora Core 5). > > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > > Regards > Pawan Kharbanda > CDOT-ITS > 303-478-2991 (cell) > 303-985-4350 (home) > > > > > > > > > > From tjarvi at qbang.org Sat Aug 5 12:32:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:32:40 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:34:27 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:34:27 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> You need to run it few times. More the number of ports, more frequently you can reproduce. With just 2 ports it will be hard to reproduce frequently. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:33 PM To: Kharbanda, Pawan Cc: tjarvi at qbang.org; RXTX Developers and Users Subject: Re: Port Locking / JVM Crashing > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Aug 5 12:52:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:52:26 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> Message-ID: Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more frequently > you can reproduce. With just 2 ports it will be hard to reproduce > frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:57:49 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:57:49 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Trent, I have 5 ports of Digi and I can reproduce almost every time. Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX version -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:52 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more > frequently you can reproduce. With just 2 ports it will be hard to > reproduce frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need >> to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From tjarvi at qbang.org Sat Aug 5 13:06:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:06:07 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Message-ID: You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few thousand > iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:07:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:07:33 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E659@hqexchange3.dot.state.co.us> We use our own locks but I haven't turned off the RXTX locks. I am still using the RXTX locks that might be the difference. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:13:22 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:13:22 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Trent, How can you turn off the lock files? I can try using that. I never tried that, I thought you can't turn off the file locking. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From tjarvi at qbang.org Sat Aug 5 13:18:53 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:18:53 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Message-ID: Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java > -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except lockfiles > are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:31:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:31:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Trent, I am able to constantly replicate almost everytime even when I have locks disabled. Don't know the reason why you are not able to on your environment. Any suggestions??????? Cycle No (Thread ::: /dev/cuf04) ::::::: 7 Cycle No (Thread ::: /dev/cuf01) ::::::: 7 Cycle No (Thread ::: /dev/cuf02) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) Exiting Thread ::: /dev/cuf03 Cycle No (Thread ::: /dev/cuf03) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent Port /dev/cuf01 is Opened 0x01 Sent Port /dev/cub01 is Opened 0x01 Sent Port /dev/cuf01 is Closed Port /dev/cuf02 is Closed Port /dev/cuf03 is Closed Port /dev/cuf04 is Closed Port /dev/cub01 is Closed Exiting Thread ::: /dev/cuf03 Exiting Thread ::: /dev/cuf02 Cycle No (Thread ::: /dev/cuf03) ::::::: 8 Cycle No (Thread ::: /dev/cuf02) ::::::: 8 Exiting Thread ::: /dev/cuf04 Exiting Thread ::: /dev/cuf01 Cycle No (Thread ::: /dev/cuf01) ::::::: 8 Cycle No (Thread ::: /dev/cuf04) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened 0x01 Sent Port /dev/cuf01 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 # # An error report file with more information is saved as hs_err_pid21386.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:19 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) > 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux > java -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except > lockfiles are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code >>>> and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm >>> running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From tjarvi at qbang.org Sat Aug 5 14:14:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 14:14:49 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: I'd stick a couple $15 dual port serial boards in the machine to see if its kernel driver specific. I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more problematic. They do not get the same number of eyes looking for problems. You could try putting #undef TIOCSERGETLSR #undef TIOCGICOUNT in the very top of SerialImp.h or one or the other to flip bits of code off and on. The kernel here is 2.6.11.4-20a-smp from Suse. glibc is 2.3.4-23.4 from Suse the jre is 1.5.0_06-b05 from Sun. The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC ram. You should be able to reproduce what I'm seeing then go from there. I don't think I'm going to see this problem without having the same cornercase hardware you have. Maybe we can work that out off the list but I doubt I'm going to find it in rxtx at this point. I have seen problems in the past were kernel structs don't match user space struct and bad things happen but I was including a kernel struct to get functionality that had not made its way into user space at the time. The only thing I may be missing is that when I write 0x01 out the port, nothing comes back. That was not specified but you could easily disconnect anything connected to the ports to see if that changes anything. rxtx is far from bug free but I do not see anything yet. On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I am able to constantly replicate almost everytime even when I have > locks disabled. Don't know the reason why you are not able to on your > environment. Any suggestions??????? > > > Cycle No (Thread ::: /dev/cuf04) ::::::: 7 > Cycle No (Thread ::: /dev/cuf01) ::::::: 7 > Cycle No (Thread ::: /dev/cuf02) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > Exiting Thread ::: /dev/cuf03 > Cycle No (Thread ::: /dev/cuf03) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > Port /dev/cuf01 is Opened > 0x01 Sent > Port /dev/cub01 is Opened > 0x01 Sent > Port /dev/cuf01 is Closed > Port /dev/cuf02 is Closed > Port /dev/cuf03 is Closed > Port /dev/cuf04 is Closed > Port /dev/cub01 is Closed > Exiting Thread ::: /dev/cuf03 > Exiting Thread ::: /dev/cuf02 > Cycle No (Thread ::: /dev/cuf03) ::::::: 8 > Cycle No (Thread ::: /dev/cuf02) ::::::: 8 > Exiting Thread ::: /dev/cuf04 > Exiting Thread ::: /dev/cuf01 > Cycle No (Thread ::: /dev/cuf01) ::::::: 8 > Cycle No (Thread ::: /dev/cuf04) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > 0x01 Sent > Port /dev/cuf01 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 > # > # An error report file with more information is saved as > hs_err_pid21386.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > Aborted > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:19 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Lockfiles are a compile time option. I've turned them on now, corrected > a mistake resulting in only 3 ports being used and now have it going > through a few hundred iterations again without a crash. > > To disable lockfiles.. > > ./configure --disable-lockfiles && make install > > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > Port /dev/ttyS5 is Closed > Exiting Thread ::: /dev/ttyS1 > Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: > /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting > Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port > /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS1 is Closed > Port /dev/ttyS4 is Closed > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > > > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, How can you turn off the lock files? I can try using that. I >> never tried that, I thought you can't turn off the file locking. >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:06 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> You may try 4 ports instead of 5 to make sure thats not the issue. >> >> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >> 2.6.11.4-20a-smp >> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >> java -version java version "1.5.0_06" >> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >> >> I'm using rxtx 2.1-7 (final) with default configuration except >> lockfiles are disabled. I gathered that you are doing your own > resource locking. >> >> ... >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> ... >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>> version >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:52 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> Whats a few times? I've got 4 ports here and have run it a few >>> thousand iterations. >>> >>> Is that true for you if you run it with just four of your DIGI ports? >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> You need to run it few times. More the number of ports, more >>>> frequently you can reproduce. With just 2 ports it will be hard to >>>> reproduce frequently. >>>> >>>> ~pk >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:33 PM >>>> To: Kharbanda, Pawan >>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>> Subject: Re: Port Locking / JVM Crashing >>>> >>>>> I am also attaching a Test Class to replicate the problem. You need > >>>>> to >>>> >>>>> modify the class and add your systems Serial ports into the code >>>>> and >> >>>>> execute. >>>>> >>>>> java TestOpenClosePort 100 >>>>> >>>>> It will open and close all the serial ports 100 times in there own >>>>> thread. >>>>> >>>>> Please let me know, I will be available thru out this weekend and >>>>> can >>> >>>>> help you as much as I can with testing. >>>>> >>>> >>>> How reproducable is the problem with the above testcase? I'm >>>> running >> >>>> 100's of iterations without reproducing the problem. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> >>> >> > From rtlane01 at comcast.net Tue Aug 1 19:22:03 2006 From: rtlane01 at comcast.net (Randall T. Lane) Date: Tue, 01 Aug 2006 21:22:03 -0400 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] Message-ID: <44CFFE3B.90001@comcast.net> Rxtx Community: Please see my e-mail to Trent. Does anyone have any experience using rxtx to successfully communicate with hardware via USB? Thanks. Randy Lane -------------- next part -------------- An embedded message was scrubbed... From: Trent Jarvi Subject: Re: Help with RxTx for USB Communication Date: Tue, 1 Aug 2006 18:49:13 -0600 (MDT) Size: 3300 Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060801/9bbbc255/HelpwithRxTxforUSBCommunication-0327.mht From naranjo.manuel at gmail.com Sun Aug 6 16:59:28 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Sun, 06 Aug 2006 19:59:28 -0300 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44CFFE3B.90001@comcast.net> References: <44CFFE3B.90001@comcast.net> Message-ID: <44D67450.8010100@gmail.com> Randy: I have been able to communicate to AIRcable USB Bluetooth Dongle, with success. I'm not sure which are the options that you have to send to RXTX library, but you can indeed. Check that you do not have the port avaible for much long. I have heard of a problem with WinXP that it simply turn off virtual ports when they are too much long with out activity. If you want I can send you my code, because it is avaible under GPL, the new release is not avaible at AIRcable web site, but it should in short time. Regards, Manu > Rxtx Community: > > Please see my e-mail to Trent. Does anyone have any experience using > rxtx to successfully communicate with hardware via USB? > > Thanks. > > Randy Lane > > ------------------------------------------------------------------------ > > Asunto: > Re: Help with RxTx for USB Communication > De: > Trent Jarvi > Fecha: > Tue, 1 Aug 2006 18:49:13 -0600 (MDT) > Para: > "Randall T. Lane" > > Para: > "Randall T. Lane" > CC: > taj at www.linux.org.uk > > > On Tue, 1 Aug 2006, Randall T. Lane wrote: > >> Trent, >> >> I am working on a project written in Java (1.5) and need to >> communicate to an external device via a USB port. >> >> I have downloaded rxtx-2.1-7-bins-r2.zip from www.rxtx.org and setup >> a Java test project to learn how to use rxtx. I am able to list the >> serial ports available, however rxtx does not recognize my USB port. >> I am running on Windows XP. Here is some output from my test project >> ... >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> COM1 - Serial >> COM3 - Serial >> LPT1 - Parallel >> >> I would appreciate any help you could provide in getting rxtx to >> allow me to communicate via my USB port. >> >> Here is my code, if that would help. >> >> public static void main(String[] args) { >> listPorts(); >> // The listPorts() and getPortTypeName() methods are used for >> port identification. >> static void listPorts() >> { >> Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); >> while ( portEnum.hasMoreElements() ) >> { >> CommPortIdentifier portIdentifier = (CommPortIdentifier) >> portEnum.nextElement(); >> System.out.println(portIdentifier.getName() + " - " + >> getPortTypeName(portIdentifier.getPortType()) ); >> } } >> static String getPortTypeName ( int portType ) >> { >> switch ( portType ) >> { >> case CommPortIdentifier.PORT_I2C: >> return "I2C"; >> case CommPortIdentifier.PORT_PARALLEL: >> return "Parallel"; >> case CommPortIdentifier.PORT_RAW: >> return "Raw"; >> case CommPortIdentifier.PORT_RS485: >> return "RS485"; >> case CommPortIdentifier.PORT_SERIAL: >> return "Serial"; >> default: >> return "unknown type"; >> } >> } >> >> Thanks. >> >> Randy Lane >> > > Hi Randy > > The rxtx mail list is a better place to ask as there are more eyes. > I'm swamped with work. > > Be sure to look to see that your serial port dongle shows up as a > serial port in device manager and no other applications have it open. > USB serial dongles do work with rxtx. Some are less complete than > others. > > -- > Trent Jarvi > tjarvi at qbang.org > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From eddythejekyll at gmail.com Sun Aug 6 23:31:45 2006 From: eddythejekyll at gmail.com (Ed) Date: Sun, 6 Aug 2006 23:31:45 -0600 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? Message-ID: I have written a simple client server (RMI) application without using RxTx where the server controls a parallel port simply by addressing the port and banging the bits in order to drive a relay. It also reads the port's. I am doing this by making Runtime.exec calls to a binary that actually does the parallel port bit banging and reading. However, I'd like to use RxTx so it is a pure Java application, and I've so far installed and figured out how to discover the ports, but I'm having trouble finding good examples or some howto type documentation for this. I did find the two examples on the Wiki: one for serial IO and the other to discover the ports on a system. As I said, I have so far installed RxTx and gotten it to compile and run and I can identify the ports. When I run the server I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found Ports! Found port COM1 Found port COM3 Found port LPT1 LPT1 Not Currently owned EASSwitch Server starting. EASSwitch is bound. Server Ready. So it looks like thing are installed and working, but I feel all dressed up and no idea how to proceed. Basically, I just want to be able to toggle the data lines on the parallel port and read them. Very simple. No parallel printer type usage. Are there any examples I can work off of? If so, please advise. Thank you. -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060806/c7e39898/attachment-0327.html From hambyiii at hotmail.com Sun Aug 6 23:53:54 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Mon, 07 Aug 2006 05:53:54 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Message-ID: Hi, sorry I took the weekend to reply, but I was away for the last couple of days. Unfortunately I cannot send the full stack trace yet. The problem is not, unfortunately, happening on my computer, but on a clients computer, which I will go and visit today. I will hopefully be able to get a stack trace then. As to the physical connection, tt is indeed a USB from the computer, connected to a 9 pin serial device that connects to the hard-ware. My java version is 1.5.06 >From: "Kharbanda, Pawan" >Reply-To: RXTX Developers and Users >To: "RXTX Developers and Users" >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 09:15:24 -0600 > >Keith, > Please send the full stack trace of the exception, may be I can help >you. On Trent's question regarding physical 'Serial Port', do you mean >you have a USB(Connected to Client Machine) to 9 Pin Serial >cable(Connected to H/W device)? > >Also please mention which java version you are using? > >Thanks >Pawan Kharbanda > > >-----Original Message----- >From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >Of Keith Thorne >Sent: Friday, August 04, 2006 7:52 AM >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream > >The physical serial port is actually a USB connection that is then >changed to a "virtual serial port", so I can use the serial port >protocols to connect to it. The other end of the connection is a >hardware device that is constantly turned on. I am not sure about the >port 'vanishing'...we have another piece of software that came with the >hardware device, which we can test the device (and with it the virtual >serial port) with. This has no problem connecting to the serial port or >writing to/reading from the device. >It is only when my software is run, that the error occurs. Like I have >said, my software (using rxtx) is connecting to the serial port >successfully, but it is when I try and write to the serial port that I >get the error. > >Although to be truthful, I am not absolutely certain if the error is >happening on the oStream.write() or the oStream.flush(). I only think it >is the write(), because that is where the writeArray() function is >called. > >thanks >Keith > > > >From: Trent Jarvi > >Reply-To: RXTX Developers and Users > >To: RXTX Developers and Users > >Subject: Re: [Rxtx] error getting InputStream > >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > > > > >Hi Keith > > > >Can you tell us more about the physical serial port? Might it be > >'vanishing?' > > > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > > > Hi, > > > > > > I know I am replying to myself a lot at the moment, but more > > > information > >has > > > come to light (These errors are actually happening on a client > > > machine, > >on > > > software that has worked for the past month, and only now has > > > started to fail, which is why I am a little slow finding things out) > > > > > > The errors I have already written about are only symptoms of an > > > orignal error. The original error occurs the first time I try to > > > WRITE thte > > > OutputStream: > > > > > > OutputStream oStream = serialPort.getOutputStream(); > > > serialPort.notifyOnOutputEmpty(true); > > > > > > byte[] bs = encodeMessage(configString.toString()); > > > > > > oStream.write(bs); > > > oStream.flush(); > > > > > > The error occurs on oStream.write(bs); and is: > > > > > > Input/output error in writeArray > > > > > > Now writeArray is native code, so I have no idea what is going on >there. > >Any > > > help would be appreciated > > > Thanks > > > Keith > > > > > > > > >> From: "Keith Thorne" > > >> Reply-To: RXTX Developers and Users > > >> To: rxtx at qbang.org > > >> Subject: Re: [Rxtx] error getting InputStream > > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > > >> > > >> Okay, I made a little mistake in my last message. > > >> > > >> The error is not occuring where I thought it was. Instead it is > >occuring > > >> when I do the following: > > >> > > >> byte[] readBuffer = new byte[128]; > > >> > > >> try { > > >> > > >> int numBytes = 0; > > >> try { > > >> Thread.sleep(500); > > >> } > > >> catch (InterruptedException e) > > >> {} > > >> > > >> while (inputStream.available() > 0) > > >> { > > >> numBytes = inputStream.read(readBuffer); > > >> } > > >> > > >> processReceivedData(readBuffer, numBytes); } catch (IOException > > >> e) { > > >> System.out.println(e.getMessage()); > > >> } > > >> > > >> So I guess the error is happening on the > > >> inputStream.read(readBuffer) > > >> > > >> again, any help is appreciated and again, thanks in advance Keith > > >> > > >>> From: "Keith Thorne" > > >>> Reply-To: RXTX Developers and Users > > >>> To: rxtx at qbang.org > > >>> Subject: [Rxtx] error getting InputStream > > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > > >>> > > >>> Hi, > > >>> > > >>> I have written a program in Java for Windows xp using RXTX (which > > >>> is > >why > > >> I > > >>> am using this mailing list :). However, I am getting a problem. I > > >>> am connecting to a serial port, like so: > > >>> private CommPortIdentifier portID; > > >>> > > >>> private boolean openPort(String selectedPort) > > >>> { > > >>> boolean portFound = false; > > >>> Enumeration portList; > > >>> > > >>> portList = CommPortIdentifier.getPortIdentifiers(); > > >>> > > >>> while (portList.hasMoreElements()) > > >>> { > > >>> portID = (CommPortIdentifier) portList.nextElement(); > > >>> if (portID.getPortType() == > >CommPortIdentifier.PORT_SERIAL) > > >>> { > > >>> if (portID.getName().equals(selectedPort)) > > >>> { > > >>> portFound = true; > > >>> break; > > >>> } > > >>> } > > >>> } > > >>> > > >>> return portFound; > > >>> } > > >>> > > >>> and then I try and get the serial port input stream (leaving out > > >>> the > >try > > >>> and > > >>> catch for the sake of space): > > >>> > > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", > >2000); > > >>> InputStream inputStream = serialPort.getInputStream(); > > >>> > > >>> but on the getInputStream() I get the following error message: > > >>> > > >>> Bad file descriptor in nativeavailable > > >>> > > >>> I cannot figure out where it is going wrong...anyone any ideas. A > >quick > > >>> answer would be wonderful, as I am kinda under the hammer to get > > >>> this > > >> fixed > > >>> quickly > > >>> > > >>> Thanks in Advance > > >>> Keith > > >>> > > >>> > > >>> _______________________________________________ > > >>> Rxtx mailing list > > >>> Rxtx at qbang.org > > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > > >> > > >> > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Aug 7 06:22:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:22:03 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: Hmm.. I left the test running went I went home Saturday. It looks like something did show up after ~30k iterations. I'll look at it more in my free time. Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS5 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 29417 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 29417 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 29417 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00002aab14c2ec63, pid=20573, tid=1095125344 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6c63] initialise_event_info_struct+0x63 # [thread 1087756640 also had an error] Port /dev/ttyS5 is Opened 0x01 Sent [thread 1089861984 also had an error] Port /dev/ttyS4 is Opened 0x01 Sent [thread 1090914656 also had an error] # An error report file with more information is saved as [thread 1090914656 also had an error] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted On Sat, 5 Aug 2006, Trent Jarvi wrote: > > I'd stick a couple $15 dual port serial boards in the machine to see if its > kernel driver specific. > > I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more > problematic. They do not get the same number of eyes looking for problems. > > You could try putting > > #undef TIOCSERGETLSR > #undef TIOCGICOUNT > > in the very top of SerialImp.h or one or the other to flip bits of code off > and on. > > The kernel here is 2.6.11.4-20a-smp from Suse. > glibc is 2.3.4-23.4 from Suse > the jre is 1.5.0_06-b05 from Sun. > > The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC > ram. > > You should be able to reproduce what I'm seeing then go from there. I don't > think I'm going to see this problem without having the same cornercase > hardware you have. Maybe we can work that out off the list but I doubt I'm > going to find it in rxtx at this point. > > I have seen problems in the past were kernel structs don't match user space > struct and bad things happen but I was including a kernel struct to get > functionality that had not made its way into user space at the time. > > The only thing I may be missing is that when I write 0x01 out the port, > nothing comes back. That was not specified but you could easily disconnect > anything connected to the ports to see if that changes anything. > > rxtx is far from bug free but I do not see anything yet. > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, >> I am able to constantly replicate almost everytime even when I have >> locks disabled. Don't know the reason why you are not able to on your >> environment. Any suggestions??????? >> >> >> Cycle No (Thread ::: /dev/cuf04) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> Exiting Thread ::: /dev/cuf03 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> Port /dev/cuf01 is Opened >> 0x01 Sent >> Port /dev/cub01 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Closed >> Port /dev/cuf02 is Closed >> Port /dev/cuf03 is Closed >> Port /dev/cuf04 is Closed >> Port /dev/cub01 is Closed >> Exiting Thread ::: /dev/cuf03 >> Exiting Thread ::: /dev/cuf02 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 8 >> Exiting Thread ::: /dev/cuf04 >> Exiting Thread ::: /dev/cuf01 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf04) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 >> # >> # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 >> # >> # An error report file with more information is saved as >> hs_err_pid21386.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> Aborted >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:19 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Lockfiles are a compile time option. I've turned them on now, corrected >> a mistake resulting in only 3 ports being used and now have it going >> through a few hundred iterations again without a crash. >> >> To disable lockfiles.. >> >> ./configure --disable-lockfiles && make install >> >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> Port /dev/ttyS5 is Closed >> Exiting Thread ::: /dev/ttyS1 >> Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: >> /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting >> Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port >> /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> >> >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, How can you turn off the lock files? I can try using that. I >>> never tried that, I thought you can't turn off the file locking. >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 1:06 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> You may try 4 ports instead of 5 to make sure thats not the issue. >>> >>> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >>> 2.6.11.4-20a-smp >>> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >>> java -version java version "1.5.0_06" >>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >>> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >>> >>> I'm using rxtx 2.1-7 (final) with default configuration except >>> lockfiles are disabled. I gathered that you are doing your own >> resource locking. >>> >>> ... >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> Port /dev/ttyS4 is Closed >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> ... >>> >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>>> version >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:52 PM >>>> To: Kharbanda, Pawan >>>> Cc: Trent Jarvi; RXTX Developers and Users >>>> Subject: RE: Port Locking / JVM Crashing >>>> >>>> >>>> Whats a few times? I've got 4 ports here and have run it a few >>>> thousand iterations. >>>> >>>> Is that true for you if you run it with just four of your DIGI ports? >>>> >>>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>>> >>>>> You need to run it few times. More the number of ports, more >>>>> frequently you can reproduce. With just 2 ports it will be hard to >>>>> reproduce frequently. >>>>> >>>>> ~pk >>>>> >>>>> -----Original Message----- >>>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>>> Sent: Saturday, August 05, 2006 12:33 PM >>>>> To: Kharbanda, Pawan >>>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>>> Subject: Re: Port Locking / JVM Crashing >>>>> >>>>>> I am also attaching a Test Class to replicate the problem. You need >> >>>>>> to >>>>> >>>>>> modify the class and add your systems Serial ports into the code >>>>>> and >>> >>>>>> execute. >>>>>> >>>>>> java TestOpenClosePort 100 >>>>>> >>>>>> It will open and close all the serial ports 100 times in there own >>>>>> thread. >>>>>> >>>>>> Please let me know, I will be available thru out this weekend and >>>>>> can >>>> >>>>>> help you as much as I can with testing. >>>>>> >>>>> >>>>> How reproducable is the problem with the above testcase? I'm >>>>> running >>> >>>>> 100's of iterations without reproducing the problem. >>>>> >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> >>>> >>> >> > From iinjlv01 at gmail.com Mon Aug 7 06:22:07 2006 From: iinjlv01 at gmail.com (J LV) Date: Mon, 7 Aug 2006 14:22:07 +0200 Subject: [Rxtx] Data lost or Slow sampling Message-ID: Hello I am using RXTX to comm with a motion controller using Serial Port and i can write the commands using SerialPort or RXTXPort without problems, but when i try write and read at high sampling rate, for example to know the position and speed at every moment of a trajectory, i obtain a very irregular response times. I am using the most simple algorimth: 1-Write the command "is trajectory finished?" and wait for SerialPortEvent.DATA_AVAILABLE 2-Read the InputStreamReader of serial port while not empty 3-If trajectory finished then stop program, else, continue 4-Read actual time using System.currentTimeMillis() (t0) 5-Write the command "give me position" and wait for SerialPortEvent.DATA_AVAILABLE 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) 7-Read the InputStreamReader of serial port while not empty 8-Save position in Vector or ArrayList and repeat from 1 I don't know if the problem is the RXTX, my program or the motion controller hardware but i have response times from 16 millis to 78 millis at 19200 bauds!. I am using SwingWorked to threading SerialPort reading/writing process. Any idea or similar data leak problem? Thanks for RXTX project and sorry for my badde english! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/909a4cb3/attachment-0327.html From tjarvi at qbang.org Mon Aug 7 06:50:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:50:10 -0600 (MDT) Subject: [Rxtx] Data lost or Slow sampling In-Reply-To: References: Message-ID: On Mon, 7 Aug 2006, J LV wrote: > Hello > > I am using RXTX to comm with a motion controller using Serial Port and i can > write the commands using SerialPort or RXTXPort without problems, but when i > try write and read at high sampling rate, for example to know the position > and speed at every moment of a trajectory, i obtain a very irregular > response times. I am using the most simple algorimth: > 1-Write the command "is trajectory finished?" and wait for > SerialPortEvent.DATA_AVAILABLE > 2-Read the InputStreamReader of serial port while not empty > 3-If trajectory finished then stop program, else, continue > 4-Read actual time using System.currentTimeMillis() (t0) > 5-Write the command "give me position" and wait for > SerialPortEvent.DATA_AVAILABLE > 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) > 7-Read the InputStreamReader of serial port while not empty > 8-Save position in Vector or ArrayList and repeat from 1 > > > I don't know if the problem is the RXTX, my program or the motion controller > hardware but i have response times from 16 millis to 78 millis at 19200 > bauds!. I am using SwingWorked to threading SerialPort reading/writing > process. > > Any idea or similar data leak problem? > > Thanks for RXTX project and sorry for my badde english! > This can be platform dependant. What you may do for a starting point is use a loopback connection and time the same thing at 19200. Write the date, wait for data available, read the data. I would expect from write to data available to take around 10 ms from past experiences. You can experiment with turning on and off buffering in the port settings of the OS, if the OS supports more realtime like interrupts, that could help. You have a java schedual and the kernel schedual. Serial interrupts traditionally have very high priority but modern OSs tend to realize thats not good for GUIs, ... and delay responding to the interrupts. You should be able to have usec response times in a realtime OS. Windows and Linux are not typically setup as realtime OSs. For comparison, the last time I looked which was about 5 years ago, windows NT4 came back with data available in 8 ms and Linux came back in 10 ms. I would be interested in seeing what you get today. -- Trent Jarvi tjarvi at qbang.org From gergg at cox.net Mon Aug 7 09:21:56 2006 From: gergg at cox.net (Gregg Wonderly) Date: Mon, 07 Aug 2006 10:21:56 -0500 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? In-Reply-To: References: Message-ID: <44D75A94.9030205@cox.net> Ed wrote: > Are there any examples I can work off of? If so, please advise. Just read the javax.comm javadocs. You need to take the parallel port and write values to it based on which bits of which lines you want on and off. Gregg Wonderly From pete.flugstad at gmail.com Mon Aug 7 09:36:19 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 7 Aug 2006 10:36:19 -0500 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44D67450.8010100@gmail.com> References: <44CFFE3B.90001@comcast.net> <44D67450.8010100@gmail.com> Message-ID: <84d4a6d50608070836v97e9a29q96e98441ea903ac7@mail.gmail.com> FYI, I'm talking to a USB<->Serial dongle just fine under Windows XP Pro. I did have to install a driver for the thing - Windows XP by default, did not recognize it. Once installed, it just showed up as another COM port, and I've been pushing data over it with no problems. Pete From savagobr at yahoo.com Mon Aug 7 10:13:06 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Mon, 7 Aug 2006 09:13:06 -0700 (PDT) Subject: [Rxtx] Port Locking / JVM Crashing: 2 ports (Serial + usb) Message-ID: <20060807161306.9648.qmail@web53803.mail.yahoo.com> Trent This is curious, since I did reproduced the aformentioned bug using only 2 ports: /dev/ttyS0 and /dev/ttyUSB0. It only need to run for 500 times: $ java -cp . TestOpenClosePort 500 500 Port /dev/ttyS0 is Closed Excpetion ::: Thread ::: /dev/ttyUSB0null Exiting Thread ::: /dev/ttyUSB0 Cycle No (Thread ::: /dev/ttyUSB0) ::::::: 227 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 184 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x203d2044, pid=32368, tid=2986859424 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing) # Problematic frame: # C 0x203d2044 # # An error report file with more information is saved as /tmp/hs_err_pid32368.log # # If you would like to submit a bug report, please visit: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Best regards Savago ps: Test environment $ uname -a Linux localhost.localdomain 2.6.15-1.2054_FC5 #1 Tue Mar 14 15:48:33 EST 2006 i686 i686 i386 GNU/Linux $ java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) $gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.1 20060525 (Red Hat 4.1.1-1) --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/c6ca8094/attachment-0326.html From Pawan.Kharbanda at dot.state.co.us Mon Aug 7 17:23:25 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 7 Aug 2006 17:23:25 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Trent, I think I got the problem fixed after some code changes in the C (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the staging environment (with 10 devices) with real time data and haven't seen a JVM lock/ Port locking since last night. I am going to do further stress testing and will send all my code changes and my findings in next few days. I believe the problem was causing due to the digi drivers and how the Linux kernel talked to it, so after making some code changes and synchronization fixes, I got it to work. I am keeping my fingers crossed :) Thanks for all your help. You have been a great help. Will keep you posted. Cheers ~pk PS : We are going to test my new RXTX changes with the 2.6 Red Hat kernel (currently using 2.4.21-37.ELsmp) too. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 5:08 PM To: Kharbanda, Pawan Subject: RE: Port Locking / JVM Crashing Hi Pawan As mentioned I did reproduce the error but after several hours of cycles. I'm looking at RXTXPort.java and thinking about what may be happening. The error is in the C layer but it may be preventable in the java code. lets say two closes are overlapping or an operation is trying to happen while another port is closing. The structure may be out of sync by the time the code using the structure in another thread gets to the event info struct. So I'm wondering if synchronization in RXTXPort() and close() may help you. A second thing that may help is you can put printf("got here\n"); in each of the lines in initialize event info struct to verify that the problem is in walking the linked list. Thats my suspicion. So a properly timed close() while calling the constructor may be catching rxtx off guard. You can synchronize to test that and it may do away with the problem. From tjarvi at qbang.org Mon Aug 7 18:01:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 18:01:54 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Message-ID: Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do further > stress testing and will send all my code changes and my findings in next > few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to happen > while another port is closing. The structure may be out of sync by the > time the code using the structure in another thread gets to the event > info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may do > away with the problem. > From Pawan.Kharbanda at dot.state.co.us Tue Aug 8 13:49:14 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 8 Aug 2006 13:49:14 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Trent, I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and have absolutely no problem with JVM crashing or Port Locking even after 10000 operations (now I am trying 100,000 :). This is all with the original RXTX 2.1.7 (final) api's without any of my fixes that I have been trying for last 2-3 weeks. I will suggest that we update the INSTALL or Readme file accompnying the RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: 82000685_G 02/02/2006). This should helped everybody using the RXTX API's with RedHat Linux atleast. Regards Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 6:02 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do > further stress testing and will send all my code changes and my > findings in next few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers > crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to > happen while another port is closing. The structure may be out of > sync by the time the code using the structure in another thread gets > to the event info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may > do away with the problem. > From jimo at earthlink.net Wed Aug 9 21:21:00 2006 From: jimo at earthlink.net (Jim Owen) Date: Wed, 9 Aug 2006 20:21:00 -0700 Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat Message-ID: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Hi All, I've run into some difficulties with rxtx that have me baffled and need some help. I have an application that has used earlier versions of rxtx successfully and on a variety of platforms. We recently needed to deploy this application into an environment where we could not utilize lock files. I pulled down the 2.0.7 pre1 source distribution and executed configure with --disable-lockfiles. I then executed make and make install. When I execute the program, as root, I get the following error: ************************************************************************ Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) # Problematic frame: # C 0x00001004 # # An error report file with more information is saved as hs_err_pid20151.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # **************************************************************************** If I execute as a normal user, I get no errors, but no ports listed: (Using an earlier version, I get a serial and parallel port listed.) **************************************************************************** [jim at linuxDev ingenicoApp]$ java VerifyCommBuild Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Some ports appear to have been found, let's try to enumerate them. Complete. **************************************************************************** When I built rxtx, there was a warning given of the following: **************************************************************************** conftest.c: In function 'main': conftest.c:6: warning: incompatible implicit declaration of built-in function 'printf' conftest.c:7: warning: incompatible implicit declaration of built-in function 'exit' WARNING: Kernel include files do not match the current kernel **************************************************************************** uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux JAVA_HOME=/usr/java/j2sdk1.4.2_11 javax.comm.properties: Driver=gnu.io.RXTXCommDriver Here's the code for VerifyCommBuild.java that I'm using to test: **************************************************************************** import javax.comm.*; import java.util.Enumeration; /** * A quick app to check that the javax.comm (Serial) Communications extension has been properly * installed and configured on this machine. * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. */ public class VerifyCommBuild { public static void main(String args[]) { Enumeration ports; System.out.println("Verifying Comm Build Environment"); try { ports = CommPortIdentifier.getPortIdentifiers(); if (ports == null) { System.out.println("No comm ports found!"); return; } System.out.println("Some ports appear to have been found, let's try to enumerate them."); while (ports.hasMoreElements()) { System.out.println("Here is a port [" + ((CommPortIdentifier)ports.nextElement()).getName() + "]"); } } catch (Exception e) { System.out.println("Failed to enumerate ports [" + e.getMessage() + "]"); e.printStackTrace(); } System.out.println("Complete."); } } **************************************************************************** Any suggestions as to what I'm missing? Thanks, Jim Owen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060809/92503a81/attachment-0324.html From tjarvi at qbang.org Thu Aug 10 05:39:36 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 05:39:36 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Message-ID: On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even after > 10000 operations (now I am trying 100,000 :). This is all with the > original RXTX 2.1.7 (final) api's without any of my fixes that I have > been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying the > RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp > and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From oliver.archner at bayceer.uni-bayreuth.de Wed Aug 9 06:13:36 2006 From: oliver.archner at bayceer.uni-bayreuth.de (Oliver Archner) Date: Wed, 09 Aug 2006 14:13:36 +0200 Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() Message-ID: <44D9D170.5020806@bayceer.uni-bayreuth.de> Dear Users, i would like to send a byte to a parallel device. The following piece of code works well but throws an IOException in LPRPort$ParallelOutputStream.write() saying that everything is ok ?! Oliver import java.io.*; import gnu.io.*; public class Test { public static void main(String[] args) { RXTXCommDriver TxPort = new RXTXCommDriver(); ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", CommPortIdentifier.PORT_PARALLEL); OutputStream oStream = null; try { oStream = pPort.getOutputStream(); oStream.write((byte)0x51); } catch (IOException e) { e.printStackTrace(); } finally { try { if (oStream != null) oStream.close(); } catch (IOException e) { e.printStackTrace(); } } } } Output: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Der Vorgang wurde erfolgreich beendet. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at Test.main(Test.java:12) From tjarvi at qbang.org Thu Aug 10 18:12:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 18:12:27 -0600 (MDT) Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() In-Reply-To: <44D9D170.5020806@bayceer.uni-bayreuth.de> References: <44D9D170.5020806@bayceer.uni-bayreuth.de> Message-ID: On Wed, 9 Aug 2006, Oliver Archner wrote: > Dear Users, > > i would like to send a byte to a parallel device. > The following piece of code works well but throws an IOException in > LPRPort$ParallelOutputStream.write() saying that everything is ok ?! > > Oliver > > > import java.io.*; > import gnu.io.*; > > public class Test { > > public static void main(String[] args) { > RXTXCommDriver TxPort = new RXTXCommDriver(); > ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", > CommPortIdentifier.PORT_PARALLEL); > OutputStream oStream = null; > try { > oStream = pPort.getOutputStream(); > oStream.write((byte)0x51); > } catch (IOException e) { > e.printStackTrace(); > } finally { > try { > if (oStream != null) oStream.close(); > } catch (IOException e) { > e.printStackTrace(); > > } > } > > } > } > > Output: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Der Vorgang wurde erfolgreich beendet. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at Test.main(Test.java:12) WriteFile is returning a negative value or 0. I do not know what that exception is saying but it should be an IO Exception. The native code in question is line 405 in ParallelImp.c. If you find the documentation pointing out how the code is wrong, we can fix it. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 08:12:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 09:12:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question Message-ID: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Hello, I'm trying to send data over a serial port using the RXTX libraries. I've got the binaries for Windows XP from qbang.org. On the receiving side, I'm using event notification (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial Ports InputStream. Similarly on the transmist side, I use SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. First question: does this make sense? The code was largely adopted from an existing Windows C++ program and that's more or less how it operated (overlapped io using ReadFile, WriteFile, GetOverlappedResult, Events, etc). Second question: in a small standalone test program I wrote, everything seems to work just fine - whenever SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good chunk of data available (I explicitly set the in/out buffers to 1024 bytes) to read. However, when I pull my "library" into a much larger environment (OSGI framework based, but same JVM/OS/etc), whenever SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a byte or two available. Needless to say, this really kills performance. Everything appears to still operate properly, just really, really slowly. So, has anyone seen this problem before? I haven't dived into the details of RXTX library, and I'm wondering what the mechanism is here? How does the RXTX thread determine when to issue the SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to tweak in RXTX or the JVM to get this to operate more like the small test program? Seems like I want RXTX to call me back _less_ often. Thanks, Pete From tjarvi at qbang.org Fri Aug 11 09:55:23 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 09:55:23 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Hello, > > I'm trying to send data over a serial port using the RXTX > libraries. I've got the binaries for Windows XP from qbang.org. > > On the receiving side, I'm using event notification > (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial > Ports InputStream. Similarly on the transmist side, I use > SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. > > First question: does this make sense? The code was largely adopted > from an existing Windows C++ program and that's more or less how it > operated (overlapped io using ReadFile, WriteFile, > GetOverlappedResult, Events, etc). > > Second question: in a small standalone test program I wrote, > everything seems to work just fine - whenever > SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good > chunk of data available (I explicitly set the in/out buffers to 1024 > bytes) to read. > > However, when I pull my "library" into a much larger environment > (OSGI framework based, but same JVM/OS/etc), whenever > SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a > byte or two available. Needless to say, this really kills > performance. Everything appears to still operate properly, just > really, really slowly. > > So, has anyone seen this problem before? I haven't dived into the > details of RXTX library, and I'm wondering what the mechanism is here? > How does the RXTX thread determine when to issue the > SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to > tweak in RXTX or the JVM to get this to operate more like the small > test program? > Seems like I want RXTX to call me back _less_ often. > Hi Pete RXTX is doing overlapped IO in termios.c. In this file we map the windows functionality to termios (mostly POSIX). From there, we just talk termios to all platforms. What I guess is happening is the eventloop is waiting a specified amount of time. As you application uses more cpu cycles, you observe the difference in behavior. You could go into the C code and change this after looking at the eventLoop() code in serialImp.c and following that to the serial_ioctl() and serial_select() in termios.c Another option is to go into RXTXPort.java and put a sleep in the sendEvent() code. This way you would not have to recompile the native code (not very easy at this point). -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 13:27:36 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:27:36 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > Another option is to go into RXTXPort.java and put a sleep in the > sendEvent() code. This way you would not have to recompile the native > code (not very easy at this point). Are the instructions in the INSTALL file still valid? If so, it wasn't very hard to build it (I already had MinGW installed). Everything seemed to build just fine. Haven't tried to install/use it yet, but it wasn't a big deal (assuming those instructions were correct. Thanks, Pete From pete.flugstad at gmail.com Fri Aug 11 13:42:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:42:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, but there doesn't appear to be a way to select that via RXTX (which appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control is selected). Is there a way I'm not seeing? Thanks, Pete From eddythejekyll at gmail.com Fri Aug 11 15:20:44 2006 From: eddythejekyll at gmail.com (Ed) Date: Fri, 11 Aug 2006 15:20:44 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion Message-ID: I'm trying to read and write a parallel port on a standard (Dell) pc running RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. I'm having problems getting rxtx to return a port enumeration from getPortIdentifiers. I'm using a file PortChooser.java as a test file to get things going. This is from the Java CookBook 2nd edition (Chapter 12). The call // get list of ports available on this particular computer, // by calling static method in CommPortIdentifier. Enumeration pList = CommPortIdentifier.getPortIdentifiers(); returns a null pList; I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and compile without --disable-lockfiles I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ... When I compile with --disable-lockfiles the call to getPortIdentifiers simply returns a null Enumeration. I've read the documention and threads about this issue and I feel like I've tried everything, so at the moment I'm stumped. I can supply any further info that may help. Thanks in advance. Ed -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060811/80c4eeec/attachment-0322.html From tjarvi at qbang.org Fri Aug 11 18:29:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:29:48 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > On 8/11/06, Trent Jarvi wrote: >> Another option is to go into RXTXPort.java and put a sleep in the >> sendEvent() code. This way you would not have to recompile the native >> code (not very easy at this point). > > Are the instructions in the INSTALL file still valid? If so, it > wasn't very hard to build it > (I already had MinGW installed). Everything seemed to build just > fine. Haven't tried to install/use it yet, but it wasn't a big deal > (assuming those instructions were correct. > Hi Pete The instructions are correct. You will want to make sure that the exports worked. If the library does not work properly, then the exports failed. The exports are currently generated with nm, sed and grep in the Makefile which is often commented out. If the def file is old, it will cause problems. You should be good to go then. Look at the serial_select and eventLoop code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:33:32 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:33:32 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > but there doesn't appear to be a way to select that via RXTX (which > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > is selected). > > Is there a way I'm not seeing? > Hi Pete I'm guessing I didn't know the difference. At the time, I really didn't have windows API documentation. I just had some pages I found with altivista/google. Later microsoft made their documentation available on msdn or I learned about it. For rxtx, the calls need to be platform neutral. So if you see how to do each in termios, then we can get it going. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:45:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:45:24 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Fri, 11 Aug 2006, Ed wrote: > I'm trying to read and write a parallel port on a standard (Dell) pc running > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. > > I'm having problems getting rxtx to return a port enumeration from > getPortIdentifiers. I'm using a file > PortChooser.java as a test file to get things going. This is from the Java > CookBook 2nd edition (Chapter 12). The call > > // get list of ports available on this particular computer, > // by calling static method in CommPortIdentifier. > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > returns a null pList; > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and > compile without --disable-lockfiles I get: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > ... > > When I compile with --disable-lockfiles the call to getPortIdentifiers > simply returns a null Enumeration. > > I've read the documention and threads about this issue and I feel like I've > tried everything, so at the moment I'm stumped. > > I can supply any further info that may help. > > Thanks in advance. > > Ed > Hi Ed You may want to check the permissions of /dev/lp*. Also make sure lp or your kernel support for lp is loaded. It should show up in dmesg and lsmod. For my laptop with no printer port enabled in BIOS is see: lp: driver loaded but no devices found in desg |grep lp [] $ ls -l /dev/lp* crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 here root and group lp can read and write. Normal users cannot. Try a simple read as a user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: Permission denied Fix as root [] chmod 666 /dev/lp* [] $ ls -l /dev/lp* crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 Now as user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: No such device or address So this is saying there is no lp0 on my laptop. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:58:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:58:31 -0600 (MDT) Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat In-Reply-To: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> References: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Message-ID: On Wed, 9 Aug 2006, Jim Owen wrote: > Hi All, > > I've run into some difficulties with rxtx that have me baffled and need > some help. > > I have an application that has used earlier versions of rxtx > successfully and on a variety of platforms. We recently needed to deploy > this application into an environment where we could not utilize lock files. > > I pulled down the 2.0.7 pre1 source distribution and executed configure > with --disable-lockfiles. I then executed make and make install. > > When I execute the program, as root, I get the following error: > > ************************************************************************ > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) > # Problematic frame: > # C 0x00001004 > # > # An error report file with more information is saved as hs_err_pid20151.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > **************************************************************************** > > If I execute as a normal user, I get no errors, but no ports listed: > (Using an earlier version, I get a serial and parallel port listed.) > > **************************************************************************** > [jim at linuxDev ingenicoApp]$ java VerifyCommBuild > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Some ports appear to have been found, let's try to enumerate them. > Complete. > **************************************************************************** > > When I built rxtx, there was a warning given of the following: > > **************************************************************************** > conftest.c: In function 'main': > conftest.c:6: warning: incompatible implicit declaration of built-in > function 'printf' > conftest.c:7: warning: incompatible implicit declaration of built-in > function 'exit' > > WARNING: Kernel include files do not match the current kernel > **************************************************************************** > > > uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 > Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux > > JAVA_HOME=/usr/java/j2sdk1.4.2_11 > > javax.comm.properties: Driver=gnu.io.RXTXCommDriver > > Here's the code for VerifyCommBuild.java that I'm using to test: > > > **************************************************************************** > import javax.comm.*; > import java.util.Enumeration; > /** > * A quick app to check that the javax.comm (Serial) Communications > extension has been properly > * installed and configured on this machine. > * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. > */ > public class VerifyCommBuild > { > public static void main(String args[]) > { > Enumeration ports; > System.out.println("Verifying Comm Build Environment"); > try > { > ports = CommPortIdentifier.getPortIdentifiers(); > if (ports == null) > { > System.out.println("No comm ports found!"); > return; > } > System.out.println("Some ports appear to have been found, let's > try to enumerate them."); > while (ports.hasMoreElements()) > { > System.out.println("Here is a port [" + > ((CommPortIdentifier)ports.nextElement()).getName() > + "]"); > } > } catch (Exception e) > { > System.out.println("Failed to enumerate ports [" + > e.getMessage() + "]"); > e.printStackTrace(); > } > System.out.println("Complete."); > } > } > Hi Jim This is a new one to me. Have you tried it on another system. Maybe something isnt sane in your toolchain. -- Trent Jarvi tarvi at qbang.org From eddythejekyll at gmail.com Sat Aug 12 11:45:39 2006 From: eddythejekyll at gmail.com (Ed) Date: Sat, 12 Aug 2006 11:45:39 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Trent, Right after I sent the results indicated below I re-ran the app and it apparently found the parallel port. The difference was that I set the permissions to : /dev: wildcard lp* crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 I'm still not sure how to interpret the dmesg and lsmod before. However I'm thinking that since the user now has permission to access the lp* port, a request to access it loaded the lp and parport modules automatically and allowed me access. Here's the output of lsmod now: ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp lp 5540 0 (autoclean) parport 21608 1 (autoclean) [parport_pc lp] and dmesg: ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp On node 0 totalpages: 161776 lp0: using parport0 (polling). So I think I'm good, and ready to move on the next steps. Thanks Trent! Ed On 8/12/06, Ed wrote: > > Thanks for the reply Trent. > > I'm on a different system today but am trying your suggestons. This is a > debian 3.1r2 system and I'm running jdk 1.5.0_04. > > Take a look below, but I think I have no parallel port support on this > kernel, however I never get the "No such device or address" return from the > cat call as you did so I'm not sure how to interpret the results. > > When I run the test program (PortChooser.java), the getPortIdentifiers > call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is > more than I found on the RedHat system. Incidently --disable-lockfiles has > no effect. > > It looks as though there is no parallel support in this kernel: > falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > On node 0 totalpages: 161776 > falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > > I'm a little confused by the results when I cat to the lp0 device. It > seems from the dmesg output that I don't have parallel printer support, but > when I cat to the lp0 device, I get permission denied if I'm non-root user > and input/output error if I'm root. Apparently this means I have the device, > but no support in the kernel? > > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > ed at falcon:~/src/workspace/EASServer/src$ su > Password: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > > Here's my lp* device permissions. > /dev: > wildcard lp* > crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > If I change it to > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I get: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > falcon:/home/ed/src/workspace/EASServer/src# exit > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > cat: /dev/lp0: Input/output error > ed at falcon:~/src/workspace/EASServer/src$ > > What do you think? Should I recompile the kernel or is it something else? > > By the way, I added the user ed to the lp and uucp groups on this system. > > Thanks again, > > Ed > > On 8/11/06, Trent Jarvi wrote: > > > > On Fri, 11 Aug 2006, Ed wrote: > > > > > I'm trying to read and write a parallel port on a standard (Dell) pc > > running > > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > > gates. > > > > > > I'm having problems getting rxtx to return a port enumeration from > > > getPortIdentifiers. I'm using a file > > > PortChooser.java as a test file to get things going. This is from the > > Java > > > CookBook 2nd edition (Chapter 12). The call > > > > > > // get list of ports available on this particular computer, > > > // by calling static method in CommPortIdentifier. > > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > > > > > returns a null pList; > > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure > > and > > > compile without --disable-lockfiles I get: > > > > > > Stable Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7 > > > Java lib Version = RXTX-2.1-7 > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > ... > > > > > > When I compile with --disable-lockfiles the call to getPortIdentifiers > > > > > simply returns a null Enumeration. > > > > > > I've read the documention and threads about this issue and I feel like > > I've > > > tried everything, so at the moment I'm stumped. > > > > > > I can supply any further info that may help. > > > > > > Thanks in advance. > > > > > > Ed > > > > > > > Hi Ed > > > > You may want to check the permissions of /dev/lp*. Also make sure lp or > > your kernel support for lp is loaded. It should show up in dmesg and > > lsmod. > > > > For my laptop with no printer port enabled in BIOS is see: > > > > lp: driver loaded but no devices found > > > > in desg |grep lp > > > > [] $ ls -l /dev/lp* > > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > here root and group lp can read and write. Normal users cannot. > > > > Try a simple read as a user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > > > > Fix as root > > > > [] chmod 666 /dev/lp* > > [] $ ls -l /dev/lp* > > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > Now as user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: No such device or address > > > > So this is saying there is no lp0 on my laptop. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > > > -- > > Ed > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060812/c2afe1f8/attachment-0321.html From tjarvi at qbang.org Sat Aug 12 14:01:52 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 12 Aug 2006 14:01:52 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Remember that the lp code expects a printer - or something like it. There is a line that specifies the printer is online. If you are doing hobby work, you will need to raise that line or loop it back to something that is raised. If you just try reading a port with no device connected and online, there will be an error while trying to read. This should be addressed in the mail-list archives. On Sat, 12 Aug 2006, Ed wrote: > Trent, > Right after I sent the results indicated below I re-ran the app and it > apparently found the parallel port. The difference was that I set the > permissions to : > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I'm still not sure how to interpret the dmesg and lsmod before. However I'm > thinking that since the user now has permission to access the lp* port, a > request to access it loaded the lp and parport modules automatically and > allowed me access. Here's the output of lsmod now: > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > lp 5540 0 (autoclean) > parport 21608 1 (autoclean) [parport_pc lp] > > and dmesg: > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > On node 0 totalpages: 161776 > lp0: using parport0 (polling). > > So I think I'm good, and ready to move on the next steps. > > Thanks Trent! > > Ed > > > On 8/12/06, Ed wrote: >> >> Thanks for the reply Trent. >> >> I'm on a different system today but am trying your suggestons. This is a >> debian 3.1r2 system and I'm running jdk 1.5.0_04. >> >> Take a look below, but I think I have no parallel port support on this >> kernel, however I never get the "No such device or address" return from the >> cat call as you did so I'm not sure how to interpret the results. >> >> When I run the test program (PortChooser.java), the getPortIdentifiers >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is >> more than I found on the RedHat system. Incidently --disable-lockfiles has >> no effect. >> >> It looks as though there is no parallel support in this kernel: >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp >> On node 0 totalpages: 161776 >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp >> >> I'm a little confused by the results when I cat to the lp0 device. It >> seems from the dmesg output that I don't have parallel printer support, but >> when I cat to the lp0 device, I get permission denied if I'm non-root user >> and input/output error if I'm root. Apparently this means I have the >> device, >> but no support in the kernel? >> >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> >> cat: /dev/lp0: Permission denied >> ed at falcon:~/src/workspace/EASServer/src$ su >> Password: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> >> Here's my lp* device permissions. >> /dev: >> wildcard lp* >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> If I change it to >> /dev: >> wildcard lp* >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> I get: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> falcon:/home/ed/src/workspace/EASServer/src# exit >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> ed at falcon:~/src/workspace/EASServer/src$ >> >> What do you think? Should I recompile the kernel or is it something else? >> >> By the way, I added the user ed to the lp and uucp groups on this system. >> >> Thanks again, >> >> Ed >> >> On 8/11/06, Trent Jarvi wrote: >> > >> > On Fri, 11 Aug 2006, Ed wrote: >> > >> > > I'm trying to read and write a parallel port on a standard (Dell) pc >> > running >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the >> > gates. >> > > >> > > I'm having problems getting rxtx to return a port enumeration from >> > > getPortIdentifiers. I'm using a file >> > > PortChooser.java as a test file to get things going. This is from the >> > Java >> > > CookBook 2nd edition (Chapter 12). The call >> > > >> > > // get list of ports available on this particular computer, >> > > // by calling static method in CommPortIdentifier. >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); >> > > >> > > returns a null pList; >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure >> > and >> > > compile without --disable-lockfiles I get: >> > > >> > > Stable Library >> > > ========================================= >> > > Native lib Version = RXTX-2.1-7 >> > > Java lib Version = RXTX-2.1-7 >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > ... >> > > >> > > When I compile with --disable-lockfiles the call to getPortIdentifiers >> > >> > > simply returns a null Enumeration. >> > > >> > > I've read the documention and threads about this issue and I feel like >> > I've >> > > tried everything, so at the moment I'm stumped. >> > > >> > > I can supply any further info that may help. >> > > >> > > Thanks in advance. >> > > >> > > Ed >> > > >> > >> > Hi Ed >> > >> > You may want to check the permissions of /dev/lp*. Also make sure lp or >> > your kernel support for lp is loaded. It should show up in dmesg and >> > lsmod. >> > >> > For my laptop with no printer port enabled in BIOS is see: >> > >> > lp: driver loaded but no devices found >> > >> > in desg |grep lp >> > >> > [] $ ls -l /dev/lp* >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > here root and group lp can read and write. Normal users cannot. >> > >> > Try a simple read as a user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: Permission denied >> > >> > Fix as root >> > >> > [] chmod 666 /dev/lp* >> > [] $ ls -l /dev/lp* >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > Now as user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: No such device or address >> > >> > So this is saying there is no lp0 on my laptop. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > >> >> >> >> -- >> >> Ed >> > > > > From pete.flugstad at gmail.com Mon Aug 14 07:51:41 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 08:51:41 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: <84d4a6d50608140651h3cb2266ap90c47780abace00@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > On Fri, 11 Aug 2006, Pete Flugstad wrote: > > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > > but there doesn't appear to be a way to select that via RXTX (which > > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > > is selected). > > I'm guessing I didn't know the difference. At the time, I really didn't > have windows API documentation. I just had some pages I found with > altivista/google. Later microsoft made their documentation available on > msdn or I learned about it. > > For rxtx, the calls need to be platform neutral. So if you see how to do > each in termios, then we can get it going. so, RTSCTS_IN/OUT at the COMM API is mapped to HARDWARE_FLOW_CONTROL in the POSIX layer. Which termios.c maps to RTS_CONTROL_HANDSHAKE and fOutxCtsFlow = true. Since termios.c is Windows only anway... Would it work to change the mapping in termios.c to map hardware flow control to RTS_CONTROL_TOGGLE? I just wondering (I'm going to go look, but there's a lot of code in there) if the code does anything special playing with flow control signals? Thanks, Pete From pete.flugstad at gmail.com Mon Aug 14 09:42:48 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 10:42:48 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> On 8/3/06, Trent Jarvi wrote: > On Thu, 3 Aug 2006, Pete Flugstad wrote: > > Okay, I can understand that, but from the PORTMON output, it looks > > like it's opening each port TWICE: > > I think this problem is in RXTXCommDriver.java. I've just not tracked it > down but it should be in the java code, not the native code so easy > enough to track down. Okay, I'm trying to track this down... Looks like the CommPortIdentifier static initializer loads RXTXCommDriver, and then calls RXTXDriver.initialize. But then CommPortIdentifier.getPortIdentifiers does the exact same thing. So that's where the two scans are coming from. I would guess that one or the other can be removed? Probably the one in the CommPortIdentifier.getPortIdentifiers? Doing so removes the 2nd scan. Pete PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) val = System.getProperty("gnu.io.SerialPorts"); Shouldn't the comparison be != null? getProperty returns null if the variable is NOT found, and you only want to assign to val if it IS found, right? Same thing for the parallel port case. End result is the same I guess, since you check for null later, but probably should be fixed. From eddythejekyll at gmail.com Mon Aug 14 11:55:17 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 11:55:17 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: When I try to get the mode with int mode = pPort.getMode(); it returns 0 which isn't any of the valid modes. I tried setting it explicitely with pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced the requested mode in nativeSetSerialPortParams at gnu.io.LPRPort.setLPRMode(Native Method) at gnu.io.LPRPort.setMode(LPRPort.java:87) Except for LPT_MODE_ANY, but the getMode call still failed out with an invalid state. I'm wondering if it's because I don't have the line pulled high like you said. This isn't a printer connected. It's a relay board with pins 2-9 tied to data, and 18-25 to gnd. The rest are open. I looked at a DB25 pinout diagram and I'm not sure which pin I need to tie high, and I looked through the archives, but didn't find a reference to something definitive. Can someone help me with which pin is the "online" pin as Trent mentioned? DB25 spec has ( I hope this formats correctly in this email) BUSY (11), SEL (13) or INIT (16) are candidates, but I'm guessing. Any clues? *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Thanks, Ed On 8/12/06, Trent Jarvi wrote: > > > Remember that the lp code expects a printer - or something like it. There > is a line that specifies the printer is online. If you are doing hobby > work, you will need to raise that line or loop it back to something that > is raised. > > If you just try reading a port with no device connected and online, there > will be an error while trying to read. This should be addressed in the > mail-list archives. > > On Sat, 12 Aug 2006, Ed wrote: > > > Trent, > > Right after I sent the results indicated below I re-ran the app and it > > apparently found the parallel port. The difference was that I set the > > permissions to : > > /dev: > > wildcard lp* > > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > > > I'm still not sure how to interpret the dmesg and lsmod before. However > I'm > > thinking that since the user now has permission to access the lp* port, > a > > request to access it loaded the lp and parport modules automatically and > > allowed me access. Here's the output of lsmod now: > > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > > lp 5540 0 (autoclean) > > parport 21608 1 (autoclean) [parport_pc lp] > > > > and dmesg: > > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > > On node 0 totalpages: 161776 > > lp0: using parport0 (polling). > > > > So I think I'm good, and ready to move on the next steps. > > > > Thanks Trent! > > > > Ed > > > > > > On 8/12/06, Ed wrote: > >> > >> Thanks for the reply Trent. > >> > >> I'm on a different system today but am trying your suggestons. This is > a > >> debian 3.1r2 system and I'm running jdk 1.5.0_04. > >> > >> Take a look below, but I think I have no parallel port support on this > >> kernel, however I never get the "No such device or address" return from > the > >> cat call as you did so I'm not sure how to interpret the results. > >> > >> When I run the test program (PortChooser.java), the getPortIdentifiers > >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this > is > >> more than I found on the RedHat system. Incidently --disable-lockfiles > has > >> no effect. > >> > >> It looks as though there is no parallel support in this kernel: > >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > >> On node 0 totalpages: 161776 > >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > >> > >> I'm a little confused by the results when I cat to the lp0 device. It > >> seems from the dmesg output that I don't have parallel printer support, > but > >> when I cat to the lp0 device, I get permission denied if I'm non-root > user > >> and input/output error if I'm root. Apparently this means I have the > >> device, > >> but no support in the kernel? > >> > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> > >> cat: /dev/lp0: Permission denied > >> ed at falcon:~/src/workspace/EASServer/src$ su > >> Password: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> > >> Here's my lp* device permissions. > >> /dev: > >> wildcard lp* > >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> If I change it to > >> /dev: > >> wildcard lp* > >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> I get: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> falcon:/home/ed/src/workspace/EASServer/src# exit > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> ed at falcon:~/src/workspace/EASServer/src$ > >> > >> What do you think? Should I recompile the kernel or is it something > else? > >> > >> By the way, I added the user ed to the lp and uucp groups on this > system. > >> > >> Thanks again, > >> > >> Ed > >> > >> On 8/11/06, Trent Jarvi wrote: > >> > > >> > On Fri, 11 Aug 2006, Ed wrote: > >> > > >> > > I'm trying to read and write a parallel port on a standard (Dell) > pc > >> > running > >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > >> > gates. > >> > > > >> > > I'm having problems getting rxtx to return a port enumeration from > >> > > getPortIdentifiers. I'm using a file > >> > > PortChooser.java as a test file to get things going. This is from > the > >> > Java > >> > > CookBook 2nd edition (Chapter 12). The call > >> > > > >> > > // get list of ports available on this particular computer, > >> > > // by calling static method in CommPortIdentifier. > >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > >> > > > >> > > returns a null pList; > >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I > configure > >> > and > >> > > compile without --disable-lockfiles I get: > >> > > > >> > > Stable Library > >> > > ========================================= > >> > > Native lib Version = RXTX-2.1-7 > >> > > Java lib Version = RXTX-2.1-7 > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > ... > >> > > > >> > > When I compile with --disable-lockfiles the call to > getPortIdentifiers > >> > > >> > > simply returns a null Enumeration. > >> > > > >> > > I've read the documention and threads about this issue and I feel > like > >> > I've > >> > > tried everything, so at the moment I'm stumped. > >> > > > >> > > I can supply any further info that may help. > >> > > > >> > > Thanks in advance. > >> > > > >> > > Ed > >> > > > >> > > >> > Hi Ed > >> > > >> > You may want to check the permissions of /dev/lp*. Also make sure lp > or > >> > your kernel support for lp is loaded. It should show up in dmesg and > >> > lsmod. > >> > > >> > For my laptop with no printer port enabled in BIOS is see: > >> > > >> > lp: driver loaded but no devices found > >> > > >> > in desg |grep lp > >> > > >> > [] $ ls -l /dev/lp* > >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > here root and group lp can read and write. Normal users cannot. > >> > > >> > Try a simple read as a user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: Permission denied > >> > > >> > Fix as root > >> > > >> > [] chmod 666 /dev/lp* > >> > [] $ ls -l /dev/lp* > >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > Now as user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: No such device or address > >> > > >> > So this is saying there is no lp0 on my laptop. > >> > > >> > -- > >> > Trent Jarvi > >> > tjarvi at qbang.org > >> > > >> > >> > >> > >> -- > >> > >> Ed > >> > > > > > > > > > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/59164078/attachment-0319.html From eddythejekyll at gmail.com Mon Aug 14 14:19:58 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 14:19:58 -0600 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? Message-ID: I'm using the ParallelPort class to drive a relay board. According to Mr. Jarvi, since this board isn't a printer, there will be a read error unless I hold the "printer online" line high in order to make the API think I'm talking to a printer. The problem is, I can't figure out which line is the "printer online". My DB25 spec lists the following: *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Anyone know which one I should tie high? I tried the busy line and it still errored out on the read. Thanks in advance, -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/66cf3c3e/attachment-0319.html From tjarvi at qbang.org Mon Aug 14 18:06:29 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:06:29 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Mon, 14 Aug 2006, Ed wrote: > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > which isn't any of the valid modes. I tried setting it explicitely with > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced > the requested mode in nativeSetSerialPortParams > at gnu.io.LPRPort.setLPRMode(Native Method) > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > invalid state. This is because rxtx only supports the basics. JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } One could program in more support. When I did that I just had a daisy wheel printer to test with and doing any more would have been blind. So that behavior is expected. I'll look to see if the Parallel Complete book mentions which pins you need to raise. If you look in the source code [ParallelImp.c] you can see this code isn't well tested. It has worked for hobby use in the past as I'd guess you are trying to do. But my experience with the code is as is mentioned in the top of the source: /* fear he who enter here. It appears that things have changed. An attempt has been made to put things the way the should be. It compiles and ParallelBlackBox runs. No further guarantees. Well... One.. it will print "Hello World!" on an epson DX 10 printer. you know.. the 10 character per second daisy wheel printer ;) - Trent Jarvi */ That comment is from 1997 or so. Since then some windows support was contributed but it is still very green code. We get about four requests for parallel support a year so its just not a well traveled area. It would be nice to have some documentation for the people trying to hook parallel ports to electronic projects. That appears to be the exclusive use of the Parallel support. The wiki pages are intended to let people share information like this to help each other in their projects as they figure out the details. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Aug 14 18:40:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:40:40 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: > PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): > > if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) > val = System.getProperty("gnu.io.SerialPorts"); > > Shouldn't the comparison be != null? getProperty returns null if the > variable is NOT found, and you only want to assign to val if it IS > found, right? Same thing for the > parallel port case. End result is the same I guess, since you check > for null later, > but probably should be fixed. I think this is just a fallback to the second property. gnu.io.SerialPorts isn't documented but perhaps it is used. It should behave properly as documented in INSTALL. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 14 18:56:55 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 19:56:55 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: <44E11BD7.5030102@gmail.com> Trent Jarvi wrote: >> PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): >> >> if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) >> val = System.getProperty("gnu.io.SerialPorts"); >> > > I think this is just a fallback to the second property. > gnu.io.SerialPorts isn't documented but perhaps it is used. It should > behave properly as documented in INSTALL. Doh - yup, I missed the fact that the property names were different... Pete From berkland at spamcop.net Mon Aug 14 19:58:21 2006 From: berkland at spamcop.net (Doug Berkland) Date: Mon, 14 Aug 2006 21:58:21 -0400 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? In-Reply-To: References: Message-ID: <269e40090608141858g698c2579v8d962deca3f4df53@mail.gmail.com> Based on memory and this page as confirmation, I would say pin 13 is the "Online" pin for SPP (standard parallel port). http://www.quatech.com/support/comm-over-parallel.php On 8/14/06, Ed wrote: > > I'm using the ParallelPort class to drive a relay board. According to Mr. > Jarvi, since this board isn't a printer, there will be a read error unless I > hold the "printer online" line high in order to make the API think I'm > talking to a printer. The problem is, I can't figure out which line is the > "printer online". My DB25 spec lists the following: > > *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and > Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data > Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 > D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select > 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select > In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit > 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 > Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and > Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground > > Anyone know which one I should tie high? I tried the busy line and it > still errored out on the read. > > Thanks in advance, > > -- > Ed > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/842bb770/attachment-0319.html From eddythejekyll at gmail.com Mon Aug 14 20:25:42 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 20:25:42 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Ah, I see. I've seen the caveats about limited Parallel support, but I thought it was mainly about the javax.comm package. The gnu.io is derived from javax.comm package right? That is, is the parallel support in rxtx is a superset of what's in javax.comm? I'm using this not for hobby usage, but for some simple instrumenation and control. If the project mandates it, I'll gladly work on extending the support. In the meantime, I need to get some sanity checks working, and repair my relay board (I smoked the ULN2803 chip, apparently by tying the BUSY (pin 11) to vcc). I guess I'll try the SEL pin next (and a supply of 2803s) with a ~1K pullup. The caveat in the comment block isn't very encouraging (!), but I borrowed an old Epson Stylus Color 600 printer to see what I can do. If I can write out characters to it I'll be happy. Parallel printers aren't easy to find these days. I haven't yet looked at the native source, yet, but I've just imported it into eclipse and I'll surf around a bit. Ed On 8/14/06, Trent Jarvi wrote: > > On Mon, 14 Aug 2006, Ed wrote: > > > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > > which isn't any of the valid modes. I tried setting it explicitely with > > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to > proced > > the requested mode in nativeSetSerialPortParams > > at gnu.io.LPRPort.setLPRMode(Native Method) > > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > > invalid state. > > This is because rxtx only supports the basics. > > JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > jclass jclazz, jint mode) > { > switch(mode) > { > case LPT_MODE_ANY: > break; > case LPT_MODE_SPP: > case LPT_MODE_PS2: > case LPT_MODE_EPP: > case LPT_MODE_ECP: > case LPT_MODE_NIBBLE: > default: > throw_java_exception( env, > UNSUPPORTED_COMM_OPERATION, > "nativeSetSerialPortParams", > "setLPRMode was unable to proced the > requested \ > mode" > ); > } > return(JNI_TRUE); > } > > One could program in more support. When I did that I just had a daisy > wheel printer to test with and doing any more would have been blind. > > So that behavior is expected. I'll look to see if the Parallel Complete > book mentions which pins you need to raise. If you look in the source > code [ParallelImp.c] you can see this code isn't well tested. It has > worked for hobby use in the past as I'd guess you are trying to do. But > my experience with the code is as is mentioned in the top of the source: > > /* > fear he who enter here. It appears that things have changed. An > attempt > has been made to put things the way the should be. > > It compiles and ParallelBlackBox runs. No further guarantees. > > Well... One.. it will print "Hello World!" on an epson DX 10 > printer. > you know.. the 10 character per second daisy wheel printer ;) > > - Trent Jarvi > */ > > That comment is from 1997 or so. > > Since then some windows support was contributed but it is still very green > code. We get about four requests for parallel support a year so its just > not a well traveled area. > > It would be nice to have some documentation for the people trying to hook > parallel ports to electronic projects. That appears to be the exclusive > use of the Parallel support. The wiki pages are intended to let people > share information like this to help each other in their projects as they > figure out the details. > > -- > Trent Jarvi > tjarvi at qbang.org > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/fbb5ddb4/attachment-0319.html From lyon at docjava.com Tue Aug 15 06:06:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 15 Aug 2006 08:06:27 -0400 Subject: [Rxtx] smoking is bad for your health In-Reply-To: References: Message-ID: Hi All, If you are connecting to the parallel port and smoking chips, it is time for extra stuff to buffer the parallel port. You may be want more current, in which case driver transistors are needed, or, if you are using the port as an output only device, you may like to add your own bus transceiver (e.g., 74245), set for output. Do be careful to design this properly; http://www.beyondlogic.org/spp/parallel.htm Some people like to use Octal D-type F.F's with OC outputs, like a 74374, http://upgrade.cntc.ac.kr/data/ttl/74374.html I like this one, as it has the D FF's and can latch the outputs for presentation to slower electronics (like relays). But careful! A relay that needs more current than the family of the device you have selected will look like a short to ground, and you will smoke your bug! And MOBO's do NOT come with the ability to drive any load you like. Check the power specs on your relay and be sure to protect the chip against back EMF with a diode. It is best to smoke test this on a bread board BEFORE hooking it to the computer. And be sure you smoke test the corner points in the ckt for a while, lest it fail in the field. - Doug >Ah, I see. I've seen the caveats about limited >Parallel support, but I thought it was mainly >about the javax.comm package. The >gnu.io is derived from javax.comm >package right? That is, is the parallel support >in rxtx is a superset of what's in javax.comm? > >I'm using this not for hobby usage, but for some >simple instrumenation and control. If the >project mandates it, I'll gladly work on >extending the support. In the meantime, I need >to get some sanity checks working, and repair my >relay board (I smoked the ULN2803 chip, >apparently by tying the BUSY (pin 11) to vcc). I >guess I'll try the SEL pin next (and a supply of >2803s) with a ~1K pullup. > >The caveat in the comment block isn't very >encouraging (!), ?but?I borrowed an old Epson >Stylus Color 600 printer to see what I can do. >?If I can write out characters to it I'll be >happy. Parallel printers aren't easy to find >these days. > > I haven't yet looked at the native source, yet, >but I've just imported it into eclipse and I'll >surf around a bit. > >Ed > >On 8/14/06, Trent Jarvi <tjarvi at qbang.org> wrote: > >On Mon, 14 Aug 2006, Ed wrote: > >> When I try to get the mode with int mode = pPort.getMode(); it returns 0 >> which isn't any of the valid modes. I tried setting it explicitely with >> pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with >> >> gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced >> the requested mode in nativeSetSerialPortParams >> at gnu.io.LPRPort.setLPRMode(Native Method) >> at gnu.io.LPRPort.setMode(LPRPort.java:87) >> >> Except for LPT_MODE_ANY, but the getMode call still failed out with an >> invalid state. > >This is because rxtx only supports the basics. > >JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > ???????jclass jclazz, jint mode) >{ > ???????switch(mode) > ???????{ > ???????????????case LPT_MODE_ANY: > ???????????????????????break; > ???????????????case LPT_MODE_SPP: > ???????????????case LPT_MODE_PS2: > ???????????????case LPT_MODE_EPP: > ???????????????case LPT_MODE_ECP: > ???????????????case LPT_MODE_NIBBLE: > ???????????????default: > ???????????????????????throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, > ???????????????????????????????"nativeSetSerialPortParams", > ???????????????????????????????"setLPRMode was >unable to proced the requested \ > ???????????????????????????????mode" > ???????????????????????); > ???????} > ???????return(JNI_TRUE); >} > >One could program in more support.??When I did that I just had a daisy >wheel printer to test with and doing any more would have been blind. > >So that behavior is expected.??I'll look to see if the Parallel Complete >book mentions which pins you need to raise.??If you look in the source >code [ParallelImp.c] you can see this code isn't well tested.??It has >worked for hobby use in the past as I'd guess you are trying to do.??But >my experience with the code is as is mentioned in the top of the source: > >/* > fear he who enter here.??It appears that things have changed.??An attempt > has been made to put things the way the should be. > > ???????It compiles and ParallelBlackBox runs.??No further guarantees. > > ???????Well... One.. it will print "Hello World!" on an epson DX 10 printer. > ???????you know.. the 10 character per second daisy wheel printer ;) > > ???????- Trent Jarvi >*/ > >That comment is from 1997 or so. > >Since then some windows support was contributed but it is still very green >code.??We get about four requests for parallel support a year so its just >not a well traveled area. > >It would be nice to have some documentation for the people trying to hook >parallel ports to electronic projects.??That appears to be the exclusive >use of the Parallel support.??The wiki pages are intended to let people >share information like this to help each other in their projects as they >figure out the details. > >-- >Trent Jarvi >tjarvi at qbang.org > > > > >-- >Ed > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 15 13:26:16 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 15 Aug 2006 14:26:16 -0500 Subject: [Rxtx] crash with too much memory Message-ID: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded from qbang.org. I'm exercising the RXTX COMM serial interface, both in a small standalone test and with the same code pulled into a large OSGI framework setup. If I use the stock .jar/.dll's, then everything works correctly in both situations. I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 (mingw-special)). If I use my locally built version, then my small test case works just fine, both when run inside Eclipse and when run standalone on the command line. However, when I try and use my locally built .jar/.dll's in the large framework environment, then I get a JVM crash with the attached log. Normally this would lead me to think that I was running out of memory or something in the large environment, and when I try and play with the JVM memory args, some interesting things show up. In our large environment, we have -Xms32M/-Xmx1024M - this appears to be the problem. If I set max to something like 64M, then things work. The cross over point from working to failing seems to be around 32M/110M (works) and 32M/111M (fails). But 128M/128M works while 128M/129M fails. So it seems to have to do with how much memory is actually available, or something like that. The thing that occurs to me is if my GCC is somehow generating something like "near" calls. But when the JVM has a lot of RAM available, it puts the DLL up somehwere in the address space and then the near calls fail - far calls are needed. So, I'm thinking this is probably a difference in the MinGW GCC I'm using and the one that was used to build the stock binaries from qbang, or maybe some command line args were changed? So, I'm hoping someone will have an idea of what's going on here... Thanks, Pete From tjarvi at qbang.org Tue Aug 15 18:54:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 15 Aug 2006 18:54:04 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: On Tue, 15 Aug 2006, Pete Flugstad wrote: > I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded > from qbang.org. > > I'm exercising the RXTX COMM serial interface, both in a small > standalone test and with the same code pulled into a large OSGI > framework setup. > > If I use the stock .jar/.dll's, then everything works correctly in > both situations. > > I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 > (mingw-special)). > > If I use my locally built version, then my small test case works just > fine, both when run inside Eclipse and when run standalone on the > command line. However, when I try and use my locally built > .jar/.dll's in the large framework environment, then I get a JVM crash > with the attached log. > > Normally this would lead me to think that I was running out of memory > or something in the large environment, and when I try and play with > the JVM memory args, some interesting things show up. > > In our large environment, we have -Xms32M/-Xmx1024M - this appears to > be the problem. If I set max to something like 64M, then things work. > The cross over point from working to failing seems to be around > 32M/110M (works) and 32M/111M (fails). > But 128M/128M works while 128M/129M fails. So it seems to have to do > with how much memory is actually available, or something like that. > > The thing that occurs to me is if my GCC is somehow generating > something like "near" calls. But when the JVM has a lot of RAM > available, it puts the DLL up somehwere in the address space and then > the near calls fail - far calls are needed. > > So, I'm thinking this is probably a difference in the MinGW GCC I'm > using and the one that was used to build the stock binaries from > qbang, or maybe some command line args were changed? > > So, I'm hoping someone will have an idea of what's going on here... > Hi Pete The binaries are from the src. They should be reproducable. I did extensive testing of rxtx several years ago using mingw as the compiler. The version was 2.95. I have not changed versions since. There are way too many variables as it is. I have a linux->mingw cross compiler rpm I use for all windows use. If you want a copy of it you can have it. It isn't anything 'special' :) -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Thu Aug 17 11:49:24 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 17 Aug 2006 12:49:24 -0500 Subject: [Rxtx] crash with too much memory In-Reply-To: References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> On 8/15/06, Trent Jarvi wrote: > I did extensive testing of rxtx several years ago using mingw as the > compiler. The version was 2.95. I have not changed versions since. > There are way too many variables as it is. FYI, I believe I've solved this problem by changing how the dll's were built. The original mingw makefile was generating Serial.def, then performing various operations with dlltool and ld. I modified the makefile to create the dll using this page: as a guide. With that, there's no longer any need to deal with Serial.def and the makefile becomes _much_ simpler. This appears to have addressed my problems with crashing. FWIW, GCC 2.95 is _really_ old - you should consider investigating upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is supposed to generate a native binary (i.e. just like MinGW). Thanks, Pete From claretlc at yahoo.com Thu Aug 17 12:34:48 2006 From: claretlc at yahoo.com (Clare Cooley) Date: Thu, 17 Aug 2006 11:34:48 -0700 (PDT) Subject: [Rxtx] parallel port communication Message-ID: <20060817183448.76911.qmail@web53908.mail.yahoo.com> Hi, I'm trying to write a 1 to a bit 15 on a parallel port cable that isn't attached to a printer.(It's a control box for eye-tracking equipment.)I need to do this in Java. I looked at the javax.comm documentation, and it said, "Application programs should not directly create ParallelPortEvent objects." So is there a way to do this with your package? If not, do you have any suggestions of where to look? It really needs to be done in Java. Thanks, Clare Cooley __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From pat at xvalheru.org Thu Aug 17 13:13:52 2006 From: pat at xvalheru.org (pat) Date: Thu, 17 Aug 2006 21:13:52 +0200 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060817190751.M5586@xvalheru.org> Hi there, I've question(s) for you. I need to communicate with scale, I've used the Sun's direver. Now I've switched to Rxtx and the speed of the communication is perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, but the difference between the crash time is 5 second ... . My question is: Is there a stable driver ??? Or what I have to do to have stable enough serial port driver ??? OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. Thanks to all for the help. Pat From tjarvi at qbang.org Fri Aug 18 05:13:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 05:13:42 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> Message-ID: On Thu, 17 Aug 2006, Pete Flugstad wrote: > On 8/15/06, Trent Jarvi wrote: >> I did extensive testing of rxtx several years ago using mingw as the >> compiler. The version was 2.95. I have not changed versions since. >> There are way too many variables as it is. > > FWIW, GCC 2.95 is _really_ old - you should consider investigating > upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is > supposed to generate a native binary (i.e. just like MinGW). > It is really old but also well known like C itself. I have considered upgrading. The ToyBox builds should be gcc 3* cross-compiled. I'm not going to be validating gcc 3* w32 binaries though. It's looking like we will need to focus support on MSFT's toolchain for 64 bit windows support until it is possible for gcc to support w64. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Aug 18 05:32:10 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 07:32:10 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: Hi All, Does anyone know how to produce mac intel binaries on a Fedora Linux box? Thanks! - Doug From tjarvi at qbang.org Fri Aug 18 06:42:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 06:42:05 -0600 (MDT) Subject: [Rxtx] cross compilation for the mac In-Reply-To: References: Message-ID: On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Does anyone know how to produce > mac intel binaries on a Fedora Linux > box? > > Thanks! > - Doug Hi Doug You need to build the cross toolchain which means copying the Darwin/Mac binaries over to fedora. It would be nontrivial but possible. Do the Darwin libraries work with Mac in general? I'm not aware of the licensing issues associated with grabbing Mac binaries. Same with OpenSolaris/Solaris. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Aug 18 08:15:26 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 10:15:26 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> In theory building against Darwin would be sufficient to getting things working on MacOS X. You need to remember that Darwin is the low-level OS, while MacOS X adds the everything else on top. IOKit, which is the I/O API, is available as part of Darwin. The only thing you will need extra are the Java libraries. One thing is that I would recommend that when producing binaries for the Mac, is to ensure they are Universal binaries (PPC+Intel). Andre > > From: Trent Jarvi > Date: 2006/08/18 Fri AM 08:42:05 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] cross compilation for the mac > > On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > > > Hi All, > > Does anyone know how to produce > > mac intel binaries on a Fedora Linux > > box? > > > > Thanks! > > - Doug > > Hi Doug > > You need to build the cross toolchain which means copying the Darwin/Mac > binaries over to fedora. It would be nontrivial but possible. > > Do the Darwin libraries work with Mac in general? I'm not aware of the > licensing issues associated with grabbing Mac binaries. > > Same with OpenSolaris/Solaris. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Aug 18 13:43:16 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 15:43:16 -0400 Subject: [Rxtx] cross compilation for the mac In-Reply-To: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: >In theory building against Darwin would be sufficient to getting >things working on MacOS X. You need to remember that Darwin is the >low-level OS, while MacOS X adds the everything else on top. IOKit, >which is the I/O API, is available as part of Darwin. The only thing >you will need extra are the Java libraries. > >One thing is that I would recommend that when producing binaries for >the Mac, is to ensure they are Universal binaries (PPC+Intel). > >Andre I find the xcode ide for generating a mix of universal binaries and java very difficult to make work. Is there a way to do this with make files? Thanks! - Doug From ajmas at sympatico.ca Fri Aug 18 13:54:55 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 15:54:55 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818195455.PGAP29052.tomts13-srv.bellnexxia.net@smtp1.sympatico.ca> It should be doable. XCode hands off the compilation process to gcc et al, for the compilation of C/C++ code and to javac et al. for the Java side. While ant is the favoured tool for 'automated' Java compilation, make can easily be used. All is needed is someone to volounteer to do the work. Andre "Dr. Douglas Lyon" wrote > > >In theory building against Darwin would be sufficient to getting > >things working on MacOS X. You need to remember that Darwin is the > >low-level OS, while MacOS X adds the everything else on top. IOKit, > >which is the I/O API, is available as part of Darwin. The only thing > >you will need extra are the Java libraries. > > > >One thing is that I would recommend that when producing binaries for > >the Mac, is to ensure they are Universal binaries (PPC+Intel). > > > >Andre > > I find the xcode ide for generating a mix of universal binaries > and java very difficult to make work. Is there a way to do this > with make files? > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Fri Aug 18 16:34:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 16:34:46 -0600 (MDT) Subject: [Rxtx] serial driver newbe question and problem In-Reply-To: <20060817190751.M5586@xvalheru.org> References: <20060817190751.M5586@xvalheru.org> Message-ID: On Thu, 17 Aug 2006, pat wrote: > Hi there, > > I've question(s) for you. I need to communicate with scale, I've used the > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > but the difference between the crash time is 5 second ... . > > My question is: Is there a stable driver ??? Or what I have to do to have > stable enough serial port driver ??? > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > Thanks to all for the help. > > Pat > Could you describe the hardware you have, the version of rxtx and provide the log of the crash? Did you download binaries? I've not been seeing a jvm crash with rxtx -- Trent Jarvi tjarvi at qbang.org From lunareclipse03 at web.de Sat Aug 19 12:11:48 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 19 Aug 2006 20:11:48 +0200 Subject: [Rxtx] Problem solved! Message-ID: <920065539@web.de> Hi everybody, I posted some months ago and asked about some help on my very special problem concerning my win32 port of a communications library. Now I just want to inform you that no further "mindstorming" is needed because I solved the problem by completely rewriting the win32 port of the library. Now everything works fine. Thank you all for your time and patience. --Sven Ahlemann __________________________________________________________________________ Erweitern Sie FreeMail zu einem noch leistungsst?rkeren E-Mail-Postfach! Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131 From ajmas at sympatico.ca Mon Aug 21 09:58:23 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 21 Aug 2006 11:58:23 -0400 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060821155823.TLSM18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Next time that happens, including a copy of the crash log, produced by Windows could probably help too. Andre Trent Jarvi wrote: > > On Thu, 17 Aug 2006, pat wrote: > > > Hi there, > > > > I've question(s) for you. I need to communicate with scale, I've used the > > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > > but the difference between the crash time is 5 second ... . > > > > My question is: Is there a stable driver ??? Or what I have to do to have > > stable enough serial port driver ??? > > > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > > > Thanks to all for the help. > > > > Pat > > > > Could you describe the hardware you have, the version of rxtx and > provide the log of the crash? Did you download binaries? > > I've not been seeing a jvm crash with rxtx > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From adrian.l.parker at gmail.com Thu Aug 24 09:10:39 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Thu, 24 Aug 2006 11:10:39 -0400 Subject: [Rxtx] Portability issues Message-ID: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use RXTX 2.0? Does it provide system librairies that javax.comm does not? I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, or 2000, or server 2003). Can this be done with a single implementation of RXTX? I don't want to have different versions of Java code that have different package names. References: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Message-ID: On Thu, 24 Aug 2006, Adrian Parker wrote: > Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use > RXTX 2.0? Does it provide system librairies that javax.comm does not? > > I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's > OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, > or 2000, or server 2003). Can this be done with a single implementation of > RXTX? I don't want to have different versions of Java code that have > different package names. > Hi Adrian. The native code can support all of the platforms you mention. I've never compiled for unixware or openunix but the patches are in the code. So you would need to compile for that target. >From there you would probably be best off going with rxtx 2.1 so you have all the classes in one package. You can opt to use rxtx 2.0 with Sun's commapi for Solaris v 2. The main differences are rxtx 2.1 comes with all the source/classes and is in package gnu.io while Sun's requires rxtx for some platforms but is in package javax.comm. The low level code is the same in either case as far as rxtx is concerned. -- Trent Jarvi tarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 04:12:52 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 06:12:52 -0400 Subject: [Rxtx] Serial.addEventListener bug? Message-ID: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on OpenServer 5.0.7). Its what Sun packages. I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an exception. It seems to throw the exception if no listener was previously declared (although I've not had chance to verify). Is this desireable behaviour? Sun's original API doesn't mention anything about an exception on this function, http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) Of course this is an old version of RXTX, so perhaps this has been changed. -- Adrian Parker Simulation Software Developer DLCSPM 4-4-3 (c) Building A31, CFB Kingston Tel: (613) 541-5010 x3020 CSN: 271-3020 Email: parker at lsec.dnd.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/22e2ea57/attachment-0309.html From tjarvi at qbang.org Fri Aug 25 05:15:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 25 Aug 2006 05:15:44 -0600 (MDT) Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: On Fri, 25 Aug 2006, Adrian Parker wrote: > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > OpenServer 5.0.7). Its what Sun packages. > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > exception. It seems to throw the exception if no listener was previously > declared (although I've not had chance to verify). > > Is this desireable behaviour? Sun's original API doesn't mention anything > about an exception on this function, > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > Of course this is an old version of RXTX, so perhaps this has been changed. > > > What exception was thrown? You can replace 1.4-8 with 2.0 for testing purposes. They are the same package. I doubt Sun shipped or packaged that. I think Caldera/SCOx/... did at one point. There may still be updates on their pages. I recall them sending patches here which are in current rxtx. -- Trent Jarvi tjarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 05:28:32 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 07:28:32 -0400 Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: <7da71e910608250428q32b86632g9a67b1b4efe69830@mail.gmail.com> On 8/25/06, Trent Jarvi wrote: > > On Fri, 25 Aug 2006, Adrian Parker wrote: > > > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > > OpenServer 5.0.7). Its what Sun packages. > > > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > > exception. It seems to throw the exception if no listener was > previously > > declared (although I've not had chance to verify). > > > > Is this desireable behaviour? Sun's original API doesn't mention > anything > > about an exception on this function, > > > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > > > Of course this is an old version of RXTX, so perhaps this has been > changed. > > > > > > > > What exception was thrown? Its weird. I catch an Exception. But when on that exception I call getClass().getName() I end up with a NullPointerException. You can replace 1.4-8 with 2.0 for testing > purposes. They are the same package. > > I doubt Sun shipped or packaged that. Doh! I meant to say SCO sorry. I was surfing Sun's site when I wrote that :) Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/e43aed3a/attachment-0309.html From sjudd at seas.upenn.edu Sat Aug 26 16:42:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Sat, 26 Aug 2006 18:42:09 -0400 Subject: [Rxtx] Mac commapi Message-ID: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? If so, where do I get it? Sun has various versions at http://www.sun.com/download/products.xml?id=43208d3d but they are for SolarisSparc, SolarisX86, Linux, and Generic. Do I use the Generic one? If so, read on; otherwise redirect me. While using the Generic version, my attempt to run the BlackBox sample program elicits a message saying it "can't find javax.comm.properties". I found a note in the rxtx.org HowTo (for Linux) saying to create this thing in /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties but where should it go on the Mac? After reading many versions of documentation around, and updates and revisions and re-authorings, I have worked my way into a state of confusion and high uncertainty. Please release me. sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060826/02d6b163/attachment-0279.html From tod at todbot.com Sat Aug 26 17:08:33 2006 From: tod at todbot.com (Tod E. Kurt) Date: Sat, 26 Aug 2006 16:08:33 -0700 Subject: [Rxtx] Mac commapi In-Reply-To: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Message-ID: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> You don't need Sun's CommAPI. You just need RXTX. Once you download RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and the native library is ("librxtxSerial.jnilib" on Mac OS X) via the standard methods. For instance, if you've placed those two files in a directory called 'rxtxlib' and you want to run a Java class called HelloWorld in the current directory, do the following: % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar HelloWorld On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? > If so, where do I get it? Sun has various versions at > http://www.sun.com/download/products.xml?id=43208d3d > but they are for SolarisSparc, SolarisX86, Linux, and Generic. > Do I use the Generic one? > If so, read on; otherwise redirect me. > > While using the Generic version, my attempt to run the BlackBox > sample program > elicits a message saying it "can't find javax.comm.properties". > I found a note in the rxtx.org HowTo (for Linux) saying to create > this thing in > /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties > but where should it go on the Mac? > > After reading many versions of documentation around, and updates > and revisions > and re-authorings, I have worked my way into a state of confusion > and high > uncertainty. Please release me. > > sj > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From sjudd at seas.upenn.edu Sun Aug 27 22:55:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Mon, 28 Aug 2006 00:55:09 -0400 Subject: [Rxtx] Mac commapi In-Reply-To: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> Message-ID: This was immensely helpful. Thank you, Tod. I wish it had been explicit somewhere in the documentation; it would have saved me 2 days of grief. One hugely valuable thing like this little set of instructions is that it implicitly lists all the hundreds of things you DON"T have to do. I know it seems obvious to those in the know, but every little bit of help on an arcane topic like this opens up the product to an exponentially wider group of dilettantes. I managed to get the SerialDemo program (from Sun) to work too. Hurrah! However, it required changing all the javax.comm references to gnu.io which I had heard of due to all my rambling readings. Is there not a demo program on rxtx.org already available that would not have needed this? BTW, the link on the Projects page for jPIC[Source] sends a *.hex file to a PIC 16F877 or similar chip... takes me to nowhere useful. I do not understand what the name "Toybox" is meant to imply. Thanks, sj On 2006 Aug 26, at 7:08 PM, Tod E. Kurt wrote: > You don't need Sun's CommAPI. You just need RXTX. Once you download > RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and > the native library is ("librxtxSerial.jnilib" on Mac OS X) via the > standard methods. > > For instance, if you've placed those two files in a directory called > 'rxtxlib' and you want to run a Java class called HelloWorld in the > current directory, do the following: > > % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar > HelloWorld > > > On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > >> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? >> If so, where do I get it? Sun has various versions at >> http://www.sun.com/download/products.xml?id=43208d3d >> but they are for SolarisSparc, SolarisX86, Linux, and Generic. >> Do I use the Generic one? >> If so, read on; otherwise redirect me. >> >> While using the Generic version, my attempt to run the BlackBox >> sample program >> elicits a message saying it "can't find javax.comm.properties". >> I found a note in the rxtx.org HowTo (for Linux) saying to create >> this thing in >> /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties >> but where should it go on the Mac? >> >> After reading many versions of documentation around, and updates >> and revisions and re-authorings, I have worked my way into a state >> of confusion and high uncertainty. Please release me. >> >> sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060827/b80d6389/attachment-0279.html From pete.flugstad at gmail.com Mon Aug 28 12:38:27 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 13:38:27 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE Message-ID: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Okay, my understanding is that originally, RTS meant "Request to Send" - the DTE (the PC) would assert this and the DCE (modem) would assert "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send data. This really only provided uni-directional flow control, from the PC to the modem. Now, as I understand it, the more modern usage of RTS is that it is used for the DTE to assert flow control back to the DCE - basically it means "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) raises this, then the DCE(modem) is free to send data to the DTE - this allows the DTE(PC) to exert flow control back towards the DCE(modem). This discussion is based on the Serial HOWTO from: and lots of other reading... Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which is defined as: > Enables RTS flow-control handshaking. The driver raises the RTS line, > enabling the DCE to send, when the input buffer has enough room to > receive data. The driver lowers the RTS line, preventing the DCE to > send, when the input buffer does not have enough room to receive > data. If this value is used, it is an error for the application to adjust > the line with EscapeCommFunction. which clearly reflects the newer usage style - it keeps the RTS line high as long as there is space to _receive_ data. And takes it low when the receive/input buffer is getting full to stop the modem from sending it data. Does this jive with other peoples understanding of RTS usage? Unfortunately, the hardware I'm trying to talk to wants to use the OLD style of RTS line usage. An existing Windows C++ program uses RTS_CONTROL_TOGGLE, which documentation states: > Specifies that the RTS line will be high if bytes are available for transmission. > After all buffered bytes have been sent, the RTS line will be low. If this value is > set, it would be an error for an application to adjust the line with > EscapeCommFunction. This value is ignored in Windows 95; it causes the > driver to act as if RTS_CONTROL_ENABLE were specified. This seems to be the OLD RTS behavior, right? So, what I seem to need is to be able to control the RTS line, either using TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS when getting ready to TX and clear it when the output buffer is empty). Does this make sense, or am I off in the weeds? Thanks, Pete From tjarvi at qbang.org Mon Aug 28 18:21:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 28 Aug 2006 18:21:10 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: On Mon, 28 Aug 2006, Pete Flugstad wrote: > Okay, my understanding is that originally, RTS meant "Request to Send" > - the DTE (the PC) would assert this and the DCE (modem) would assert > "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send > data. This really only provided uni-directional flow control, from the PC to > the modem. > > Now, as I understand it, the more modern usage of RTS is that it is used > for the DTE to assert flow control back to the DCE - basically it means > "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) > raises this, then the DCE(modem) is free to send data to the DTE - this > allows the DTE(PC) to exert flow control back towards the DCE(modem). > > This discussion is based on the Serial HOWTO from: > > > > and lots of other reading... > > Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > is defined as: > >> Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > > which clearly reflects the newer usage style - it keeps the RTS line high > as long as there is space to _receive_ data. And takes it low when the > receive/input buffer is getting full to stop the modem from sending it data. > > Does this jive with other peoples understanding of RTS usage? > > Unfortunately, the hardware I'm trying to talk to wants to use the OLD > style of RTS line usage. An existing Windows C++ program uses > RTS_CONTROL_TOGGLE, which documentation states: > >> Specifies that the RTS line will be high if bytes are available for transmission. >> After all buffered bytes have been sent, the RTS line will be low. If this value is >> set, it would be an error for an application to adjust the line with >> EscapeCommFunction. This value is ignored in Windows 95; it causes the >> driver to act as if RTS_CONTROL_ENABLE were specified. > > This seems to be the OLD RTS behavior, right? > > So, what I seem to need is to be able to control the RTS line, either using > TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS > when getting ready to TX and clear it when the output buffer is empty). > > Does this make sense, or am I off in the weeds? > Hi Pete OK. That sounds right. I do not know how you would communicate the difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through CommAPI as it stands. I take it you did not find anything either? Perhaps the best thing to do for your code is to toggle the RTS yourself. This could be a feature in the future JSR API perhaps. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 28 20:54:34 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 21:54:34 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <44F3AC6A.10908@gmail.com> Trent Jarvi wrote: > OK. That sounds right. I do not know how you would communicate the > difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through > CommAPI as it stands. I take it you did not find anything either? > > Perhaps the best thing to do for your code is to toggle the > RTS yourself. This could be a feature in the future JSR API perhaps. Yeah, this is what I ended up doing. I had to modify the dll in order to be able to set hardware flow control (which I do want), but leave the RTS flow control at RS_CONTROL_ENABLE. After that I just toggle setRTS(true) when I'm ready to send and setRTS(false) when I get a OUTPUT_BUFFER_EMPTY notification. Haven't tested with real hardware yet, but it seems to work OK. Thanks for the feedback! Pete From Bob_Jacobsen at lbl.gov Tue Aug 29 08:49:02 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 29 Aug 2006 07:49:02 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >is defined as: > > > Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > >which clearly reflects the newer usage style - it keeps the RTS line high >as long as there is space to _receive_ data. And takes it low when the >receive/input buffer is getting full to stop the modem from sending it data. > >Does this jive with other peoples understanding of RTS usage? Can you point to any devices that actually implement this "new" understanding? I think the person who wrote that documentation paragraph is just confused. The original "RTS/CTS" handshaking was extended to input (from DCE to DTE) handshaking via the DTR (Data Terminal Ready) line. I think the person who wrote the double-quoted paragraph above was just confused between the directions, and mixed them up. If you change "RTS" to "DTR" in that paragraph, you get: > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > enabling the DCE to send, when the input buffer has enough room to > > receive data. The driver lowers the DTR line, preventing the DCE to > > send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. which describes how dozens of devices actually work for controlling flow into the DTE (computer). This then leaves RTS/CTS (with RTS usually just stuck high) for controlling flow into the DCE (peripheral). Again, lots of hardware devices actually do this. I don't work on Windows, so can't be sure of what happens. But on the MacOS X version of RXTX, CTS low stops transmission, exactly as the "old" style would expect. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From mschned at basis.com Tue Aug 29 12:57:45 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 12:57:45 -0600 Subject: [Rxtx] Porting to AIX Message-ID: <01f201c6cb9d$034d4f20$341416ac@basis.com> Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar From mschned at basis.com Tue Aug 29 13:58:05 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 13:58:05 -0600 Subject: [Rxtx] Porting to AIX References: <01f201c6cb9d$034d4f20$341416ac@basis.com> Message-ID: <024901c6cba5$714c3560$341416ac@basis.com> After looking through the build messages closer, there is an error building SerialImp.c: gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type Looks like B57600 is not defined and there are no definitions for DEVICEDIR and LOCKDIR on AIX. Can I just a the following to SerialImp.h? #if defined(__aix__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __aix__ */ Mark Schnedar ----- Original Message ----- From: "Mark E. Schnedar" To: Sent: Tuesday, August 29, 2006 12:57 PM Subject: [Rxtx] Porting to AIX Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 29 15:25:35 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 29 Aug 2006 16:25:35 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <84d4a6d50608291425i1fb819d3i615cf9b85b1e9617@mail.gmail.com> On 8/29/06, Bob Jacobsen wrote: > Can you point to any devices that actually implement this "new" understanding? > > I think the person who wrote that documentation paragraph is just confused. The paragraph is from the Windows documentation of its DCB structure which is used to configure the Serial Device. This is what RXTX uses internally. My version is from MSDN, and Google finds the same text here: (search for fRtsControl). I have not seen any mention anywhere of it being incorrect (and yes, I did look, because I thought the same thing). My discussion is based on trying to use RXTX to talk to a device that used the old style of one-way flow control (RTS is raised to SEND data from the PC to the device). An existing VC++ app use the old-style RTS_CONTROL_TOGGLE. RXTX did not - it used the newer style RTS_CONTROL_HANDSHAKE, so things didn't work - the device was seeing RTS HIGH all the time, so it was thinking that the PC was ready to TX all the time. When I switch RXTX to using RTS_CONTROL_ENABLED and manually control RTS, then things work correctly. The behavior is consistent with this understanding if I hook two serial ports on Windows XP in lookback (via null modem). I'd be very surprised if this had not been corrected by M$ by this time. The same structure has been around since WinNT (mid 1990's) - their documentation is typically pretty good. > > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > > enabling the DCE to send, when the input buffer has enough room to > > > receive data. The driver lowers the DTR line, preventing the DCE to > > > send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. There is a seperate field, fDtrControl, which you can set to DTR_CONTROL_HANDSHAKE, that appears to do exactly this. > This then leaves RTS/CTS (with RTS usually just stuck high) for > controlling flow into the DCE (peripheral). Again, lots of hardware > devices actually do this. > > I don't work on Windows, so can't be sure of what happens. But on > the MacOS X version of RXTX, CTS low stops transmission, exactly as > the "old" style would expect. Well, the Linux Serial HOWTO is where I got most of my information. And yes, I thought it was wrong as well, but it's apparently how things are implemented: Donno - but it works for me... Pete From tjarvi at qbang.org Tue Aug 29 19:11:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 29 Aug 2006 19:11:40 -0600 (MDT) Subject: [Rxtx] Porting to AIX In-Reply-To: <024901c6cba5$714c3560$341416ac@basis.com> References: <01f201c6cb9d$034d4f20$341416ac@basis.com> <024901c6cba5$714c3560$341416ac@basis.com> Message-ID: Hi Mark That should do it. You can put ifdef around the B57600 as we did with higher baudrates. You may want to use tip, minicom, kermit or some other serial application on the AIX to confirm that the lockfiles created are correct. Neat stuff. On Tue, 29 Aug 2006, Mark E. Schnedar wrote: > After looking through the build messages closer, > there is an error building SerialImp.c: > > gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o > /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type > > Looks like B57600 is not defined and there are no > definitions for DEVICEDIR and LOCKDIR on AIX. > > Can I just a the following to SerialImp.h? > > #if defined(__aix__) > # define DEVICEDIR "/dev/" > # define LOCKDIR "/var/lock" > # define LOCKFILEPREFIX "LCK.." > # define FHS > #endif /* __aix__ */ > > Mark Schnedar > > > ----- Original Message ----- > From: "Mark E. Schnedar" > To: > Sent: Tuesday, August 29, 2006 12:57 PM > Subject: [Rxtx] Porting to AIX > > > Hi, > > I'm new to rxtx. Currently my company has an interpreter product > that uses rxtx on Windows and Linux. I am trying to get rxtx to > build on AIX. I downloaded rxtx, ran ./configure and make. When > I run make I get the following error: > > libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object > make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 > > Do you have any suggestions on how to fix this problem? > > I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error > on both systems). I did have our system administrator load > automake, autoconf, make (gnu), and gcc. Here are the versions: > > AIX 4.3.3 AIX 5.3.0 > rxtx: 2.1-7r2 2.1-7r2 > autoconf: 2.53 2.59 > automake: 1.5 1.8.5 > make: 3.79.1 3.80 > gcc: (used native cc) 4.0.0 > > Any help would be appreciated. > > Mark Schnedar > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From guille at sms.nl Wed Aug 30 01:14:32 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 09:14:32 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <7.0.1.0.0.20060830091204.03652de0@sms.nl> At 16:49 29/08/2006, Bob Jacobsen wrote: >At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > > > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >is defined as: > > > > > Enables RTS flow-control handshaking. The driver raises the RTS line, > >> enabling the DCE to send, when the input buffer has enough room to > >> receive data. The driver lowers the RTS line, preventing the DCE to > >> send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. > > > >which clearly reflects the newer usage style - it keeps the RTS line high > >as long as there is space to _receive_ data. And takes it low when the > >receive/input buffer is getting full to stop the modem from sending it data. > > > >Does this jive with other peoples understanding of RTS usage? > >Can you point to any devices that actually implement this "new" understanding? Many (most) of the embedded devices we work with implement this kind of flow control. The host (DTE) raises RTS when it can receive data, and lowers it when the input buffers are full. In turn it watches the CTS line to see whether it can send data to the DCE. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From tjarvi at qbang.org Wed Aug 30 01:23:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 30 Aug 2006 01:23:46 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830091204.03652de0@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 16:49 29/08/2006, Bob Jacobsen wrote: >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: >>> >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >>> is defined as: >>> >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, >>>> enabling the DCE to send, when the input buffer has enough room to >>>> receive data. The driver lowers the RTS line, preventing the DCE to >>>> send, when the input buffer does not have enough room to receive >>>> data. If this value is used, it is an error for the application to adjust >>>> the line with EscapeCommFunction. >>> >>> which clearly reflects the newer usage style - it keeps the RTS line high >>> as long as there is space to _receive_ data. And takes it low when the >>> receive/input buffer is getting full to stop the modem from sending it data. >>> >>> Does this jive with other peoples understanding of RTS usage? >> >> Can you point to any devices that actually implement this "new" understanding? > > Many (most) of the embedded devices we work with implement this kind of flow > control. The host (DTE) raises RTS when it can receive data, and lowers it > when the input buffers are full. In turn it watches the CTS line to see > whether it can send data to the DCE. > I think this explains some hardware control 'bugs' I've seen. -- Trent Jarvi tjarvi at qbang.org From guille at sms.nl Wed Aug 30 02:01:35 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 10:01:35 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> At 09:23 30/08/2006, Trent Jarvi wrote: >On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > > > At 16:49 29/08/2006, Bob Jacobsen wrote: > >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >>> > >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >>> is defined as: > >>> > >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, > >>>> enabling the DCE to send, when the input buffer has enough room to > >>>> receive data. The driver lowers the RTS line, preventing the DCE to > >>>> send, when the input buffer does not have enough room to receive > >>>> data. If this value is used, it is an error for the > application to adjust > >>>> the line with EscapeCommFunction. > >>> > >>> which clearly reflects the newer usage style - it keeps the RTS line high > >>> as long as there is space to _receive_ data. And takes it low when the > >>> receive/input buffer is getting full to stop the modem from > sending it data. > >>> > >>> Does this jive with other peoples understanding of RTS usage? > >> > >> Can you point to any devices that actually implement this "new" > understanding? > > > > Many (most) of the embedded devices we work with implement this > kind of flow > > control. The host (DTE) raises RTS when it can receive data, and lowers it > > when the input buffers are full. In turn it watches the CTS line to see > > whether it can send data to the DCE. > > > >I think this explains some hardware control 'bugs' I've seen. I think the above is the most widespread use, but that may just mean it is the most widespread use in our specific segment (embedded systems). Some UART chips (e.g. from Exar) implement this kind of flow control directly in hardware. For example the Exar can be configured to suspend transmission when it sees CTS low, and resume transmission when it sees CTS high. This is also consistent with our experience. Maybe this helps clarify: http://www.tldp.org/HOWTO/Text-Terminal-HOWTO-10.html#ss10.7 Note the "Old RTS/CTS handshaking is different" section, which refers to "older terminals" whereas newer equipment would use RTS/CTS flow control (or equivalently DTR/DTS) as described above. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From Bob_Jacobsen at lbl.gov Wed Aug 30 07:55:31 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 30 Aug 2006 06:55:31 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> <7.0.1.0.0.20060830095557.0374ff28@sms.nl> Message-ID: I think we all agree that CTS inactive means "Send no more from DTE to DCE". The question is how to express the other direction, "Send no more from DCE to DTE". There are two parts to this question: What do various DTE-like devices do, and what do various DCE-like devices expect? Electrically, the lines that go that direction are DTR, DCD, and RTS (plus some special-purpose lines that are rarely present). All three devices I work most with respect the DTR lead. On the other hand, the FTDI chips for doing serial over USB provide either (RTS and CTS) or (DTR and DSR) as the two leads. What we're probably seeing is two different approaches, that have propagated separately. That's a problem. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From Pawan.Kharbanda at dot.state.co.us Wed Aug 30 09:07:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 30 Aug 2006 09:07:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0455E5E5@hqexchange3.dot.state.co.us> Trent, Sorry for not responding earlier to your email. I was actually waiting for the release of our software on the new Hardware. As I mentioned in my previous emails, RXTX crashes and locks up serial ports with the older version of Redhat (Linux 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:28:55 EDT 2005 i686 i686 i386 GNU/Linux), it might work ok if you are using one or 2 ports but anything more than that it has issues. I was using JDK1.5.0_06 and older firmwares of Digi boxes. Let me know if you need any more specific information of the older system. Thanks Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Thursday, August 10, 2006 5:40 AM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even > after 10000 operations (now I am trying 100,000 :). This is all with > the original RXTX 2.1.7 (final) api's without any of my fixes that I > have been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying > the RXTX saying the suggested kernel for Redhat Linux is > 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Aug 1 01:11:30 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 1 Aug 2006 09:11:30 +0200 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <34B6BC40-1405-4A13-8054-0FC6CE10466A@buechse.de> This is a problem with lock files. You should find it somewhere in the documentation... On 01.08.2006, at 03:53, Richard P. Welty wrote: > trying to get my app running on a Mac OS X powerbook, when > the following is executed as the first thing inside the > run method of a Thread: > > > try { > port = (SerialPort) selectedPort.open( > this.getClass().getName(), 2000); > } catch ( PortInUseException ex){ > ex.printStackTrace(); > return; > } > > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java: > 354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run > (ScaleWatcher.java:143) > > i've not seen any documentation suggesting that rxtx would be finicky > about application names... > > thanks for any suggestions, > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From rwelty at suespammers.org Tue Aug 1 05:37:53 2006 From: rwelty at suespammers.org (Richard P. Welty) Date: Tue, 01 Aug 2006 07:37:53 -0400 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <44CF3D11.9060108@suespammers.org> Richard P. Welty wrote: > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) Aha, a confusing error message. it's really a lock file problem; the code is trying to fill in the application name but when it's getting "Unknown Application" and filling that in... richard From ajmas at sympatico.ca Tue Aug 1 13:10:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:10:59 -0400 Subject: [Rxtx] Application Name? Message-ID: <20060801191059.HFCD18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> You need the source code in CVS. The forth coming 2.18 will correct this, but currently the only place to find the correction is in CVS. No idea when 2.18 is due. > > From: "Richard P. Welty" > Date: 2006/08/01 Tue AM 07:37:53 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Application Name? > > Richard P. Welty wrote: > > > i get the following: > > > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > at > > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) > > Aha, a confusing error message. it's really a lock file problem; the > code is trying to fill in the application name but when it's getting > "Unknown Application" and filling that in... > > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:15:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:15:57 -0400 Subject: [Rxtx] Do interfaces break backwards compatibility? Message-ID: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> It is the class that decides to add serializable that needs to worry about those issues. For the most part serial ports and their connection states should be considered as transient, since there is no guarantee they will still be present or that their state will be, especially in a USB world. What you can store is the port settings and port id and then simply test for port availability next time. Nothing else should be assumed. > > From: Gregg Wonderly > Date: 2006/07/31 Mon PM 01:21:19 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Do interfaces break backwards compatibility? > > Doug Berkland wrote: > > As far as I can tell, nothing in either RXTX or Sun's JavaCOMM > > implements Serializable. Therefore, there are no worries from that > > either. (I can't think of a reason anything in JavaCOMM should > > implement Serializable either.) > > Any interface in javax.comm can become implemented by a serializable object. > Thus, if someone wants to provide remote access to a serial port, then they > might (and I think this is not wise) choose to subclass and add Serializable to > the interface list. > > It's that kind of Serialization compatibility that I'm talking about. > > Gregg Wonderly > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:18:11 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:18:11 -0400 Subject: [Rxtx] precompiled for Intel Mac? Message-ID: <20060801191811.FLJY27612.tomts16-srv.bellnexxia.net@smtp1.sympatico.ca> > > From: Joachim Buechse > There will be. However not before we have figured out some remaining issues. What issues are remaining? Andre From Pawan.Kharbanda at dot.state.co.us Tue Aug 1 16:55:08 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 1 Aug 2006 16:55:08 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Hi, I am also experiencing occasional JVM crash thru the native code. I am attaching the log from the crash. Any ideas what might be causing it???? Regards Pawan Kharbanda # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # --------------- T H R E A D --------------- Current thread (0x8d000480): JavaThread "Thread-119" [_thread_in_native, id=111 51] siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba Registers: EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 Top of Stack: (sp=0x8d3482b8) 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 0x8d348308: 00000000 00000002 00000000 00000000 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 Instructions: (pc=0xb75e39b2) 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~StubRoutines::call_stub V [libjvm.so+0x2607ec] V [libjvm.so+0x423828] V [libjvm.so+0x260045] V [libjvm.so+0x2600de] V [libjvm.so+0x2d7745] V [libjvm.so+0x4c2ba3] V [libjvm.so+0x424338] C [libpthread.so.0+0x4dd8] 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 ) =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, id=11026] 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, id=11023] From tjarvi at qbang.org Tue Aug 1 18:46:21 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 1 Aug 2006 18:46:21 -0600 (MDT) Subject: [Rxtx] JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Message-ID: On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) > C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] > 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, > id=11034] > 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, > id=11033] > 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, > id=11032] > 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, > id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] > 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, > id=11028] > 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, > id=11027] > 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, > id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] > 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- Index: termios.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/termios.c,v retrieving revision 1.9.2.57 diff -u -r1.9.2.57 termios.c --- termios.c 4 Jun 2006 02:50:01 -0000 1.9.2.57 +++ termios.c 11 Jun 2006 21:51:10 -0000 @@ -1048,26 +1048,29 @@ if ( !first_tl ) { port->prev = NULL; + port->next = NULL; first_tl = port; } else { - while ( index->next ) + while ( ( index->fd < port->fd ) && index->next ) index = index->next; - if ( port == first_tl ) + if ( index->fd > port->fd ) { - port->prev = NULL; - port->next = first_tl; - first_tl->prev = port; - first_tl = port; + /* inserting previously closed fd */ + port->prev = index->prev; + port->next=index + index->prev->next = port; + index->prev = port; } else { + /* adding to end of list */ port->prev = index; + port->next = NULL; index->next = port; } } - port->next = NULL; LEAVE( "add_port" ); return port; From gergg at cox.net Tue Aug 1 23:25:19 2006 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 02 Aug 2006 00:25:19 -0500 Subject: [Rxtx] Do interfaces break backwards compatibility? In-Reply-To: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <44D0373F.7020600@cox.net> Andre-John Mas wrote: > It is the class that decides to add serializable that needs to worry about those issues. > For the most part serial ports and their connection states should be considered as > transient, since there is no guarantee they will still be present or that their state > will be, especially in a USB world. Right, but when you provide an interface as the standard, that opens the doors for a lot more interpretation and variation. An abstract class can indicate a lot more about what the expected implementation is. Gregg Wonderly From lyon at docjava.com Wed Aug 2 06:02:15 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:02:15 -0400 Subject: [Rxtx] jsr spec and license issues Message-ID: Hi All, Trent and I have been discussing the license issues of the JSR spec and code that we develop, as a community. Here is what we have come up with: >During the development, the new JSR spec that we derive >will be >covered under the LGPL license. Since it is >just interfaces, any contributions will come back to me, for inclusion >into the specification. The goal is to provide a detailed set of >interfaces that >document the present state of our reference model. I am using >the RXTX as the reference model. If there is something missing from >the reference model, or if the reference model has something that should >not be there, we will need to discuss it. > >After Sun accepts the JSR, I, as the copyright holder, can issue >a version with a JSR compatible license. > >The goal is to migrate the interfaces into javax.comm. Does this sound like a reasonable plan to everyone? Thanks! - Doug From joachim at buechse.de Wed Aug 2 06:21:03 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 14:21:03 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Good day, quite frankly I think that this is a very bad idea. This specification (!) should be in the public domain and nowhere else. Defining a spec under the (L)GPL makes absolutely no sense. After all it is a specification not an implementation. There is no or only trivial code attached to it. So while nothing can be gained by putting it under the LGPL, a lot can be lost - for example the contribution of companies that do not like to open source their implementations. Furthermore you are plain wrong assuming you will be the copyright holder to additions made by other people. Best regards, Joachim On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for >> inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that >> should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Aug 2 06:39:28 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:39:28 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Hi All, I don't know anything about licensing issues. The below sounds reasonable. If we make this public domain, will that be compatible with Sun's JSR? Thanks! - DL P.S. I really don't care what we do, as long as there is some sort of collective agreement. >Good day, > >quite frankly I think that this is a very bad idea. This specification >(!) should be in the public domain and nowhere else. > >Defining a spec under the (L)GPL makes absolutely no sense. After all? >it is a specification not an implementation. There is no or only? >trivial code attached to it. So while nothing can be gained by? >putting it under the LGPL, a lot can be lost - for example the? >contribution of companies that do not like to open source their? >implementations. > >Furthermore you are plain wrong assuming you will be the copyright? >holder to additions made by other people. > >Best regards, >Joachim > > >On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for? >>> inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that? >>> should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> >> Does this sound like a reasonable plan to everyone? >> >> Thanks! >> - Doug >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 07:50:09 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 10:50:09 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D0AD91.4080103@gmail.com> Hi, I have been searching the web and here it is: http://jcp.org/en/resources/license_reference Here there is a list of the licenses that are compatible with the JCP for JSR submitting. I think that Apache, CDDL, CPL and OSL are the one that are compatible with our needs. But I think that Apache is the best for us, Doug why do not make a votation? Regards, Manuel > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. > >> Good day, >> >> quite frankly I think that this is a very bad idea. This specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From lyon at docjava.com Wed Aug 2 08:10:55 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 10:10:55 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D0AD91.4080103@gmail.com> References: <44D0AD91.4080103@gmail.com> Message-ID: Hi All, I have no objection to an Apache license for the JSR interfaces that we produce. Would anyone care to comment? Joachim: Does this address your public domain concerns? How does this impact the reference implementation (i.e. RXTX)? Thanks! - DL >Hi, >I have been searching the web and here it is: >http://jcp.org/en/resources/license_reference >Here there is a list of the licenses that are compatible with the JCP >for JSR submitting. >I think that Apache, CDDL, CPL and OSL are the one that are compatible >with our needs. >But I think that Apache is the best for us, Doug why do not make a votation? >Regards, >Manuel > >> Hi All, >> I don't know anything about licensing issues. >> The below sounds reasonable. If we make this public domain, >> will that be compatible with Sun's JSR? >> Thanks! >> - DL >> P.S. I really don't care what we do, as long as there is >> some sort of collective agreement. >>?? >>> Good day, >>> >>> quite frankly I think that this is a very bad idea. This specification >>> (!) should be in the public domain and nowhere else. >>> >>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>> it is a specification not an implementation. There is no or only >>> trivial code attached to it. So while nothing can be gained by >>> putting it under the LGPL, a lot can be lost - for example the >>> contribution of companies that do not like to open source their >>> implementations. >>> >>> Furthermore you are plain wrong assuming you will be the copyright >>> holder to additions made by other people. >>> >>> Best regards, > >> Joachim >>> >>> >>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>> >>>???? >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>?????? >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for >>>>> inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that >>>>> should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>>>???????? >>>> Does this sound like a reasonable plan to everyone? >>>> >>>> Thanks! >>>> - Doug >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>?????? >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>???? >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 08:20:29 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 11:20:29 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D0AD91.4080103@gmail.com> Message-ID: <44D0B4AD.2050106@gmail.com> Doug; > How does this impact the reference implementation (i.e. RXTX)? > Fuck I have not thinked about that, we would need that everyone who had colaborated with RXTX and have putted code on it to agree a license chaging. Or start from sractch. I don't know if Trent have the right to do that. Regards, Manuel > > >> Hi, >> I have been searching the web and here it is: >> http://jcp.org/en/resources/license_reference >> Here there is a list of the licenses that are compatible with the JCP >> for JSR submitting. >> I think that Apache, CDDL, CPL and OSL are the one that are compatible >> with our needs. >> But I think that Apache is the best for us, Doug why do not make a votation? >> Regards, >> Manuel >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> >> >> Joachim >> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 08:21:15 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 16:21:15 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Putting something in the public domain means, that it can be used by anyone for whatever (s)he thinks is appropriate. The authors define no restriction regarding it's use. That's how any specification should be. Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From berkland at spamcop.net Wed Aug 2 08:50:50 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 10:50:50 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> You may want to consider making it available under two separate licenses. 1 - LGPL as it is today The LGPL can be used by anyone wanting to extend the current functionality, as long as they provide code for anything they change. 2 - Sun Community Source License (SCSL) http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf The SCSL will allow anyone who wants to do a closed source implementation from the ground up to do so, if I'm reading it correctly, as long as they don't use any of the code from the Reference Implementation. This will satisfy any company that wants to have a closed-source implementation, but not help them out very much. On 8/2/06, Joachim Buechse wrote: > Putting something in the public domain means, that it can be used by > anyone for whatever (s)he thinks is appropriate. The authors define > no restriction regarding it's use. That's how any specification > should be. > > Best regards, > Joachim > > > On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > > > Hi All, > > I don't know anything about licensing issues. > > The below sounds reasonable. If we make this public domain, > > will that be compatible with Sun's JSR? > > Thanks! > > - DL > > P.S. I really don't care what we do, as long as there is > > some sort of collective agreement. > >> Good day, > >> > >> quite frankly I think that this is a very bad idea. This > >> specification > >> (!) should be in the public domain and nowhere else. > >> > >> Defining a spec under the (L)GPL makes absolutely no sense. After all > >> it is a specification not an implementation. There is no or only > >> trivial code attached to it. So while nothing can be gained by > >> putting it under the LGPL, a lot can be lost - for example the > >> contribution of companies that do not like to open source their > >> implementations. > >> > >> Furthermore you are plain wrong assuming you will be the copyright > >> holder to additions made by other people. > >> > >> Best regards, > >> Joachim > >> > >> > >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> > >>> Hi All, > >>> Trent and I have been discussing the license issues of the > >>> JSR spec and code that we develop, as a community. > >>> Here is what we have come up with: > >>> > >>>> During the development, the new JSR spec that we derive > >>>> will be > >>>> covered under the LGPL license. Since it is > >>>> just interfaces, any contributions will come back to me, for > >>>> inclusion > >>>> into the specification. The goal is to provide a detailed set of > >>>> interfaces that > >>>> document the present state of our reference model. I am using > >>>> the RXTX as the reference model. If there is something missing > >>>> from > >>>> the reference model, or if the reference model has something that > >>>> should > >>>> not be there, we will need to discuss it. > >>>> > >>>> After Sun accepts the JSR, I, as the copyright holder, can issue > >>>> a version with a JSR compatible license. > >>>> > >>>> The goal is to migrate the interfaces into javax.comm. > >>> > >>> Does this sound like a reasonable plan to everyone? > >>> > >>> Thanks! > >>> - Doug > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From naranjo.manuel at gmail.com Wed Aug 2 09:03:02 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 12:03:02 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> References: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> Message-ID: <44D0BEA6.2040408@gmail.com> Or even better, you can use Apache v2, which allows both Open Source and Closed Source forms ;-) > You may want to consider making it available under two separate licenses. > > 1 - LGPL as it is today > > The LGPL can be used by anyone wanting to extend the current > functionality, as long as they provide code for anything they change. > > 2 - Sun Community Source License (SCSL) > http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf > > The SCSL will allow anyone who wants to do a closed source > implementation from the ground up to do so, if I'm reading it > correctly, as long as they don't use any of the code from the > Reference Implementation. This will satisfy any company that wants to > have a closed-source implementation, but not help them out very much. > > On 8/2/06, Joachim Buechse wrote: > >> Putting something in the public domain means, that it can be used by >> anyone for whatever (s)he thinks is appropriate. The authors define >> no restriction regarding it's use. That's how any specification >> should be. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This >>>> specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> Joachim >>>> >>>> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing >>>>>> from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 09:46:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 17:46:25 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> I assume that javax.comm/RXTX is to be redefined using Interfaces. In this case we should separate 2 things: 1) The specification and it's incarnation in the form of java classes defining the interfaces. 2) The actual implementation of the functionality. It is possible that 1) may contain some trivial code in abstract or none abstract classes (ie PortFactory, PortRegistry, etc). Doug's original question was regarding 1) - unless I misunderstood. I personally think that 1) should be in the public domain. It should not be covered by any restrictions what-so-ever. Let it be free as in "totally free in any respect". I do not care under which license 2) is released. Why? Because it is in my very interest that all/almost all vendors include implementations with their distributions. Which will only happen if they do not need to respect open source licenses. (javax.comm is not nearly as important as the Apache web server or MySql, so nobody will take licensing risks). Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ssbello at gmail.com Wed Aug 2 10:28:30 2006 From: ssbello at gmail.com (Simone) Date: Wed, 2 Aug 2006 18:28:30 +0200 Subject: [Rxtx] pocketPC 2003 Message-ID: <39ed505d0608020928k6ceb01aen470c2e6a78c5a6b0@mail.gmail.com> Does anyone know if the Rxtx works on PocketPc 2003? If yes, could you, please, give me some suggestion. Thanks, Simone Bell? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/72e0fb87/attachment-0332.html From berkland at spamcop.net Wed Aug 2 13:00:10 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 15:00:10 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> Message-ID: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> How about these for the "Business Terms" of the new JSR: > The specification will be released in accordance with standard terms > as specified by the JCP process. > > The reference implementation (RI) will be delivered in binary form > free of charge from http://rxtx.org. Licensing details are expected to > be under the Binary Code License (BCL). > > The source for the reference implementation is expected to be > delivered via the Limited GNU Public License (LGPL) and available free > of charge. > > The TCK will be made available free of charge to all J2SE and J2EE licensees. > > The TCK will be offered for license at no charge, without support or > any trademark license rights, to qualified not-for-profit entities > (including not-for-profit) academic institutions) and qualified > individuals engaged in efforts to create compatible implementations of > the Specification. From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 13:13:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 13:13:33 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E495@hqexchange3.dot.state.co.us> Trent, I didn't exactly get it. Again I am not a C guy, maybe its very simple for you but I don't see any checks for FD (as written in the patch for termios.c) in the initialise_event_info_struct, I see some checks in the interruptEventLoop call. Second as you explained I open three("/dev/cuf01","/dev/cuf01","/dev/cuf01") ports, I close the 2nd ("/dev/cuf02", the other 2 are still open) , I never try to open the third ("/dev/cuf03") port again if it is already open. Are you planning to have a fix for this in the next release 2.1.8. Its very important for me to have a fix for this, its causing some major headaches for our project. I know you have your regular job too, I will appreciate any help. Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, August 01, 2006 6:46 PM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java > VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic > frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) C [librxtxSerial.so+0x69b2] > initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] > Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" > [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: > /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread > "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 > JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon > [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" > daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread > "AdapterThread" daemon [_thread_blocked, id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, > id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Wed Aug 2 13:14:20 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 16:14:20 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> Message-ID: <44D0F98C.1070600@gmail.com> +1 Agree > How about these for the "Business Terms" of the new JSR: > > >> The specification will be released in accordance with standard terms >> as specified by the JCP process. >> >> The reference implementation (RI) will be delivered in binary form >> free of charge from http://rxtx.org. Licensing details are expected to >> be under the Binary Code License (BCL). >> >> The source for the reference implementation is expected to be >> delivered via the Limited GNU Public License (LGPL) and available free >> of charge. >> >> The TCK will be made available free of charge to all J2SE and J2EE licensees. >> >> The TCK will be offered for license at no charge, without support or >> any trademark license rights, to qualified not-for-profit entities >> (including not-for-profit) academic institutions) and qualified >> individuals engaged in efforts to create compatible implementations of >> the Specification. >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From savagobr at yahoo.com Wed Aug 2 13:40:42 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:40:42 -0700 (PDT) Subject: [Rxtx] jsr spec and license issues Message-ID: <20060802194042.83599.qmail@web53807.mail.yahoo.com> Friends Apache seems ok... if I get it right, does it *almost* equals to BSD? Regarding public domain: I think that the good people that spent so much time on this library will like to keep some rights over its own work, don't you think? Best regards Savago --------------------------------- Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/79abdfd5/attachment-0332.html From savagobr at yahoo.com Wed Aug 2 13:58:04 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:58:04 -0700 (PDT) Subject: [Rxtx] JVM Crashing Message-ID: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago --------------------------------- Groups are talking. We´re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/47d561ae/attachment-0332.html From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 14:09:18 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 14:09:18 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E4AD@hqexchange3.dot.state.co.us> Thank You :) ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adenilson Cavalcanti Sent: Wednesday, August 02, 2006 1:58 PM To: rxtx at qbang.org Subject: Re: [Rxtx] JVM Crashing Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago ________________________________ Groups are talking. We?re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/b4eb22cf/attachment-0332.html From tjarvi at qbang.org Wed Aug 2 20:23:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 20:23:42 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > Hi Doug As mentioned off the list, the important point in my mind is that everyone is on the same base more than what license is decided upon. These things are just best addressed early so there isn't confusion. The Apache license is fairly standard in the Open Source community vs several of the relatively unknown [and obviously redundat even by their descriptions] offerings by Sun. Perhaps one option here that would kill a few birds with one stone is to dual license the interface as Apache and LGPL. This would allow everyone to use the interfaces without needing to do wastefull work for internal license requirements. Projects could choose between the two the license that best suits their needs. If there is a software shop doing Java that isn't familiar with the Apache license, they must be doing some strange Java. I do think it is foolhearty to blindly travel in public domain but nobody is trying to undermine the spec files. The intent is to use the work for a JSR submission that everyone can use without confusion later on down the line. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 21:01:16 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 20:01:16 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D166FC.9090005@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> Does this sound like a reasonable plan to everyone? >> > > Hi Doug > > As mentioned off the list, the important point in my mind is that everyone > is on the same base more than what license is decided upon. These things > are just best addressed early so there isn't confusion. > > The Apache license is fairly standard in the Open Source community vs > several of the relatively unknown [and obviously redundat even by > their descriptions] offerings by Sun. The JCP is a reasonable process for what the RxTx project intends to achieve by evolving the API. There isn't much to lose by going the JSR route. The community will benefit from a fair API like so many other that have undergone the process. Sun isn't going to own the API or manipulate it into anything weird anymore than anyone else is. I think your fears are rather vague and unfounded. Which isn't to say that I am a well-informed representative of the JCP, I've only sat through one JSR process and we ended up with javax.usb, and IBM got what it wanted out of the deal and the community got a very nice standard. Paul > > Perhaps one option here that would kill a few birds with one stone is to > dual license the interface as Apache and LGPL. This would allow everyone > to use the interfaces without needing to do wastefull work for internal > license requirements. Projects could choose between the two the license > that best suits their needs. If there is a software shop doing Java that > isn't familiar with the Apache license, they must be doing some strange > Java. > > I do think it is foolhearty to blindly travel in public domain but nobody > is trying to undermine the spec files. The intent is to use the work for > a JSR submission that everyone can use without confusion later on down the > line. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Aug 2 22:10:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 22:10:48 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D166FC.9090005@sun.com> References: <44D166FC.9090005@sun.com> Message-ID: On Wed, 2 Aug 2006, Paul Klissner wrote: > Trent Jarvi wrote: >> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> Does this sound like a reasonable plan to everyone? >>> >> >> Hi Doug >> >> As mentioned off the list, the important point in my mind is that everyone >> is on the same base more than what license is decided upon. These things >> are just best addressed early so there isn't confusion. >> >> The Apache license is fairly standard in the Open Source community vs >> several of the relatively unknown [and obviously redundat even by >> their descriptions] offerings by Sun. > > The JCP is a reasonable process for what the RxTx project intends > to achieve by evolving the API. > > There isn't much to lose by going the JSR route. The community will > benefit from a fair API like so many other that have undergone > the process. Sun isn't going to own the API or manipulate it > into anything weird anymore than anyone else is. I think your > fears are rather vague and unfounded. > > Which isn't to say that I am a well-informed representative > of the JCP, I've only sat through one JSR process and we ended > up with javax.usb, and IBM got what it wanted out of the deal > and the community got a very nice standard. > Hi Paul The JCP should work fine. As our intentions are in line, licensing so that everyone can use the interface code should not be a problem. Note that the current default right now is that the interfaces are copyrighted and no license for distribution is included. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 22:33:51 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 21:33:51 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D166FC.9090005@sun.com> Message-ID: <44D17CAF.1090802@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Paul Klissner wrote: > >> Trent Jarvi wrote: >>> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>> Does this sound like a reasonable plan to everyone? >>>> >>> Hi Doug >>> >>> As mentioned off the list, the important point in my mind is that everyone >>> is on the same base more than what license is decided upon. These things >>> are just best addressed early so there isn't confusion. >>> >>> The Apache license is fairly standard in the Open Source community vs >>> several of the relatively unknown [and obviously redundat even by >>> their descriptions] offerings by Sun. >> The JCP is a reasonable process for what the RxTx project intends >> to achieve by evolving the API. >> >> There isn't much to lose by going the JSR route. The community will >> benefit from a fair API like so many other that have undergone >> the process. Sun isn't going to own the API or manipulate it >> into anything weird anymore than anyone else is. I think your >> fears are rather vague and unfounded. >> >> Which isn't to say that I am a well-informed representative >> of the JCP, I've only sat through one JSR process and we ended >> up with javax.usb, and IBM got what it wanted out of the deal >> and the community got a very nice standard. >> > > Hi Paul > > The JCP should work fine. As our intentions are in line, licensing so > that everyone can use the interface code should not be a problem. Sorry, looks like my concerns were unfounded. I haven't been following the threads closely this week, as work got busy with an escalated issue and new project. Sorry about that. > > Note that the current default right now is that the interfaces are > copyrighted and no license for distribution is included. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Aug 3 03:45:56 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 03 Aug 2006 05:45:56 -0400 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: Hi All, I have been waiting a day for things to cool down. Licensing appears to be a hot-button topic. I have no objection to dual license the interfaces as both Apache and LGPL. Some thoughts: Goal: developers wish to work together on a common piece of code that the team needs. It makes sense that the code base they work on should be Apache-licensed. That makes it possible for the team to use and develop common code, even if the end result is LGPL'd as a whole. If we combine licenses, we must follow the terms of both licenses when distributing the combined work. Thus, the dual license contains the super set of terms in the licenses of Apached and LGPL. This should address concern about using Apache-licensed code within LGPL projects due to the FSF's claim that they are incompatible. Here is a draft statement for RXSL: The RXTX Specification Library (RXSL) uses a dual license strategy for the source code. These licenses are the GNU Lesser General Public License (LGPL) and the Apache License. I strongly encourage users to use the LGPL license and participate fully in the free software community. Dual licensing of the RXSL source code provides open and free access to the technology both for the GPL community and for other developers or companies that cannot use the GPL. Dual license is common practice in open source projects like OpenOffice, Perl and Mozilla. Through the combined use of LGPL and Apache license, developers will have a high degree of freedom yet compatibility and interoperability will be preserved. You can freely modify, extend, and improve the RXSL source code. The only question is whether or not you must provide the source code and contribute modifications to the community. The GNU and Apache licenses allow different ranges of flexibility in this regard, but in the end, regardless of the license used, any and all incompatible changes must be published openly. Note that there is the RXTX Reference Model that uses the org.rxtx package, which itself is protected by the LGPL. This may be part of the distribution, however, it can not be redistributed using a different license. Is everybody OK with this? Thanks Trent, great idea! - Doug From joachim at buechse.de Thu Aug 3 04:15:44 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 3 Aug 2006 12:15:44 +0200 Subject: [Rxtx] JVM Crashing In-Reply-To: <20060802195804.70935.qmail@web53812.mail.yahoo.com> References: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Message-ID: <6ABA2AB2-CECE-4C4B-A7D6-0CDF8B9C95A8@buechse.de> I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of > rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jvermillard at archean.fr Thu Aug 3 04:26:48 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Thu, 03 Aug 2006 12:26:48 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <1154600808.16732.18.camel@localhost.localdomain> Hi, I'm a developer of the Apache MINA framework. It's a network application framework which helps users develop high performance and high scalability network applications easily. http://directory.apache.org/subprojects/mina/index.html . I would like to integrate serial connection to the framework (actualy supporting TCP, UDP (broadcast) and in VM communications), but LGPL is an issue for me. An Apache License would be pretty usefull for me and integrate rxtx functionnalities easly. Thanks, Julien Le jeudi 03 ao?t 2006 ? 05:45 -0400, Dr. Douglas Lyon a ?crit : > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/755cca7f/smime-0332.bin From pascal at quies.net Thu Aug 3 04:32:35 2006 From: pascal at quies.net (Pascal S. de Kloe) Date: Thu, 3 Aug 2006 12:32:35 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <200608031232.35838.pascal@quies.net> Hi Doug, The Apache license is unnessesary complex. It puts all kinds of limitations on the usage. Is there a particular reason why people chose this or was it just the familiar name? I agree with Joachim (again) that the specification and the interfaces should be public domain. However, if we realy need a license then have a look at the X11 license because that one is compatible with the GPL and suits our needs: http://www.fsf.org/licensing/licenses/index_html http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3 ---- start: implementation Copyright (C) 2006 Sun Microsystems, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Sun Microsystems shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Sun Microsystems. Java is a trademark of Sun Microsystems, Inc. ---- end Op donderdag 3 augustus 2006 11:45, schreef Dr. Douglas Lyon: > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Aug 3 05:17:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 05:17:07 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154600808.16732.18.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: On Thu, 3 Aug 2006, Julien Vermillard wrote: > Hi, > > I'm a developer of the Apache MINA framework. It's a network application > framework which helps users develop high performance and high > scalability network applications easily. > http://directory.apache.org/subprojects/mina/index.html . I would like > to integrate serial connection to the framework (actualy supporting TCP, > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > An Apache License would be pretty usefull for me and integrate rxtx > functionnalities easly. > > Thanks, > > Julien > Hi Julien The rxtx license itself will not change. This is just the interface. You would be free to implement an rxtx replacement if the LGPL low level code is a problem for you. These licensing details would make it possible to take the interface code instead of needing to recode them for a new project. You are probably confusing the license problems with the GPL not the LGPL though you can share links to concerns off the list if you would like to go through them. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 11:59:48 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 11:59:48 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E516@hqexchange3.dot.state.co.us> Joachim, I think my both problems (JVM crashing & Port Locking) are being caused by the corruption of "Event Info Struct / EIS" I have noticed with in EIS my "FD" and "Closing" value being overwritten. The problem is definitely in SerialImp.c file. I am trying to understand what the code does and try to pin point the problem by trying few other options. I will keep everybody posted. Regards Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Joachim Buechse Sent: Thursday, August 03, 2006 4:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Thu Aug 3 13:50:07 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 14:50:07 -0500 Subject: [Rxtx] slow startup Message-ID: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete From brian at mbari.org Thu Aug 3 14:05:57 2006 From: brian at mbari.org (Brian Schlining) Date: Thu, 3 Aug 2006 13:05:57 -0700 Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> References: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Message-ID: Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B > Greetings, > I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/ > qbang.org). > > In testing things out, I ran the list ports example from the Wiki, > and it seems to take quite a while for the library to initialize? > Like on the order of 30+ seconds or so after startup (and the RXTX > banner prints), and before the application starts running. > > Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then > I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ > terminal server) and I'm wondering if they are not responding properly > and this is causing the slow startup? Or is this a known problem of > some kind, or maybe something on my system is screwy? > > Thanks, > Pete > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/6123f730/attachment-0331.html From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 14:13:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 14:13:47 -0600 Subject: [Rxtx] slow startup Message-ID: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Hi Pete, RXTX does open and close the ports in Windows. Try downloading utility like PORTMON(only for windows) and you can see that whenever you load RXTX it tries to register all the available COMM ports in the system. It is a little slow if you have virtual ports, we use digi as a terminal server, Its going to get worst of you have comm ports in 100's Thanks Pawan Kharbanda ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Brian Schlining Sent: Thursday, August 03, 2006 2:06 PM To: RXTX Developers and Users Subject: Re: [Rxtx] slow startup Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/94fd105d/attachment-0331.html From pete.flugstad at gmail.com Thu Aug 3 14:32:04 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 15:32:04 -0500 Subject: [Rxtx] slow startup In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Message-ID: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> On 8/3/06, Kharbanda, Pawan wrote: > RXTX does open and close the ports in Windows. Try downloading utility > like PORTMON(only for windows) and you can see that whenever you load RXTX > it tries to register all the available COMM ports in the system. It is a > little slow if you have virtual ports, we use digi as a terminal server, Its > going to get worst of you have comm ports in 100's Okay, I can understand that, but from the PORTMON output, it looks like it's opening each port TWICE: 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS ... 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS Also, assuming instead of listing the ports I wanted to just open one, I'm still seeing the 30 second delay, so it's scanning at startup regardless of what the Java code is going to do. Probably necessary, but annoying. I know, I know, contribute patches... :-) Thanks, Pete From tjarvi at qbang.org Thu Aug 3 15:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 15:04:42 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: On Thu, 3 Aug 2006, Pete Flugstad wrote: > On 8/3/06, Kharbanda, Pawan wrote: >> RXTX does open and close the ports in Windows. Try downloading utility >> like PORTMON(only for windows) and you can see that whenever you load RXTX >> it tries to register all the available COMM ports in the system. It is a >> little slow if you have virtual ports, we use digi as a terminal server, Its >> going to get worst of you have comm ports in 100's > > Okay, I can understand that, but from the PORTMON output, it looks > like it's opening each port TWICE: > > 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > ... > 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > > Also, assuming instead of listing the ports I wanted to just open one, > I'm still seeing the 30 second delay, so it's scanning at startup > regardless of what the Java code is going to do. Probably necessary, > but annoying. > > I know, I know, contribute patches... :-) > I think this problem is in RXTXCommDriver.java. I've just not tracked it down but it should be in the java code, not the native code so easy enough to track down. -- Trent Jarvi tjarvi at qbang.org From jvermillard at archean.fr Fri Aug 4 03:43:28 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:43:28 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: <1154684608.6181.4.camel@localhost.localdomain> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > Hi, > > > > I'm a developer of the Apache MINA framework. It's a network application > > framework which helps users develop high performance and high > > scalability network applications easily. > > http://directory.apache.org/subprojects/mina/index.html . I would like > > to integrate serial connection to the framework (actualy supporting TCP, > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > An Apache License would be pretty usefull for me and integrate rxtx > > functionnalities easly. > > > > Thanks, > > > > Julien > > > > Hi Julien > > The rxtx license itself will not change. This is just the interface. > You would be free to implement an rxtx replacement if the LGPL low level > code is a problem for you. These licensing details would make it possible > to take the interface code instead of needing to recode them for a new > project. > > You are probably confusing the license problems with the GPL not the LGPL > though you can share links to concerns off the list if you would like to > go through them. > > -- > Trent Jarvi > tjarvi at qbang.org Hi, I'm not a license expert but some guys at ASF said me you can't call LGPLed libs from java. some peoples interprete that as static linking and not dynamic linking (no idea why). So ASF/BSD licensied interface willl solve the license probleme. If you got some questions about the ASL and the way you can dual license LGPL/ASL you can ask it on legal-discuss at apache.org Julien -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/8d46c0aa/smime-0331.bin From jvermillard at archean.fr Fri Aug 4 03:51:30 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:51:30 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <1154685091.6181.6.camel@localhost.localdomain> erm from java -> from ASLed Java code Le vendredi 04 ao?t 2006 ? 11:43 +0200, Julien Vermillard a ?crit : > Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > Hi, > > I'm not a license expert but some guys at ASF said me you can't call > LGPLed libs from java. some peoples interprete that as static linking > and not dynamic linking (no idea why). So ASF/BSD licensied interface > willl solve the license probleme. > > If you got some questions about the ASL and the way you can dual license > LGPL/ASL you can ask it on legal-discuss at apache.org > > Julien > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dcc29d70/smime-0331.bin From guille at sms.nl Fri Aug 4 04:35:24 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Fri, 04 Aug 2006 12:35:24 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <7.0.1.0.0.20060804123322.036dc748@sms.nl> At 11:43 04/08/2006, Julien Vermillard wrote: >Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > >Hi, > >I'm not a license expert but some guys at ASF said me you can't call >LGPLed libs from java. some peoples interprete that as static linking >and not dynamic linking (no idea why). This interpretation is wrong. See the official position of the FSF regarding the LGPL and Java: http://www.gnu.org/licenses/lgpl-java.html http://www.fsf.org/licensing/licenses/lgpl-java.html Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From hambyiii at hotmail.com Fri Aug 4 04:52:47 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 10:52:47 +0000 Subject: [Rxtx] error getting InputStream Message-ID: Hi, I have written a program in Java for Windows xp using RXTX (which is why I am using this mailing list :). However, I am getting a problem. I am connecting to a serial port, like so: private CommPortIdentifier portID; private boolean openPort(String selectedPort) { boolean portFound = false; Enumeration portList; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portID.getName().equals(selectedPort)) { portFound = true; break; } } } return portFound; } and then I try and get the serial port input stream (leaving out the try and catch for the sake of space): SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); InputStream inputStream = serialPort.getInputStream(); but on the getInputStream() I get the following error message: Bad file descriptor in nativeavailable I cannot figure out where it is going wrong...anyone any ideas. A quick answer would be wonderful, as I am kinda under the hammer to get this fixed quickly Thanks in Advance Keith From tjarvi at qbang.org Fri Aug 4 05:13:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 05:13:19 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <7.0.1.0.0.20060804123322.036dc748@sms.nl> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> <7.0.1.0.0.20060804123322.036dc748@sms.nl> Message-ID: On Fri, 4 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 11:43 04/08/2006, Julien Vermillard wrote: >> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : >>> On Thu, 3 Aug 2006, Julien Vermillard wrote: >>> >>>> Hi, >>>> >>>> I'm a developer of the Apache MINA framework. It's a network application >>>> framework which helps users develop high performance and high >>>> scalability network applications easily. >>>> http://directory.apache.org/subprojects/mina/index.html . I would like >>>> to integrate serial connection to the framework (actualy supporting TCP, >>>> UDP (broadcast) and in VM communications), but LGPL is an issue for me. >>>> >>>> An Apache License would be pretty usefull for me and integrate rxtx >>>> functionnalities easly. >>>> >>>> Thanks, >>>> >>>> Julien >>>> >>> >>> Hi Julien >>> >>> The rxtx license itself will not change. This is just the interface. >>> You would be free to implement an rxtx replacement if the LGPL low level >>> code is a problem for you. These licensing details would make it possible >>> to take the interface code instead of needing to recode them for a new >>> project. >>> >>> You are probably confusing the license problems with the GPL not the LGPL >>> though you can share links to concerns off the list if you would like to >>> go through them. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >> >> Hi, >> >> I'm not a license expert but some guys at ASF said me you can't call >> LGPLed libs from java. some peoples interprete that as static linking >> and not dynamic linking (no idea why). > > This interpretation is wrong. See the official position of the FSF regarding > the LGPL and Java: > > http://www.gnu.org/licenses/lgpl-java.html > > http://www.fsf.org/licensing/licenses/lgpl-java.html > What I do with legal groups that go down that rat hole is give them a copy of the rxtx 2.0 license. Since the confused legal folks are going in a direction that does not represent the intent of the license or authors at that point and are confused about basic things in our industry that most consider facts, the discussions are very short. The rxtx 2.0 license just adds the following and has for 6 years or so. Not because the lawyers are right. They get confused about intent and even facts. The following is added to make confused lawyers that cant understand intent go far away and never come back. period. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. From hambyiii at hotmail.com Fri Aug 4 05:42:21 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 11:42:21 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Okay, I made a little mistake in my last message. The error is not occuring where I thought it was. Instead it is occuring when I do the following: byte[] readBuffer = new byte[128]; try { int numBytes = 0; try { Thread.sleep(500); } catch (InterruptedException e) {} while (inputStream.available() > 0) { numBytes = inputStream.read(readBuffer); } processReceivedData(readBuffer, numBytes); } catch (IOException e) { System.out.println(e.getMessage()); } So I guess the error is happening on the inputStream.read(readBuffer) again, any help is appreciated and again, thanks in advance Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 10:52:47 +0000 > >Hi, > >I have written a program in Java for Windows xp using RXTX (which is why I >am using this mailing list :). However, I am getting a problem. I am >connecting to a serial port, like so: > private CommPortIdentifier portID; > > private boolean openPort(String selectedPort) > { > boolean portFound = false; > Enumeration portList; > > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portID.getName().equals(selectedPort)) > { > portFound = true; > break; > } > } > } > > return portFound; > } > >and then I try and get the serial port input stream (leaving out the try >and >catch for the sake of space): > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >InputStream inputStream = serialPort.getInputStream(); > >but on the getInputStream() I get the following error message: > >Bad file descriptor in nativeavailable > >I cannot figure out where it is going wrong...anyone any ideas. A quick >answer would be wonderful, as I am kinda under the hammer to get this fixed >quickly > >Thanks in Advance >Keith > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From hambyiii at hotmail.com Fri Aug 4 07:08:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:08:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Hi, I know I am replying to myself a lot at the moment, but more information has come to light (These errors are actually happening on a client machine, on software that has worked for the past month, and only now has started to fail, which is why I am a little slow finding things out) The errors I have already written about are only symptoms of an orignal error. The original error occurs the first time I try to WRITE thte OutputStream: OutputStream oStream = serialPort.getOutputStream(); serialPort.notifyOnOutputEmpty(true); byte[] bs = encodeMessage(configString.toString()); oStream.write(bs); oStream.flush(); The error occurs on oStream.write(bs); and is: Input/output error in writeArray Now writeArray is native code, so I have no idea what is going on there. Any help would be appreciated Thanks Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 11:42:21 +0000 > >Okay, I made a little mistake in my last message. > >The error is not occuring where I thought it was. Instead it is occuring >when I do the following: > >byte[] readBuffer = new byte[128]; > >try { > > int numBytes = 0; > try { > Thread.sleep(500); > } > catch (InterruptedException e) > {} > > while (inputStream.available() > 0) > { > numBytes = inputStream.read(readBuffer); > } > > processReceivedData(readBuffer, numBytes); >} >catch (IOException e) >{ > System.out.println(e.getMessage()); >} > >So I guess the error is happening on the inputStream.read(readBuffer) > >again, any help is appreciated and again, thanks in advance >Keith > > >From: "Keith Thorne" > >Reply-To: RXTX Developers and Users > >To: rxtx at qbang.org > >Subject: [Rxtx] error getting InputStream > >Date: Fri, 04 Aug 2006 10:52:47 +0000 > > > >Hi, > > > >I have written a program in Java for Windows xp using RXTX (which is why >I > >am using this mailing list :). However, I am getting a problem. I am > >connecting to a serial port, like so: > > private CommPortIdentifier portID; > > > > private boolean openPort(String selectedPort) > > { > > boolean portFound = false; > > Enumeration portList; > > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > > while (portList.hasMoreElements()) > > { > > portID = (CommPortIdentifier) portList.nextElement(); > > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > > { > > if (portID.getName().equals(selectedPort)) > > { > > portFound = true; > > break; > > } > > } > > } > > > > return portFound; > > } > > > >and then I try and get the serial port input stream (leaving out the try > >and > >catch for the sake of space): > > > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); > >InputStream inputStream = serialPort.getInputStream(); > > > >but on the getInputStream() I get the following error message: > > > >Bad file descriptor in nativeavailable > > > >I cannot figure out where it is going wrong...anyone any ideas. A quick > >answer would be wonderful, as I am kinda under the hammer to get this >fixed > >quickly > > > >Thanks in Advance > >Keith > > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Aug 4 07:26:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: Hi Keith Can you tell us more about the physical serial port? Might it be 'vanishing?' On Fri, 4 Aug 2006, Keith Thorne wrote: > Hi, > > I know I am replying to myself a lot at the moment, but more information has > come to light (These errors are actually happening on a client machine, on > software that has worked for the past month, and only now has started to > fail, which is why I am a little slow finding things out) > > The errors I have already written about are only symptoms of an orignal > error. The original error occurs the first time I try to WRITE thte > OutputStream: > > OutputStream oStream = serialPort.getOutputStream(); > serialPort.notifyOnOutputEmpty(true); > > byte[] bs = encodeMessage(configString.toString()); > > oStream.write(bs); > oStream.flush(); > > The error occurs on oStream.write(bs); and is: > > Input/output error in writeArray > > Now writeArray is native code, so I have no idea what is going on there. Any > help would be appreciated > Thanks > Keith > > >> From: "Keith Thorne" >> Reply-To: RXTX Developers and Users >> To: rxtx at qbang.org >> Subject: Re: [Rxtx] error getting InputStream >> Date: Fri, 04 Aug 2006 11:42:21 +0000 >> >> Okay, I made a little mistake in my last message. >> >> The error is not occuring where I thought it was. Instead it is occuring >> when I do the following: >> >> byte[] readBuffer = new byte[128]; >> >> try { >> >> int numBytes = 0; >> try { >> Thread.sleep(500); >> } >> catch (InterruptedException e) >> {} >> >> while (inputStream.available() > 0) >> { >> numBytes = inputStream.read(readBuffer); >> } >> >> processReceivedData(readBuffer, numBytes); >> } >> catch (IOException e) >> { >> System.out.println(e.getMessage()); >> } >> >> So I guess the error is happening on the inputStream.read(readBuffer) >> >> again, any help is appreciated and again, thanks in advance >> Keith >> >>> From: "Keith Thorne" >>> Reply-To: RXTX Developers and Users >>> To: rxtx at qbang.org >>> Subject: [Rxtx] error getting InputStream >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 >>> >>> Hi, >>> >>> I have written a program in Java for Windows xp using RXTX (which is why >> I >>> am using this mailing list :). However, I am getting a problem. I am >>> connecting to a serial port, like so: >>> private CommPortIdentifier portID; >>> >>> private boolean openPort(String selectedPort) >>> { >>> boolean portFound = false; >>> Enumeration portList; >>> >>> portList = CommPortIdentifier.getPortIdentifiers(); >>> >>> while (portList.hasMoreElements()) >>> { >>> portID = (CommPortIdentifier) portList.nextElement(); >>> if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) >>> { >>> if (portID.getName().equals(selectedPort)) >>> { >>> portFound = true; >>> break; >>> } >>> } >>> } >>> >>> return portFound; >>> } >>> >>> and then I try and get the serial port input stream (leaving out the try >>> and >>> catch for the sake of space): >>> >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >>> InputStream inputStream = serialPort.getInputStream(); >>> >>> but on the getInputStream() I get the following error message: >>> >>> Bad file descriptor in nativeavailable >>> >>> I cannot figure out where it is going wrong...anyone any ideas. A quick >>> answer would be wonderful, as I am kinda under the hammer to get this >> fixed >>> quickly >>> >>> Thanks in Advance >>> Keith >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From hambyiii at hotmail.com Fri Aug 4 07:52:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:52:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more information >has > > come to light (These errors are actually happening on a client machine, >on > > software that has worked for the past month, and only now has started to > > fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an orignal > > error. The original error occurs the first time I try to WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); > >> } > >> catch (IOException e) > >> { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance > >> Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I am > >>> connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Fri Aug 4 08:21:07 2006 From: gergg at cox.net (Gregg Wonderly) Date: Fri, 04 Aug 2006 09:21:07 -0500 Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: <44D357D3.40303@cox.net> Keith Thorne wrote: > Okay, I made a little mistake in my last message. > > The error is not occuring where I thought it was. Instead it is occuring > when I do the following: > > byte[] readBuffer = new byte[128]; > > try { > > } > catch (IOException e) > { > System.out.println(e.getMessage()); > } > > So I guess the error is happening on the inputStream.read(readBuffer) This is one of the most frustrating things to see over and over. The exception tells you exactly which line the error is occuring on, if you will use it to see where. In Java, these days, every class should do the following. import java.util.logging.*; public class MyClass { Logger log = Logger.getLogger( getClass().getName() ); ...in some method... { String data = ...; // any extra data like addresses or // ports which might be wrong and // cause an exception. try { ... } catch( SomeException ex ) { log.log( Level.SEVERE, ex.toString()+": "+data, ex ); } } } By default, you will see all of the appropriate details of any exception logged at the WARNING or SEVERE level. You can read the javadocs about logging to get more information too. Once you do this, people can then turn up logging and get more information, or otherwise manage it with a logging configuration file or other tools such as JMX or my http://logman.dev.java.net project. Gregg Wonderly From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 09:15:24 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 09:15:24 -0600 Subject: [Rxtx] error getting InputStream Message-ID: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Keith, Please send the full stack trace of the exception, may be I can help you. On Trent's question regarding physical 'Serial Port', do you mean you have a USB(Connected to Client Machine) to 9 Pin Serial cable(Connected to H/W device)? Also please mention which java version you are using? Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Keith Thorne Sent: Friday, August 04, 2006 7:52 AM To: rxtx at qbang.org Subject: Re: [Rxtx] error getting InputStream The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more > > information >has > > come to light (These errors are actually happening on a client > > machine, >on > > software that has worked for the past month, and only now has > > started to fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an > > orignal error. The original error occurs the first time I try to > > WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); } catch (IOException > >> e) { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the > >> inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which > >>> is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I > >>> am connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out > >>> the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get > >>> this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 14:36:16 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 14:36:16 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Trent, As discussed over the phone yesterday, I am emailing you all the details of the bugs I have been experiencing. We do not use Serial Ports like most of the applications. Our application uses approx 80 -100 serial ports (attached thru Digi boxes) which are opened and closed every 20 sec to 1 minute depending upon the type of device. Some Serial ports are left opened all the time and receive event based serial calls while other devices uses polling (request and reply) to collect data. So the opening and closing of the Serial Ports is not really in a sequential order as you mentioned in our conversation yesterday. Also 2 same serial ports can never be opened at one time we have business locks to prevent that from happening. Our findings so far (of course with the help of RXTX user group): The real culprit is in the SerialImp.c file, somehow the other the Event Info Structure in the Linked List gets damaged and loses references to the original EIS structure. I believe both the problems are caused because of the corruption of EIS packet. I have noticed that the link list traversal of EIS in the following methods under SerialImp.c : 1)initialise_event_info_struct 2)finalize_event_info_struct 3)interruptEventLoop So culprit code might be in one of these methods. I am currently using JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and Fedora Core 5). I am also attaching a Test Class to replicate the problem. You need to modify the class and add your systems Serial ports into the code and execute. java TestOpenClosePort 100 It will open and close all the serial ports 100 times in there own thread. Please let me know, I will be available thru out this weekend and can help you as much as I can with testing. Regards Pawan Kharbanda CDOT-ITS 303-478-2991 (cell) 303-985-4350 (home) -------------- next part -------------- A non-text attachment was scrubbed... Name: TestOpenClosePort.java Type: application/octet-stream Size: 6139 bytes Desc: TestOpenClosePort.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dd3754d9/TestOpenClosePort-0330.obj From tjarvi at qbang.org Fri Aug 4 15:43:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 15:43:09 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: Thanks, I'll look at it tomorrow morning. I don't know when I'll find the solution but you may check email tomorrow afternoon to see if I think I found it. On Fri, 4 Aug 2006, Kharbanda, Pawan wrote: > Trent, > As discussed over the phone yesterday, I am emailing you all the > details of the bugs I have been experiencing. We do not use Serial Ports > like most of the applications. Our application uses approx 80 -100 > serial ports (attached thru Digi boxes) which are opened and closed > every 20 sec to 1 minute depending upon the type of device. Some Serial > ports are left opened all the time and receive event based serial calls > while other devices uses polling (request and reply) to collect data. So > the opening and closing of the Serial Ports is not really in a > sequential order as you mentioned in our conversation yesterday. Also 2 > same serial ports can never be opened at one time we have business locks > to prevent that from happening. > > Our findings so far (of course with the help of RXTX user group): > > The real culprit is in the SerialImp.c file, somehow the other the Event > Info Structure in the Linked List gets damaged and loses references to > the original EIS structure. I believe both the problems are caused > because of the corruption of EIS packet. I have noticed that the link > list traversal of EIS in the following methods under SerialImp.c : > > 1)initialise_event_info_struct > 2)finalize_event_info_struct > 3)interruptEventLoop > > So culprit code might be in one of these methods. I am currently using > JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and > Fedora Core 5). > > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > > Regards > Pawan Kharbanda > CDOT-ITS > 303-478-2991 (cell) > 303-985-4350 (home) > > > > > > > > > > From tjarvi at qbang.org Sat Aug 5 12:32:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:32:40 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:34:27 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:34:27 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> You need to run it few times. More the number of ports, more frequently you can reproduce. With just 2 ports it will be hard to reproduce frequently. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:33 PM To: Kharbanda, Pawan Cc: tjarvi at qbang.org; RXTX Developers and Users Subject: Re: Port Locking / JVM Crashing > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Aug 5 12:52:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:52:26 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> Message-ID: Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more frequently > you can reproduce. With just 2 ports it will be hard to reproduce > frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:57:49 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:57:49 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Trent, I have 5 ports of Digi and I can reproduce almost every time. Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX version -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:52 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more > frequently you can reproduce. With just 2 ports it will be hard to > reproduce frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need >> to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From tjarvi at qbang.org Sat Aug 5 13:06:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:06:07 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Message-ID: You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few thousand > iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:07:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:07:33 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E659@hqexchange3.dot.state.co.us> We use our own locks but I haven't turned off the RXTX locks. I am still using the RXTX locks that might be the difference. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:13:22 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:13:22 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Trent, How can you turn off the lock files? I can try using that. I never tried that, I thought you can't turn off the file locking. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From tjarvi at qbang.org Sat Aug 5 13:18:53 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:18:53 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Message-ID: Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java > -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except lockfiles > are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:31:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:31:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Trent, I am able to constantly replicate almost everytime even when I have locks disabled. Don't know the reason why you are not able to on your environment. Any suggestions??????? Cycle No (Thread ::: /dev/cuf04) ::::::: 7 Cycle No (Thread ::: /dev/cuf01) ::::::: 7 Cycle No (Thread ::: /dev/cuf02) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) Exiting Thread ::: /dev/cuf03 Cycle No (Thread ::: /dev/cuf03) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent Port /dev/cuf01 is Opened 0x01 Sent Port /dev/cub01 is Opened 0x01 Sent Port /dev/cuf01 is Closed Port /dev/cuf02 is Closed Port /dev/cuf03 is Closed Port /dev/cuf04 is Closed Port /dev/cub01 is Closed Exiting Thread ::: /dev/cuf03 Exiting Thread ::: /dev/cuf02 Cycle No (Thread ::: /dev/cuf03) ::::::: 8 Cycle No (Thread ::: /dev/cuf02) ::::::: 8 Exiting Thread ::: /dev/cuf04 Exiting Thread ::: /dev/cuf01 Cycle No (Thread ::: /dev/cuf01) ::::::: 8 Cycle No (Thread ::: /dev/cuf04) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened 0x01 Sent Port /dev/cuf01 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 # # An error report file with more information is saved as hs_err_pid21386.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:19 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) > 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux > java -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except > lockfiles are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code >>>> and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm >>> running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From tjarvi at qbang.org Sat Aug 5 14:14:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 14:14:49 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: I'd stick a couple $15 dual port serial boards in the machine to see if its kernel driver specific. I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more problematic. They do not get the same number of eyes looking for problems. You could try putting #undef TIOCSERGETLSR #undef TIOCGICOUNT in the very top of SerialImp.h or one or the other to flip bits of code off and on. The kernel here is 2.6.11.4-20a-smp from Suse. glibc is 2.3.4-23.4 from Suse the jre is 1.5.0_06-b05 from Sun. The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC ram. You should be able to reproduce what I'm seeing then go from there. I don't think I'm going to see this problem without having the same cornercase hardware you have. Maybe we can work that out off the list but I doubt I'm going to find it in rxtx at this point. I have seen problems in the past were kernel structs don't match user space struct and bad things happen but I was including a kernel struct to get functionality that had not made its way into user space at the time. The only thing I may be missing is that when I write 0x01 out the port, nothing comes back. That was not specified but you could easily disconnect anything connected to the ports to see if that changes anything. rxtx is far from bug free but I do not see anything yet. On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I am able to constantly replicate almost everytime even when I have > locks disabled. Don't know the reason why you are not able to on your > environment. Any suggestions??????? > > > Cycle No (Thread ::: /dev/cuf04) ::::::: 7 > Cycle No (Thread ::: /dev/cuf01) ::::::: 7 > Cycle No (Thread ::: /dev/cuf02) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > Exiting Thread ::: /dev/cuf03 > Cycle No (Thread ::: /dev/cuf03) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > Port /dev/cuf01 is Opened > 0x01 Sent > Port /dev/cub01 is Opened > 0x01 Sent > Port /dev/cuf01 is Closed > Port /dev/cuf02 is Closed > Port /dev/cuf03 is Closed > Port /dev/cuf04 is Closed > Port /dev/cub01 is Closed > Exiting Thread ::: /dev/cuf03 > Exiting Thread ::: /dev/cuf02 > Cycle No (Thread ::: /dev/cuf03) ::::::: 8 > Cycle No (Thread ::: /dev/cuf02) ::::::: 8 > Exiting Thread ::: /dev/cuf04 > Exiting Thread ::: /dev/cuf01 > Cycle No (Thread ::: /dev/cuf01) ::::::: 8 > Cycle No (Thread ::: /dev/cuf04) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > 0x01 Sent > Port /dev/cuf01 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 > # > # An error report file with more information is saved as > hs_err_pid21386.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > Aborted > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:19 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Lockfiles are a compile time option. I've turned them on now, corrected > a mistake resulting in only 3 ports being used and now have it going > through a few hundred iterations again without a crash. > > To disable lockfiles.. > > ./configure --disable-lockfiles && make install > > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > Port /dev/ttyS5 is Closed > Exiting Thread ::: /dev/ttyS1 > Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: > /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting > Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port > /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS1 is Closed > Port /dev/ttyS4 is Closed > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > > > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, How can you turn off the lock files? I can try using that. I >> never tried that, I thought you can't turn off the file locking. >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:06 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> You may try 4 ports instead of 5 to make sure thats not the issue. >> >> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >> 2.6.11.4-20a-smp >> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >> java -version java version "1.5.0_06" >> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >> >> I'm using rxtx 2.1-7 (final) with default configuration except >> lockfiles are disabled. I gathered that you are doing your own > resource locking. >> >> ... >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> ... >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>> version >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:52 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> Whats a few times? I've got 4 ports here and have run it a few >>> thousand iterations. >>> >>> Is that true for you if you run it with just four of your DIGI ports? >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> You need to run it few times. More the number of ports, more >>>> frequently you can reproduce. With just 2 ports it will be hard to >>>> reproduce frequently. >>>> >>>> ~pk >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:33 PM >>>> To: Kharbanda, Pawan >>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>> Subject: Re: Port Locking / JVM Crashing >>>> >>>>> I am also attaching a Test Class to replicate the problem. You need > >>>>> to >>>> >>>>> modify the class and add your systems Serial ports into the code >>>>> and >> >>>>> execute. >>>>> >>>>> java TestOpenClosePort 100 >>>>> >>>>> It will open and close all the serial ports 100 times in there own >>>>> thread. >>>>> >>>>> Please let me know, I will be available thru out this weekend and >>>>> can >>> >>>>> help you as much as I can with testing. >>>>> >>>> >>>> How reproducable is the problem with the above testcase? I'm >>>> running >> >>>> 100's of iterations without reproducing the problem. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> >>> >> > From rtlane01 at comcast.net Tue Aug 1 19:22:03 2006 From: rtlane01 at comcast.net (Randall T. Lane) Date: Tue, 01 Aug 2006 21:22:03 -0400 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] Message-ID: <44CFFE3B.90001@comcast.net> Rxtx Community: Please see my e-mail to Trent. Does anyone have any experience using rxtx to successfully communicate with hardware via USB? Thanks. Randy Lane -------------- next part -------------- An embedded message was scrubbed... From: Trent Jarvi Subject: Re: Help with RxTx for USB Communication Date: Tue, 1 Aug 2006 18:49:13 -0600 (MDT) Size: 3300 Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060801/9bbbc255/HelpwithRxTxforUSBCommunication-0328.mht From naranjo.manuel at gmail.com Sun Aug 6 16:59:28 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Sun, 06 Aug 2006 19:59:28 -0300 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44CFFE3B.90001@comcast.net> References: <44CFFE3B.90001@comcast.net> Message-ID: <44D67450.8010100@gmail.com> Randy: I have been able to communicate to AIRcable USB Bluetooth Dongle, with success. I'm not sure which are the options that you have to send to RXTX library, but you can indeed. Check that you do not have the port avaible for much long. I have heard of a problem with WinXP that it simply turn off virtual ports when they are too much long with out activity. If you want I can send you my code, because it is avaible under GPL, the new release is not avaible at AIRcable web site, but it should in short time. Regards, Manu > Rxtx Community: > > Please see my e-mail to Trent. Does anyone have any experience using > rxtx to successfully communicate with hardware via USB? > > Thanks. > > Randy Lane > > ------------------------------------------------------------------------ > > Asunto: > Re: Help with RxTx for USB Communication > De: > Trent Jarvi > Fecha: > Tue, 1 Aug 2006 18:49:13 -0600 (MDT) > Para: > "Randall T. Lane" > > Para: > "Randall T. Lane" > CC: > taj at www.linux.org.uk > > > On Tue, 1 Aug 2006, Randall T. Lane wrote: > >> Trent, >> >> I am working on a project written in Java (1.5) and need to >> communicate to an external device via a USB port. >> >> I have downloaded rxtx-2.1-7-bins-r2.zip from www.rxtx.org and setup >> a Java test project to learn how to use rxtx. I am able to list the >> serial ports available, however rxtx does not recognize my USB port. >> I am running on Windows XP. Here is some output from my test project >> ... >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> COM1 - Serial >> COM3 - Serial >> LPT1 - Parallel >> >> I would appreciate any help you could provide in getting rxtx to >> allow me to communicate via my USB port. >> >> Here is my code, if that would help. >> >> public static void main(String[] args) { >> listPorts(); >> // The listPorts() and getPortTypeName() methods are used for >> port identification. >> static void listPorts() >> { >> Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); >> while ( portEnum.hasMoreElements() ) >> { >> CommPortIdentifier portIdentifier = (CommPortIdentifier) >> portEnum.nextElement(); >> System.out.println(portIdentifier.getName() + " - " + >> getPortTypeName(portIdentifier.getPortType()) ); >> } } >> static String getPortTypeName ( int portType ) >> { >> switch ( portType ) >> { >> case CommPortIdentifier.PORT_I2C: >> return "I2C"; >> case CommPortIdentifier.PORT_PARALLEL: >> return "Parallel"; >> case CommPortIdentifier.PORT_RAW: >> return "Raw"; >> case CommPortIdentifier.PORT_RS485: >> return "RS485"; >> case CommPortIdentifier.PORT_SERIAL: >> return "Serial"; >> default: >> return "unknown type"; >> } >> } >> >> Thanks. >> >> Randy Lane >> > > Hi Randy > > The rxtx mail list is a better place to ask as there are more eyes. > I'm swamped with work. > > Be sure to look to see that your serial port dongle shows up as a > serial port in device manager and no other applications have it open. > USB serial dongles do work with rxtx. Some are less complete than > others. > > -- > Trent Jarvi > tjarvi at qbang.org > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From eddythejekyll at gmail.com Sun Aug 6 23:31:45 2006 From: eddythejekyll at gmail.com (Ed) Date: Sun, 6 Aug 2006 23:31:45 -0600 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? Message-ID: I have written a simple client server (RMI) application without using RxTx where the server controls a parallel port simply by addressing the port and banging the bits in order to drive a relay. It also reads the port's. I am doing this by making Runtime.exec calls to a binary that actually does the parallel port bit banging and reading. However, I'd like to use RxTx so it is a pure Java application, and I've so far installed and figured out how to discover the ports, but I'm having trouble finding good examples or some howto type documentation for this. I did find the two examples on the Wiki: one for serial IO and the other to discover the ports on a system. As I said, I have so far installed RxTx and gotten it to compile and run and I can identify the ports. When I run the server I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found Ports! Found port COM1 Found port COM3 Found port LPT1 LPT1 Not Currently owned EASSwitch Server starting. EASSwitch is bound. Server Ready. So it looks like thing are installed and working, but I feel all dressed up and no idea how to proceed. Basically, I just want to be able to toggle the data lines on the parallel port and read them. Very simple. No parallel printer type usage. Are there any examples I can work off of? If so, please advise. Thank you. -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060806/c7e39898/attachment-0328.html From hambyiii at hotmail.com Sun Aug 6 23:53:54 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Mon, 07 Aug 2006 05:53:54 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Message-ID: Hi, sorry I took the weekend to reply, but I was away for the last couple of days. Unfortunately I cannot send the full stack trace yet. The problem is not, unfortunately, happening on my computer, but on a clients computer, which I will go and visit today. I will hopefully be able to get a stack trace then. As to the physical connection, tt is indeed a USB from the computer, connected to a 9 pin serial device that connects to the hard-ware. My java version is 1.5.06 >From: "Kharbanda, Pawan" >Reply-To: RXTX Developers and Users >To: "RXTX Developers and Users" >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 09:15:24 -0600 > >Keith, > Please send the full stack trace of the exception, may be I can help >you. On Trent's question regarding physical 'Serial Port', do you mean >you have a USB(Connected to Client Machine) to 9 Pin Serial >cable(Connected to H/W device)? > >Also please mention which java version you are using? > >Thanks >Pawan Kharbanda > > >-----Original Message----- >From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >Of Keith Thorne >Sent: Friday, August 04, 2006 7:52 AM >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream > >The physical serial port is actually a USB connection that is then >changed to a "virtual serial port", so I can use the serial port >protocols to connect to it. The other end of the connection is a >hardware device that is constantly turned on. I am not sure about the >port 'vanishing'...we have another piece of software that came with the >hardware device, which we can test the device (and with it the virtual >serial port) with. This has no problem connecting to the serial port or >writing to/reading from the device. >It is only when my software is run, that the error occurs. Like I have >said, my software (using rxtx) is connecting to the serial port >successfully, but it is when I try and write to the serial port that I >get the error. > >Although to be truthful, I am not absolutely certain if the error is >happening on the oStream.write() or the oStream.flush(). I only think it >is the write(), because that is where the writeArray() function is >called. > >thanks >Keith > > > >From: Trent Jarvi > >Reply-To: RXTX Developers and Users > >To: RXTX Developers and Users > >Subject: Re: [Rxtx] error getting InputStream > >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > > > > >Hi Keith > > > >Can you tell us more about the physical serial port? Might it be > >'vanishing?' > > > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > > > Hi, > > > > > > I know I am replying to myself a lot at the moment, but more > > > information > >has > > > come to light (These errors are actually happening on a client > > > machine, > >on > > > software that has worked for the past month, and only now has > > > started to fail, which is why I am a little slow finding things out) > > > > > > The errors I have already written about are only symptoms of an > > > orignal error. The original error occurs the first time I try to > > > WRITE thte > > > OutputStream: > > > > > > OutputStream oStream = serialPort.getOutputStream(); > > > serialPort.notifyOnOutputEmpty(true); > > > > > > byte[] bs = encodeMessage(configString.toString()); > > > > > > oStream.write(bs); > > > oStream.flush(); > > > > > > The error occurs on oStream.write(bs); and is: > > > > > > Input/output error in writeArray > > > > > > Now writeArray is native code, so I have no idea what is going on >there. > >Any > > > help would be appreciated > > > Thanks > > > Keith > > > > > > > > >> From: "Keith Thorne" > > >> Reply-To: RXTX Developers and Users > > >> To: rxtx at qbang.org > > >> Subject: Re: [Rxtx] error getting InputStream > > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > > >> > > >> Okay, I made a little mistake in my last message. > > >> > > >> The error is not occuring where I thought it was. Instead it is > >occuring > > >> when I do the following: > > >> > > >> byte[] readBuffer = new byte[128]; > > >> > > >> try { > > >> > > >> int numBytes = 0; > > >> try { > > >> Thread.sleep(500); > > >> } > > >> catch (InterruptedException e) > > >> {} > > >> > > >> while (inputStream.available() > 0) > > >> { > > >> numBytes = inputStream.read(readBuffer); > > >> } > > >> > > >> processReceivedData(readBuffer, numBytes); } catch (IOException > > >> e) { > > >> System.out.println(e.getMessage()); > > >> } > > >> > > >> So I guess the error is happening on the > > >> inputStream.read(readBuffer) > > >> > > >> again, any help is appreciated and again, thanks in advance Keith > > >> > > >>> From: "Keith Thorne" > > >>> Reply-To: RXTX Developers and Users > > >>> To: rxtx at qbang.org > > >>> Subject: [Rxtx] error getting InputStream > > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > > >>> > > >>> Hi, > > >>> > > >>> I have written a program in Java for Windows xp using RXTX (which > > >>> is > >why > > >> I > > >>> am using this mailing list :). However, I am getting a problem. I > > >>> am connecting to a serial port, like so: > > >>> private CommPortIdentifier portID; > > >>> > > >>> private boolean openPort(String selectedPort) > > >>> { > > >>> boolean portFound = false; > > >>> Enumeration portList; > > >>> > > >>> portList = CommPortIdentifier.getPortIdentifiers(); > > >>> > > >>> while (portList.hasMoreElements()) > > >>> { > > >>> portID = (CommPortIdentifier) portList.nextElement(); > > >>> if (portID.getPortType() == > >CommPortIdentifier.PORT_SERIAL) > > >>> { > > >>> if (portID.getName().equals(selectedPort)) > > >>> { > > >>> portFound = true; > > >>> break; > > >>> } > > >>> } > > >>> } > > >>> > > >>> return portFound; > > >>> } > > >>> > > >>> and then I try and get the serial port input stream (leaving out > > >>> the > >try > > >>> and > > >>> catch for the sake of space): > > >>> > > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", > >2000); > > >>> InputStream inputStream = serialPort.getInputStream(); > > >>> > > >>> but on the getInputStream() I get the following error message: > > >>> > > >>> Bad file descriptor in nativeavailable > > >>> > > >>> I cannot figure out where it is going wrong...anyone any ideas. A > >quick > > >>> answer would be wonderful, as I am kinda under the hammer to get > > >>> this > > >> fixed > > >>> quickly > > >>> > > >>> Thanks in Advance > > >>> Keith > > >>> > > >>> > > >>> _______________________________________________ > > >>> Rxtx mailing list > > >>> Rxtx at qbang.org > > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > > >> > > >> > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Aug 7 06:22:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:22:03 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: Hmm.. I left the test running went I went home Saturday. It looks like something did show up after ~30k iterations. I'll look at it more in my free time. Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS5 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 29417 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 29417 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 29417 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00002aab14c2ec63, pid=20573, tid=1095125344 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6c63] initialise_event_info_struct+0x63 # [thread 1087756640 also had an error] Port /dev/ttyS5 is Opened 0x01 Sent [thread 1089861984 also had an error] Port /dev/ttyS4 is Opened 0x01 Sent [thread 1090914656 also had an error] # An error report file with more information is saved as [thread 1090914656 also had an error] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted On Sat, 5 Aug 2006, Trent Jarvi wrote: > > I'd stick a couple $15 dual port serial boards in the machine to see if its > kernel driver specific. > > I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more > problematic. They do not get the same number of eyes looking for problems. > > You could try putting > > #undef TIOCSERGETLSR > #undef TIOCGICOUNT > > in the very top of SerialImp.h or one or the other to flip bits of code off > and on. > > The kernel here is 2.6.11.4-20a-smp from Suse. > glibc is 2.3.4-23.4 from Suse > the jre is 1.5.0_06-b05 from Sun. > > The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC > ram. > > You should be able to reproduce what I'm seeing then go from there. I don't > think I'm going to see this problem without having the same cornercase > hardware you have. Maybe we can work that out off the list but I doubt I'm > going to find it in rxtx at this point. > > I have seen problems in the past were kernel structs don't match user space > struct and bad things happen but I was including a kernel struct to get > functionality that had not made its way into user space at the time. > > The only thing I may be missing is that when I write 0x01 out the port, > nothing comes back. That was not specified but you could easily disconnect > anything connected to the ports to see if that changes anything. > > rxtx is far from bug free but I do not see anything yet. > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, >> I am able to constantly replicate almost everytime even when I have >> locks disabled. Don't know the reason why you are not able to on your >> environment. Any suggestions??????? >> >> >> Cycle No (Thread ::: /dev/cuf04) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> Exiting Thread ::: /dev/cuf03 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> Port /dev/cuf01 is Opened >> 0x01 Sent >> Port /dev/cub01 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Closed >> Port /dev/cuf02 is Closed >> Port /dev/cuf03 is Closed >> Port /dev/cuf04 is Closed >> Port /dev/cub01 is Closed >> Exiting Thread ::: /dev/cuf03 >> Exiting Thread ::: /dev/cuf02 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 8 >> Exiting Thread ::: /dev/cuf04 >> Exiting Thread ::: /dev/cuf01 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf04) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 >> # >> # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 >> # >> # An error report file with more information is saved as >> hs_err_pid21386.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> Aborted >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:19 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Lockfiles are a compile time option. I've turned them on now, corrected >> a mistake resulting in only 3 ports being used and now have it going >> through a few hundred iterations again without a crash. >> >> To disable lockfiles.. >> >> ./configure --disable-lockfiles && make install >> >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> Port /dev/ttyS5 is Closed >> Exiting Thread ::: /dev/ttyS1 >> Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: >> /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting >> Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port >> /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> >> >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, How can you turn off the lock files? I can try using that. I >>> never tried that, I thought you can't turn off the file locking. >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 1:06 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> You may try 4 ports instead of 5 to make sure thats not the issue. >>> >>> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >>> 2.6.11.4-20a-smp >>> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >>> java -version java version "1.5.0_06" >>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >>> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >>> >>> I'm using rxtx 2.1-7 (final) with default configuration except >>> lockfiles are disabled. I gathered that you are doing your own >> resource locking. >>> >>> ... >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> Port /dev/ttyS4 is Closed >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> ... >>> >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>>> version >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:52 PM >>>> To: Kharbanda, Pawan >>>> Cc: Trent Jarvi; RXTX Developers and Users >>>> Subject: RE: Port Locking / JVM Crashing >>>> >>>> >>>> Whats a few times? I've got 4 ports here and have run it a few >>>> thousand iterations. >>>> >>>> Is that true for you if you run it with just four of your DIGI ports? >>>> >>>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>>> >>>>> You need to run it few times. More the number of ports, more >>>>> frequently you can reproduce. With just 2 ports it will be hard to >>>>> reproduce frequently. >>>>> >>>>> ~pk >>>>> >>>>> -----Original Message----- >>>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>>> Sent: Saturday, August 05, 2006 12:33 PM >>>>> To: Kharbanda, Pawan >>>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>>> Subject: Re: Port Locking / JVM Crashing >>>>> >>>>>> I am also attaching a Test Class to replicate the problem. You need >> >>>>>> to >>>>> >>>>>> modify the class and add your systems Serial ports into the code >>>>>> and >>> >>>>>> execute. >>>>>> >>>>>> java TestOpenClosePort 100 >>>>>> >>>>>> It will open and close all the serial ports 100 times in there own >>>>>> thread. >>>>>> >>>>>> Please let me know, I will be available thru out this weekend and >>>>>> can >>>> >>>>>> help you as much as I can with testing. >>>>>> >>>>> >>>>> How reproducable is the problem with the above testcase? I'm >>>>> running >>> >>>>> 100's of iterations without reproducing the problem. >>>>> >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> >>>> >>> >> > From iinjlv01 at gmail.com Mon Aug 7 06:22:07 2006 From: iinjlv01 at gmail.com (J LV) Date: Mon, 7 Aug 2006 14:22:07 +0200 Subject: [Rxtx] Data lost or Slow sampling Message-ID: Hello I am using RXTX to comm with a motion controller using Serial Port and i can write the commands using SerialPort or RXTXPort without problems, but when i try write and read at high sampling rate, for example to know the position and speed at every moment of a trajectory, i obtain a very irregular response times. I am using the most simple algorimth: 1-Write the command "is trajectory finished?" and wait for SerialPortEvent.DATA_AVAILABLE 2-Read the InputStreamReader of serial port while not empty 3-If trajectory finished then stop program, else, continue 4-Read actual time using System.currentTimeMillis() (t0) 5-Write the command "give me position" and wait for SerialPortEvent.DATA_AVAILABLE 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) 7-Read the InputStreamReader of serial port while not empty 8-Save position in Vector or ArrayList and repeat from 1 I don't know if the problem is the RXTX, my program or the motion controller hardware but i have response times from 16 millis to 78 millis at 19200 bauds!. I am using SwingWorked to threading SerialPort reading/writing process. Any idea or similar data leak problem? Thanks for RXTX project and sorry for my badde english! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/909a4cb3/attachment-0328.html From tjarvi at qbang.org Mon Aug 7 06:50:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:50:10 -0600 (MDT) Subject: [Rxtx] Data lost or Slow sampling In-Reply-To: References: Message-ID: On Mon, 7 Aug 2006, J LV wrote: > Hello > > I am using RXTX to comm with a motion controller using Serial Port and i can > write the commands using SerialPort or RXTXPort without problems, but when i > try write and read at high sampling rate, for example to know the position > and speed at every moment of a trajectory, i obtain a very irregular > response times. I am using the most simple algorimth: > 1-Write the command "is trajectory finished?" and wait for > SerialPortEvent.DATA_AVAILABLE > 2-Read the InputStreamReader of serial port while not empty > 3-If trajectory finished then stop program, else, continue > 4-Read actual time using System.currentTimeMillis() (t0) > 5-Write the command "give me position" and wait for > SerialPortEvent.DATA_AVAILABLE > 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) > 7-Read the InputStreamReader of serial port while not empty > 8-Save position in Vector or ArrayList and repeat from 1 > > > I don't know if the problem is the RXTX, my program or the motion controller > hardware but i have response times from 16 millis to 78 millis at 19200 > bauds!. I am using SwingWorked to threading SerialPort reading/writing > process. > > Any idea or similar data leak problem? > > Thanks for RXTX project and sorry for my badde english! > This can be platform dependant. What you may do for a starting point is use a loopback connection and time the same thing at 19200. Write the date, wait for data available, read the data. I would expect from write to data available to take around 10 ms from past experiences. You can experiment with turning on and off buffering in the port settings of the OS, if the OS supports more realtime like interrupts, that could help. You have a java schedual and the kernel schedual. Serial interrupts traditionally have very high priority but modern OSs tend to realize thats not good for GUIs, ... and delay responding to the interrupts. You should be able to have usec response times in a realtime OS. Windows and Linux are not typically setup as realtime OSs. For comparison, the last time I looked which was about 5 years ago, windows NT4 came back with data available in 8 ms and Linux came back in 10 ms. I would be interested in seeing what you get today. -- Trent Jarvi tjarvi at qbang.org From gergg at cox.net Mon Aug 7 09:21:56 2006 From: gergg at cox.net (Gregg Wonderly) Date: Mon, 07 Aug 2006 10:21:56 -0500 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? In-Reply-To: References: Message-ID: <44D75A94.9030205@cox.net> Ed wrote: > Are there any examples I can work off of? If so, please advise. Just read the javax.comm javadocs. You need to take the parallel port and write values to it based on which bits of which lines you want on and off. Gregg Wonderly From pete.flugstad at gmail.com Mon Aug 7 09:36:19 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 7 Aug 2006 10:36:19 -0500 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44D67450.8010100@gmail.com> References: <44CFFE3B.90001@comcast.net> <44D67450.8010100@gmail.com> Message-ID: <84d4a6d50608070836v97e9a29q96e98441ea903ac7@mail.gmail.com> FYI, I'm talking to a USB<->Serial dongle just fine under Windows XP Pro. I did have to install a driver for the thing - Windows XP by default, did not recognize it. Once installed, it just showed up as another COM port, and I've been pushing data over it with no problems. Pete From savagobr at yahoo.com Mon Aug 7 10:13:06 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Mon, 7 Aug 2006 09:13:06 -0700 (PDT) Subject: [Rxtx] Port Locking / JVM Crashing: 2 ports (Serial + usb) Message-ID: <20060807161306.9648.qmail@web53803.mail.yahoo.com> Trent This is curious, since I did reproduced the aformentioned bug using only 2 ports: /dev/ttyS0 and /dev/ttyUSB0. It only need to run for 500 times: $ java -cp . TestOpenClosePort 500 500 Port /dev/ttyS0 is Closed Excpetion ::: Thread ::: /dev/ttyUSB0null Exiting Thread ::: /dev/ttyUSB0 Cycle No (Thread ::: /dev/ttyUSB0) ::::::: 227 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 184 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x203d2044, pid=32368, tid=2986859424 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing) # Problematic frame: # C 0x203d2044 # # An error report file with more information is saved as /tmp/hs_err_pid32368.log # # If you would like to submit a bug report, please visit: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Best regards Savago ps: Test environment $ uname -a Linux localhost.localdomain 2.6.15-1.2054_FC5 #1 Tue Mar 14 15:48:33 EST 2006 i686 i686 i386 GNU/Linux $ java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) $gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.1 20060525 (Red Hat 4.1.1-1) --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/c6ca8094/attachment-0327.html From Pawan.Kharbanda at dot.state.co.us Mon Aug 7 17:23:25 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 7 Aug 2006 17:23:25 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Trent, I think I got the problem fixed after some code changes in the C (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the staging environment (with 10 devices) with real time data and haven't seen a JVM lock/ Port locking since last night. I am going to do further stress testing and will send all my code changes and my findings in next few days. I believe the problem was causing due to the digi drivers and how the Linux kernel talked to it, so after making some code changes and synchronization fixes, I got it to work. I am keeping my fingers crossed :) Thanks for all your help. You have been a great help. Will keep you posted. Cheers ~pk PS : We are going to test my new RXTX changes with the 2.6 Red Hat kernel (currently using 2.4.21-37.ELsmp) too. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 5:08 PM To: Kharbanda, Pawan Subject: RE: Port Locking / JVM Crashing Hi Pawan As mentioned I did reproduce the error but after several hours of cycles. I'm looking at RXTXPort.java and thinking about what may be happening. The error is in the C layer but it may be preventable in the java code. lets say two closes are overlapping or an operation is trying to happen while another port is closing. The structure may be out of sync by the time the code using the structure in another thread gets to the event info struct. So I'm wondering if synchronization in RXTXPort() and close() may help you. A second thing that may help is you can put printf("got here\n"); in each of the lines in initialize event info struct to verify that the problem is in walking the linked list. Thats my suspicion. So a properly timed close() while calling the constructor may be catching rxtx off guard. You can synchronize to test that and it may do away with the problem. From tjarvi at qbang.org Mon Aug 7 18:01:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 18:01:54 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Message-ID: Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do further > stress testing and will send all my code changes and my findings in next > few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to happen > while another port is closing. The structure may be out of sync by the > time the code using the structure in another thread gets to the event > info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may do > away with the problem. > From Pawan.Kharbanda at dot.state.co.us Tue Aug 8 13:49:14 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 8 Aug 2006 13:49:14 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Trent, I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and have absolutely no problem with JVM crashing or Port Locking even after 10000 operations (now I am trying 100,000 :). This is all with the original RXTX 2.1.7 (final) api's without any of my fixes that I have been trying for last 2-3 weeks. I will suggest that we update the INSTALL or Readme file accompnying the RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: 82000685_G 02/02/2006). This should helped everybody using the RXTX API's with RedHat Linux atleast. Regards Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 6:02 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do > further stress testing and will send all my code changes and my > findings in next few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers > crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to > happen while another port is closing. The structure may be out of > sync by the time the code using the structure in another thread gets > to the event info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may > do away with the problem. > From jimo at earthlink.net Wed Aug 9 21:21:00 2006 From: jimo at earthlink.net (Jim Owen) Date: Wed, 9 Aug 2006 20:21:00 -0700 Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat Message-ID: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Hi All, I've run into some difficulties with rxtx that have me baffled and need some help. I have an application that has used earlier versions of rxtx successfully and on a variety of platforms. We recently needed to deploy this application into an environment where we could not utilize lock files. I pulled down the 2.0.7 pre1 source distribution and executed configure with --disable-lockfiles. I then executed make and make install. When I execute the program, as root, I get the following error: ************************************************************************ Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) # Problematic frame: # C 0x00001004 # # An error report file with more information is saved as hs_err_pid20151.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # **************************************************************************** If I execute as a normal user, I get no errors, but no ports listed: (Using an earlier version, I get a serial and parallel port listed.) **************************************************************************** [jim at linuxDev ingenicoApp]$ java VerifyCommBuild Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Some ports appear to have been found, let's try to enumerate them. Complete. **************************************************************************** When I built rxtx, there was a warning given of the following: **************************************************************************** conftest.c: In function 'main': conftest.c:6: warning: incompatible implicit declaration of built-in function 'printf' conftest.c:7: warning: incompatible implicit declaration of built-in function 'exit' WARNING: Kernel include files do not match the current kernel **************************************************************************** uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux JAVA_HOME=/usr/java/j2sdk1.4.2_11 javax.comm.properties: Driver=gnu.io.RXTXCommDriver Here's the code for VerifyCommBuild.java that I'm using to test: **************************************************************************** import javax.comm.*; import java.util.Enumeration; /** * A quick app to check that the javax.comm (Serial) Communications extension has been properly * installed and configured on this machine. * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. */ public class VerifyCommBuild { public static void main(String args[]) { Enumeration ports; System.out.println("Verifying Comm Build Environment"); try { ports = CommPortIdentifier.getPortIdentifiers(); if (ports == null) { System.out.println("No comm ports found!"); return; } System.out.println("Some ports appear to have been found, let's try to enumerate them."); while (ports.hasMoreElements()) { System.out.println("Here is a port [" + ((CommPortIdentifier)ports.nextElement()).getName() + "]"); } } catch (Exception e) { System.out.println("Failed to enumerate ports [" + e.getMessage() + "]"); e.printStackTrace(); } System.out.println("Complete."); } } **************************************************************************** Any suggestions as to what I'm missing? Thanks, Jim Owen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060809/92503a81/attachment-0325.html From tjarvi at qbang.org Thu Aug 10 05:39:36 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 05:39:36 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Message-ID: On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even after > 10000 operations (now I am trying 100,000 :). This is all with the > original RXTX 2.1.7 (final) api's without any of my fixes that I have > been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying the > RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp > and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From oliver.archner at bayceer.uni-bayreuth.de Wed Aug 9 06:13:36 2006 From: oliver.archner at bayceer.uni-bayreuth.de (Oliver Archner) Date: Wed, 09 Aug 2006 14:13:36 +0200 Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() Message-ID: <44D9D170.5020806@bayceer.uni-bayreuth.de> Dear Users, i would like to send a byte to a parallel device. The following piece of code works well but throws an IOException in LPRPort$ParallelOutputStream.write() saying that everything is ok ?! Oliver import java.io.*; import gnu.io.*; public class Test { public static void main(String[] args) { RXTXCommDriver TxPort = new RXTXCommDriver(); ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", CommPortIdentifier.PORT_PARALLEL); OutputStream oStream = null; try { oStream = pPort.getOutputStream(); oStream.write((byte)0x51); } catch (IOException e) { e.printStackTrace(); } finally { try { if (oStream != null) oStream.close(); } catch (IOException e) { e.printStackTrace(); } } } } Output: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Der Vorgang wurde erfolgreich beendet. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at Test.main(Test.java:12) From tjarvi at qbang.org Thu Aug 10 18:12:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 18:12:27 -0600 (MDT) Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() In-Reply-To: <44D9D170.5020806@bayceer.uni-bayreuth.de> References: <44D9D170.5020806@bayceer.uni-bayreuth.de> Message-ID: On Wed, 9 Aug 2006, Oliver Archner wrote: > Dear Users, > > i would like to send a byte to a parallel device. > The following piece of code works well but throws an IOException in > LPRPort$ParallelOutputStream.write() saying that everything is ok ?! > > Oliver > > > import java.io.*; > import gnu.io.*; > > public class Test { > > public static void main(String[] args) { > RXTXCommDriver TxPort = new RXTXCommDriver(); > ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", > CommPortIdentifier.PORT_PARALLEL); > OutputStream oStream = null; > try { > oStream = pPort.getOutputStream(); > oStream.write((byte)0x51); > } catch (IOException e) { > e.printStackTrace(); > } finally { > try { > if (oStream != null) oStream.close(); > } catch (IOException e) { > e.printStackTrace(); > > } > } > > } > } > > Output: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Der Vorgang wurde erfolgreich beendet. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at Test.main(Test.java:12) WriteFile is returning a negative value or 0. I do not know what that exception is saying but it should be an IO Exception. The native code in question is line 405 in ParallelImp.c. If you find the documentation pointing out how the code is wrong, we can fix it. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 08:12:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 09:12:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question Message-ID: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Hello, I'm trying to send data over a serial port using the RXTX libraries. I've got the binaries for Windows XP from qbang.org. On the receiving side, I'm using event notification (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial Ports InputStream. Similarly on the transmist side, I use SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. First question: does this make sense? The code was largely adopted from an existing Windows C++ program and that's more or less how it operated (overlapped io using ReadFile, WriteFile, GetOverlappedResult, Events, etc). Second question: in a small standalone test program I wrote, everything seems to work just fine - whenever SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good chunk of data available (I explicitly set the in/out buffers to 1024 bytes) to read. However, when I pull my "library" into a much larger environment (OSGI framework based, but same JVM/OS/etc), whenever SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a byte or two available. Needless to say, this really kills performance. Everything appears to still operate properly, just really, really slowly. So, has anyone seen this problem before? I haven't dived into the details of RXTX library, and I'm wondering what the mechanism is here? How does the RXTX thread determine when to issue the SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to tweak in RXTX or the JVM to get this to operate more like the small test program? Seems like I want RXTX to call me back _less_ often. Thanks, Pete From tjarvi at qbang.org Fri Aug 11 09:55:23 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 09:55:23 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Hello, > > I'm trying to send data over a serial port using the RXTX > libraries. I've got the binaries for Windows XP from qbang.org. > > On the receiving side, I'm using event notification > (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial > Ports InputStream. Similarly on the transmist side, I use > SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. > > First question: does this make sense? The code was largely adopted > from an existing Windows C++ program and that's more or less how it > operated (overlapped io using ReadFile, WriteFile, > GetOverlappedResult, Events, etc). > > Second question: in a small standalone test program I wrote, > everything seems to work just fine - whenever > SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good > chunk of data available (I explicitly set the in/out buffers to 1024 > bytes) to read. > > However, when I pull my "library" into a much larger environment > (OSGI framework based, but same JVM/OS/etc), whenever > SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a > byte or two available. Needless to say, this really kills > performance. Everything appears to still operate properly, just > really, really slowly. > > So, has anyone seen this problem before? I haven't dived into the > details of RXTX library, and I'm wondering what the mechanism is here? > How does the RXTX thread determine when to issue the > SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to > tweak in RXTX or the JVM to get this to operate more like the small > test program? > Seems like I want RXTX to call me back _less_ often. > Hi Pete RXTX is doing overlapped IO in termios.c. In this file we map the windows functionality to termios (mostly POSIX). From there, we just talk termios to all platforms. What I guess is happening is the eventloop is waiting a specified amount of time. As you application uses more cpu cycles, you observe the difference in behavior. You could go into the C code and change this after looking at the eventLoop() code in serialImp.c and following that to the serial_ioctl() and serial_select() in termios.c Another option is to go into RXTXPort.java and put a sleep in the sendEvent() code. This way you would not have to recompile the native code (not very easy at this point). -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 13:27:36 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:27:36 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > Another option is to go into RXTXPort.java and put a sleep in the > sendEvent() code. This way you would not have to recompile the native > code (not very easy at this point). Are the instructions in the INSTALL file still valid? If so, it wasn't very hard to build it (I already had MinGW installed). Everything seemed to build just fine. Haven't tried to install/use it yet, but it wasn't a big deal (assuming those instructions were correct. Thanks, Pete From pete.flugstad at gmail.com Fri Aug 11 13:42:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:42:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, but there doesn't appear to be a way to select that via RXTX (which appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control is selected). Is there a way I'm not seeing? Thanks, Pete From eddythejekyll at gmail.com Fri Aug 11 15:20:44 2006 From: eddythejekyll at gmail.com (Ed) Date: Fri, 11 Aug 2006 15:20:44 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion Message-ID: I'm trying to read and write a parallel port on a standard (Dell) pc running RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. I'm having problems getting rxtx to return a port enumeration from getPortIdentifiers. I'm using a file PortChooser.java as a test file to get things going. This is from the Java CookBook 2nd edition (Chapter 12). The call // get list of ports available on this particular computer, // by calling static method in CommPortIdentifier. Enumeration pList = CommPortIdentifier.getPortIdentifiers(); returns a null pList; I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and compile without --disable-lockfiles I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ... When I compile with --disable-lockfiles the call to getPortIdentifiers simply returns a null Enumeration. I've read the documention and threads about this issue and I feel like I've tried everything, so at the moment I'm stumped. I can supply any further info that may help. Thanks in advance. Ed -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060811/80c4eeec/attachment-0323.html From tjarvi at qbang.org Fri Aug 11 18:29:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:29:48 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > On 8/11/06, Trent Jarvi wrote: >> Another option is to go into RXTXPort.java and put a sleep in the >> sendEvent() code. This way you would not have to recompile the native >> code (not very easy at this point). > > Are the instructions in the INSTALL file still valid? If so, it > wasn't very hard to build it > (I already had MinGW installed). Everything seemed to build just > fine. Haven't tried to install/use it yet, but it wasn't a big deal > (assuming those instructions were correct. > Hi Pete The instructions are correct. You will want to make sure that the exports worked. If the library does not work properly, then the exports failed. The exports are currently generated with nm, sed and grep in the Makefile which is often commented out. If the def file is old, it will cause problems. You should be good to go then. Look at the serial_select and eventLoop code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:33:32 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:33:32 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > but there doesn't appear to be a way to select that via RXTX (which > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > is selected). > > Is there a way I'm not seeing? > Hi Pete I'm guessing I didn't know the difference. At the time, I really didn't have windows API documentation. I just had some pages I found with altivista/google. Later microsoft made their documentation available on msdn or I learned about it. For rxtx, the calls need to be platform neutral. So if you see how to do each in termios, then we can get it going. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:45:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:45:24 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Fri, 11 Aug 2006, Ed wrote: > I'm trying to read and write a parallel port on a standard (Dell) pc running > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. > > I'm having problems getting rxtx to return a port enumeration from > getPortIdentifiers. I'm using a file > PortChooser.java as a test file to get things going. This is from the Java > CookBook 2nd edition (Chapter 12). The call > > // get list of ports available on this particular computer, > // by calling static method in CommPortIdentifier. > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > returns a null pList; > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and > compile without --disable-lockfiles I get: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > ... > > When I compile with --disable-lockfiles the call to getPortIdentifiers > simply returns a null Enumeration. > > I've read the documention and threads about this issue and I feel like I've > tried everything, so at the moment I'm stumped. > > I can supply any further info that may help. > > Thanks in advance. > > Ed > Hi Ed You may want to check the permissions of /dev/lp*. Also make sure lp or your kernel support for lp is loaded. It should show up in dmesg and lsmod. For my laptop with no printer port enabled in BIOS is see: lp: driver loaded but no devices found in desg |grep lp [] $ ls -l /dev/lp* crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 here root and group lp can read and write. Normal users cannot. Try a simple read as a user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: Permission denied Fix as root [] chmod 666 /dev/lp* [] $ ls -l /dev/lp* crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 Now as user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: No such device or address So this is saying there is no lp0 on my laptop. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:58:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:58:31 -0600 (MDT) Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat In-Reply-To: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> References: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Message-ID: On Wed, 9 Aug 2006, Jim Owen wrote: > Hi All, > > I've run into some difficulties with rxtx that have me baffled and need > some help. > > I have an application that has used earlier versions of rxtx > successfully and on a variety of platforms. We recently needed to deploy > this application into an environment where we could not utilize lock files. > > I pulled down the 2.0.7 pre1 source distribution and executed configure > with --disable-lockfiles. I then executed make and make install. > > When I execute the program, as root, I get the following error: > > ************************************************************************ > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) > # Problematic frame: > # C 0x00001004 > # > # An error report file with more information is saved as hs_err_pid20151.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > **************************************************************************** > > If I execute as a normal user, I get no errors, but no ports listed: > (Using an earlier version, I get a serial and parallel port listed.) > > **************************************************************************** > [jim at linuxDev ingenicoApp]$ java VerifyCommBuild > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Some ports appear to have been found, let's try to enumerate them. > Complete. > **************************************************************************** > > When I built rxtx, there was a warning given of the following: > > **************************************************************************** > conftest.c: In function 'main': > conftest.c:6: warning: incompatible implicit declaration of built-in > function 'printf' > conftest.c:7: warning: incompatible implicit declaration of built-in > function 'exit' > > WARNING: Kernel include files do not match the current kernel > **************************************************************************** > > > uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 > Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux > > JAVA_HOME=/usr/java/j2sdk1.4.2_11 > > javax.comm.properties: Driver=gnu.io.RXTXCommDriver > > Here's the code for VerifyCommBuild.java that I'm using to test: > > > **************************************************************************** > import javax.comm.*; > import java.util.Enumeration; > /** > * A quick app to check that the javax.comm (Serial) Communications > extension has been properly > * installed and configured on this machine. > * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. > */ > public class VerifyCommBuild > { > public static void main(String args[]) > { > Enumeration ports; > System.out.println("Verifying Comm Build Environment"); > try > { > ports = CommPortIdentifier.getPortIdentifiers(); > if (ports == null) > { > System.out.println("No comm ports found!"); > return; > } > System.out.println("Some ports appear to have been found, let's > try to enumerate them."); > while (ports.hasMoreElements()) > { > System.out.println("Here is a port [" + > ((CommPortIdentifier)ports.nextElement()).getName() > + "]"); > } > } catch (Exception e) > { > System.out.println("Failed to enumerate ports [" + > e.getMessage() + "]"); > e.printStackTrace(); > } > System.out.println("Complete."); > } > } > Hi Jim This is a new one to me. Have you tried it on another system. Maybe something isnt sane in your toolchain. -- Trent Jarvi tarvi at qbang.org From eddythejekyll at gmail.com Sat Aug 12 11:45:39 2006 From: eddythejekyll at gmail.com (Ed) Date: Sat, 12 Aug 2006 11:45:39 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Trent, Right after I sent the results indicated below I re-ran the app and it apparently found the parallel port. The difference was that I set the permissions to : /dev: wildcard lp* crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 I'm still not sure how to interpret the dmesg and lsmod before. However I'm thinking that since the user now has permission to access the lp* port, a request to access it loaded the lp and parport modules automatically and allowed me access. Here's the output of lsmod now: ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp lp 5540 0 (autoclean) parport 21608 1 (autoclean) [parport_pc lp] and dmesg: ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp On node 0 totalpages: 161776 lp0: using parport0 (polling). So I think I'm good, and ready to move on the next steps. Thanks Trent! Ed On 8/12/06, Ed wrote: > > Thanks for the reply Trent. > > I'm on a different system today but am trying your suggestons. This is a > debian 3.1r2 system and I'm running jdk 1.5.0_04. > > Take a look below, but I think I have no parallel port support on this > kernel, however I never get the "No such device or address" return from the > cat call as you did so I'm not sure how to interpret the results. > > When I run the test program (PortChooser.java), the getPortIdentifiers > call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is > more than I found on the RedHat system. Incidently --disable-lockfiles has > no effect. > > It looks as though there is no parallel support in this kernel: > falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > On node 0 totalpages: 161776 > falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > > I'm a little confused by the results when I cat to the lp0 device. It > seems from the dmesg output that I don't have parallel printer support, but > when I cat to the lp0 device, I get permission denied if I'm non-root user > and input/output error if I'm root. Apparently this means I have the device, > but no support in the kernel? > > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > ed at falcon:~/src/workspace/EASServer/src$ su > Password: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > > Here's my lp* device permissions. > /dev: > wildcard lp* > crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > If I change it to > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I get: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > falcon:/home/ed/src/workspace/EASServer/src# exit > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > cat: /dev/lp0: Input/output error > ed at falcon:~/src/workspace/EASServer/src$ > > What do you think? Should I recompile the kernel or is it something else? > > By the way, I added the user ed to the lp and uucp groups on this system. > > Thanks again, > > Ed > > On 8/11/06, Trent Jarvi wrote: > > > > On Fri, 11 Aug 2006, Ed wrote: > > > > > I'm trying to read and write a parallel port on a standard (Dell) pc > > running > > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > > gates. > > > > > > I'm having problems getting rxtx to return a port enumeration from > > > getPortIdentifiers. I'm using a file > > > PortChooser.java as a test file to get things going. This is from the > > Java > > > CookBook 2nd edition (Chapter 12). The call > > > > > > // get list of ports available on this particular computer, > > > // by calling static method in CommPortIdentifier. > > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > > > > > returns a null pList; > > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure > > and > > > compile without --disable-lockfiles I get: > > > > > > Stable Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7 > > > Java lib Version = RXTX-2.1-7 > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > ... > > > > > > When I compile with --disable-lockfiles the call to getPortIdentifiers > > > > > simply returns a null Enumeration. > > > > > > I've read the documention and threads about this issue and I feel like > > I've > > > tried everything, so at the moment I'm stumped. > > > > > > I can supply any further info that may help. > > > > > > Thanks in advance. > > > > > > Ed > > > > > > > Hi Ed > > > > You may want to check the permissions of /dev/lp*. Also make sure lp or > > your kernel support for lp is loaded. It should show up in dmesg and > > lsmod. > > > > For my laptop with no printer port enabled in BIOS is see: > > > > lp: driver loaded but no devices found > > > > in desg |grep lp > > > > [] $ ls -l /dev/lp* > > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > here root and group lp can read and write. Normal users cannot. > > > > Try a simple read as a user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > > > > Fix as root > > > > [] chmod 666 /dev/lp* > > [] $ ls -l /dev/lp* > > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > Now as user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: No such device or address > > > > So this is saying there is no lp0 on my laptop. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > > > -- > > Ed > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060812/c2afe1f8/attachment-0322.html From tjarvi at qbang.org Sat Aug 12 14:01:52 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 12 Aug 2006 14:01:52 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Remember that the lp code expects a printer - or something like it. There is a line that specifies the printer is online. If you are doing hobby work, you will need to raise that line or loop it back to something that is raised. If you just try reading a port with no device connected and online, there will be an error while trying to read. This should be addressed in the mail-list archives. On Sat, 12 Aug 2006, Ed wrote: > Trent, > Right after I sent the results indicated below I re-ran the app and it > apparently found the parallel port. The difference was that I set the > permissions to : > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I'm still not sure how to interpret the dmesg and lsmod before. However I'm > thinking that since the user now has permission to access the lp* port, a > request to access it loaded the lp and parport modules automatically and > allowed me access. Here's the output of lsmod now: > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > lp 5540 0 (autoclean) > parport 21608 1 (autoclean) [parport_pc lp] > > and dmesg: > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > On node 0 totalpages: 161776 > lp0: using parport0 (polling). > > So I think I'm good, and ready to move on the next steps. > > Thanks Trent! > > Ed > > > On 8/12/06, Ed wrote: >> >> Thanks for the reply Trent. >> >> I'm on a different system today but am trying your suggestons. This is a >> debian 3.1r2 system and I'm running jdk 1.5.0_04. >> >> Take a look below, but I think I have no parallel port support on this >> kernel, however I never get the "No such device or address" return from the >> cat call as you did so I'm not sure how to interpret the results. >> >> When I run the test program (PortChooser.java), the getPortIdentifiers >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is >> more than I found on the RedHat system. Incidently --disable-lockfiles has >> no effect. >> >> It looks as though there is no parallel support in this kernel: >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp >> On node 0 totalpages: 161776 >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp >> >> I'm a little confused by the results when I cat to the lp0 device. It >> seems from the dmesg output that I don't have parallel printer support, but >> when I cat to the lp0 device, I get permission denied if I'm non-root user >> and input/output error if I'm root. Apparently this means I have the >> device, >> but no support in the kernel? >> >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> >> cat: /dev/lp0: Permission denied >> ed at falcon:~/src/workspace/EASServer/src$ su >> Password: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> >> Here's my lp* device permissions. >> /dev: >> wildcard lp* >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> If I change it to >> /dev: >> wildcard lp* >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> I get: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> falcon:/home/ed/src/workspace/EASServer/src# exit >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> ed at falcon:~/src/workspace/EASServer/src$ >> >> What do you think? Should I recompile the kernel or is it something else? >> >> By the way, I added the user ed to the lp and uucp groups on this system. >> >> Thanks again, >> >> Ed >> >> On 8/11/06, Trent Jarvi wrote: >> > >> > On Fri, 11 Aug 2006, Ed wrote: >> > >> > > I'm trying to read and write a parallel port on a standard (Dell) pc >> > running >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the >> > gates. >> > > >> > > I'm having problems getting rxtx to return a port enumeration from >> > > getPortIdentifiers. I'm using a file >> > > PortChooser.java as a test file to get things going. This is from the >> > Java >> > > CookBook 2nd edition (Chapter 12). The call >> > > >> > > // get list of ports available on this particular computer, >> > > // by calling static method in CommPortIdentifier. >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); >> > > >> > > returns a null pList; >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure >> > and >> > > compile without --disable-lockfiles I get: >> > > >> > > Stable Library >> > > ========================================= >> > > Native lib Version = RXTX-2.1-7 >> > > Java lib Version = RXTX-2.1-7 >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > ... >> > > >> > > When I compile with --disable-lockfiles the call to getPortIdentifiers >> > >> > > simply returns a null Enumeration. >> > > >> > > I've read the documention and threads about this issue and I feel like >> > I've >> > > tried everything, so at the moment I'm stumped. >> > > >> > > I can supply any further info that may help. >> > > >> > > Thanks in advance. >> > > >> > > Ed >> > > >> > >> > Hi Ed >> > >> > You may want to check the permissions of /dev/lp*. Also make sure lp or >> > your kernel support for lp is loaded. It should show up in dmesg and >> > lsmod. >> > >> > For my laptop with no printer port enabled in BIOS is see: >> > >> > lp: driver loaded but no devices found >> > >> > in desg |grep lp >> > >> > [] $ ls -l /dev/lp* >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > here root and group lp can read and write. Normal users cannot. >> > >> > Try a simple read as a user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: Permission denied >> > >> > Fix as root >> > >> > [] chmod 666 /dev/lp* >> > [] $ ls -l /dev/lp* >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > Now as user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: No such device or address >> > >> > So this is saying there is no lp0 on my laptop. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > >> >> >> >> -- >> >> Ed >> > > > > From pete.flugstad at gmail.com Mon Aug 14 07:51:41 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 08:51:41 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: <84d4a6d50608140651h3cb2266ap90c47780abace00@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > On Fri, 11 Aug 2006, Pete Flugstad wrote: > > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > > but there doesn't appear to be a way to select that via RXTX (which > > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > > is selected). > > I'm guessing I didn't know the difference. At the time, I really didn't > have windows API documentation. I just had some pages I found with > altivista/google. Later microsoft made their documentation available on > msdn or I learned about it. > > For rxtx, the calls need to be platform neutral. So if you see how to do > each in termios, then we can get it going. so, RTSCTS_IN/OUT at the COMM API is mapped to HARDWARE_FLOW_CONTROL in the POSIX layer. Which termios.c maps to RTS_CONTROL_HANDSHAKE and fOutxCtsFlow = true. Since termios.c is Windows only anway... Would it work to change the mapping in termios.c to map hardware flow control to RTS_CONTROL_TOGGLE? I just wondering (I'm going to go look, but there's a lot of code in there) if the code does anything special playing with flow control signals? Thanks, Pete From pete.flugstad at gmail.com Mon Aug 14 09:42:48 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 10:42:48 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> On 8/3/06, Trent Jarvi wrote: > On Thu, 3 Aug 2006, Pete Flugstad wrote: > > Okay, I can understand that, but from the PORTMON output, it looks > > like it's opening each port TWICE: > > I think this problem is in RXTXCommDriver.java. I've just not tracked it > down but it should be in the java code, not the native code so easy > enough to track down. Okay, I'm trying to track this down... Looks like the CommPortIdentifier static initializer loads RXTXCommDriver, and then calls RXTXDriver.initialize. But then CommPortIdentifier.getPortIdentifiers does the exact same thing. So that's where the two scans are coming from. I would guess that one or the other can be removed? Probably the one in the CommPortIdentifier.getPortIdentifiers? Doing so removes the 2nd scan. Pete PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) val = System.getProperty("gnu.io.SerialPorts"); Shouldn't the comparison be != null? getProperty returns null if the variable is NOT found, and you only want to assign to val if it IS found, right? Same thing for the parallel port case. End result is the same I guess, since you check for null later, but probably should be fixed. From eddythejekyll at gmail.com Mon Aug 14 11:55:17 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 11:55:17 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: When I try to get the mode with int mode = pPort.getMode(); it returns 0 which isn't any of the valid modes. I tried setting it explicitely with pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced the requested mode in nativeSetSerialPortParams at gnu.io.LPRPort.setLPRMode(Native Method) at gnu.io.LPRPort.setMode(LPRPort.java:87) Except for LPT_MODE_ANY, but the getMode call still failed out with an invalid state. I'm wondering if it's because I don't have the line pulled high like you said. This isn't a printer connected. It's a relay board with pins 2-9 tied to data, and 18-25 to gnd. The rest are open. I looked at a DB25 pinout diagram and I'm not sure which pin I need to tie high, and I looked through the archives, but didn't find a reference to something definitive. Can someone help me with which pin is the "online" pin as Trent mentioned? DB25 spec has ( I hope this formats correctly in this email) BUSY (11), SEL (13) or INIT (16) are candidates, but I'm guessing. Any clues? *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Thanks, Ed On 8/12/06, Trent Jarvi wrote: > > > Remember that the lp code expects a printer - or something like it. There > is a line that specifies the printer is online. If you are doing hobby > work, you will need to raise that line or loop it back to something that > is raised. > > If you just try reading a port with no device connected and online, there > will be an error while trying to read. This should be addressed in the > mail-list archives. > > On Sat, 12 Aug 2006, Ed wrote: > > > Trent, > > Right after I sent the results indicated below I re-ran the app and it > > apparently found the parallel port. The difference was that I set the > > permissions to : > > /dev: > > wildcard lp* > > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > > > I'm still not sure how to interpret the dmesg and lsmod before. However > I'm > > thinking that since the user now has permission to access the lp* port, > a > > request to access it loaded the lp and parport modules automatically and > > allowed me access. Here's the output of lsmod now: > > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > > lp 5540 0 (autoclean) > > parport 21608 1 (autoclean) [parport_pc lp] > > > > and dmesg: > > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > > On node 0 totalpages: 161776 > > lp0: using parport0 (polling). > > > > So I think I'm good, and ready to move on the next steps. > > > > Thanks Trent! > > > > Ed > > > > > > On 8/12/06, Ed wrote: > >> > >> Thanks for the reply Trent. > >> > >> I'm on a different system today but am trying your suggestons. This is > a > >> debian 3.1r2 system and I'm running jdk 1.5.0_04. > >> > >> Take a look below, but I think I have no parallel port support on this > >> kernel, however I never get the "No such device or address" return from > the > >> cat call as you did so I'm not sure how to interpret the results. > >> > >> When I run the test program (PortChooser.java), the getPortIdentifiers > >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this > is > >> more than I found on the RedHat system. Incidently --disable-lockfiles > has > >> no effect. > >> > >> It looks as though there is no parallel support in this kernel: > >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > >> On node 0 totalpages: 161776 > >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > >> > >> I'm a little confused by the results when I cat to the lp0 device. It > >> seems from the dmesg output that I don't have parallel printer support, > but > >> when I cat to the lp0 device, I get permission denied if I'm non-root > user > >> and input/output error if I'm root. Apparently this means I have the > >> device, > >> but no support in the kernel? > >> > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> > >> cat: /dev/lp0: Permission denied > >> ed at falcon:~/src/workspace/EASServer/src$ su > >> Password: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> > >> Here's my lp* device permissions. > >> /dev: > >> wildcard lp* > >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> If I change it to > >> /dev: > >> wildcard lp* > >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> I get: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> falcon:/home/ed/src/workspace/EASServer/src# exit > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> ed at falcon:~/src/workspace/EASServer/src$ > >> > >> What do you think? Should I recompile the kernel or is it something > else? > >> > >> By the way, I added the user ed to the lp and uucp groups on this > system. > >> > >> Thanks again, > >> > >> Ed > >> > >> On 8/11/06, Trent Jarvi wrote: > >> > > >> > On Fri, 11 Aug 2006, Ed wrote: > >> > > >> > > I'm trying to read and write a parallel port on a standard (Dell) > pc > >> > running > >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > >> > gates. > >> > > > >> > > I'm having problems getting rxtx to return a port enumeration from > >> > > getPortIdentifiers. I'm using a file > >> > > PortChooser.java as a test file to get things going. This is from > the > >> > Java > >> > > CookBook 2nd edition (Chapter 12). The call > >> > > > >> > > // get list of ports available on this particular computer, > >> > > // by calling static method in CommPortIdentifier. > >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > >> > > > >> > > returns a null pList; > >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I > configure > >> > and > >> > > compile without --disable-lockfiles I get: > >> > > > >> > > Stable Library > >> > > ========================================= > >> > > Native lib Version = RXTX-2.1-7 > >> > > Java lib Version = RXTX-2.1-7 > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > ... > >> > > > >> > > When I compile with --disable-lockfiles the call to > getPortIdentifiers > >> > > >> > > simply returns a null Enumeration. > >> > > > >> > > I've read the documention and threads about this issue and I feel > like > >> > I've > >> > > tried everything, so at the moment I'm stumped. > >> > > > >> > > I can supply any further info that may help. > >> > > > >> > > Thanks in advance. > >> > > > >> > > Ed > >> > > > >> > > >> > Hi Ed > >> > > >> > You may want to check the permissions of /dev/lp*. Also make sure lp > or > >> > your kernel support for lp is loaded. It should show up in dmesg and > >> > lsmod. > >> > > >> > For my laptop with no printer port enabled in BIOS is see: > >> > > >> > lp: driver loaded but no devices found > >> > > >> > in desg |grep lp > >> > > >> > [] $ ls -l /dev/lp* > >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > here root and group lp can read and write. Normal users cannot. > >> > > >> > Try a simple read as a user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: Permission denied > >> > > >> > Fix as root > >> > > >> > [] chmod 666 /dev/lp* > >> > [] $ ls -l /dev/lp* > >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > Now as user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: No such device or address > >> > > >> > So this is saying there is no lp0 on my laptop. > >> > > >> > -- > >> > Trent Jarvi > >> > tjarvi at qbang.org > >> > > >> > >> > >> > >> -- > >> > >> Ed > >> > > > > > > > > > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/59164078/attachment-0320.html From eddythejekyll at gmail.com Mon Aug 14 14:19:58 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 14:19:58 -0600 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? Message-ID: I'm using the ParallelPort class to drive a relay board. According to Mr. Jarvi, since this board isn't a printer, there will be a read error unless I hold the "printer online" line high in order to make the API think I'm talking to a printer. The problem is, I can't figure out which line is the "printer online". My DB25 spec lists the following: *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Anyone know which one I should tie high? I tried the busy line and it still errored out on the read. Thanks in advance, -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/66cf3c3e/attachment-0320.html From tjarvi at qbang.org Mon Aug 14 18:06:29 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:06:29 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Mon, 14 Aug 2006, Ed wrote: > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > which isn't any of the valid modes. I tried setting it explicitely with > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced > the requested mode in nativeSetSerialPortParams > at gnu.io.LPRPort.setLPRMode(Native Method) > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > invalid state. This is because rxtx only supports the basics. JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } One could program in more support. When I did that I just had a daisy wheel printer to test with and doing any more would have been blind. So that behavior is expected. I'll look to see if the Parallel Complete book mentions which pins you need to raise. If you look in the source code [ParallelImp.c] you can see this code isn't well tested. It has worked for hobby use in the past as I'd guess you are trying to do. But my experience with the code is as is mentioned in the top of the source: /* fear he who enter here. It appears that things have changed. An attempt has been made to put things the way the should be. It compiles and ParallelBlackBox runs. No further guarantees. Well... One.. it will print "Hello World!" on an epson DX 10 printer. you know.. the 10 character per second daisy wheel printer ;) - Trent Jarvi */ That comment is from 1997 or so. Since then some windows support was contributed but it is still very green code. We get about four requests for parallel support a year so its just not a well traveled area. It would be nice to have some documentation for the people trying to hook parallel ports to electronic projects. That appears to be the exclusive use of the Parallel support. The wiki pages are intended to let people share information like this to help each other in their projects as they figure out the details. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Aug 14 18:40:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:40:40 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: > PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): > > if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) > val = System.getProperty("gnu.io.SerialPorts"); > > Shouldn't the comparison be != null? getProperty returns null if the > variable is NOT found, and you only want to assign to val if it IS > found, right? Same thing for the > parallel port case. End result is the same I guess, since you check > for null later, > but probably should be fixed. I think this is just a fallback to the second property. gnu.io.SerialPorts isn't documented but perhaps it is used. It should behave properly as documented in INSTALL. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 14 18:56:55 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 19:56:55 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: <44E11BD7.5030102@gmail.com> Trent Jarvi wrote: >> PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): >> >> if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) >> val = System.getProperty("gnu.io.SerialPorts"); >> > > I think this is just a fallback to the second property. > gnu.io.SerialPorts isn't documented but perhaps it is used. It should > behave properly as documented in INSTALL. Doh - yup, I missed the fact that the property names were different... Pete From berkland at spamcop.net Mon Aug 14 19:58:21 2006 From: berkland at spamcop.net (Doug Berkland) Date: Mon, 14 Aug 2006 21:58:21 -0400 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? In-Reply-To: References: Message-ID: <269e40090608141858g698c2579v8d962deca3f4df53@mail.gmail.com> Based on memory and this page as confirmation, I would say pin 13 is the "Online" pin for SPP (standard parallel port). http://www.quatech.com/support/comm-over-parallel.php On 8/14/06, Ed wrote: > > I'm using the ParallelPort class to drive a relay board. According to Mr. > Jarvi, since this board isn't a printer, there will be a read error unless I > hold the "printer online" line high in order to make the API think I'm > talking to a printer. The problem is, I can't figure out which line is the > "printer online". My DB25 spec lists the following: > > *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and > Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data > Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 > D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select > 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select > In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit > 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 > Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and > Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground > > Anyone know which one I should tie high? I tried the busy line and it > still errored out on the read. > > Thanks in advance, > > -- > Ed > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/842bb770/attachment-0320.html From eddythejekyll at gmail.com Mon Aug 14 20:25:42 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 20:25:42 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Ah, I see. I've seen the caveats about limited Parallel support, but I thought it was mainly about the javax.comm package. The gnu.io is derived from javax.comm package right? That is, is the parallel support in rxtx is a superset of what's in javax.comm? I'm using this not for hobby usage, but for some simple instrumenation and control. If the project mandates it, I'll gladly work on extending the support. In the meantime, I need to get some sanity checks working, and repair my relay board (I smoked the ULN2803 chip, apparently by tying the BUSY (pin 11) to vcc). I guess I'll try the SEL pin next (and a supply of 2803s) with a ~1K pullup. The caveat in the comment block isn't very encouraging (!), but I borrowed an old Epson Stylus Color 600 printer to see what I can do. If I can write out characters to it I'll be happy. Parallel printers aren't easy to find these days. I haven't yet looked at the native source, yet, but I've just imported it into eclipse and I'll surf around a bit. Ed On 8/14/06, Trent Jarvi wrote: > > On Mon, 14 Aug 2006, Ed wrote: > > > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > > which isn't any of the valid modes. I tried setting it explicitely with > > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to > proced > > the requested mode in nativeSetSerialPortParams > > at gnu.io.LPRPort.setLPRMode(Native Method) > > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > > invalid state. > > This is because rxtx only supports the basics. > > JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > jclass jclazz, jint mode) > { > switch(mode) > { > case LPT_MODE_ANY: > break; > case LPT_MODE_SPP: > case LPT_MODE_PS2: > case LPT_MODE_EPP: > case LPT_MODE_ECP: > case LPT_MODE_NIBBLE: > default: > throw_java_exception( env, > UNSUPPORTED_COMM_OPERATION, > "nativeSetSerialPortParams", > "setLPRMode was unable to proced the > requested \ > mode" > ); > } > return(JNI_TRUE); > } > > One could program in more support. When I did that I just had a daisy > wheel printer to test with and doing any more would have been blind. > > So that behavior is expected. I'll look to see if the Parallel Complete > book mentions which pins you need to raise. If you look in the source > code [ParallelImp.c] you can see this code isn't well tested. It has > worked for hobby use in the past as I'd guess you are trying to do. But > my experience with the code is as is mentioned in the top of the source: > > /* > fear he who enter here. It appears that things have changed. An > attempt > has been made to put things the way the should be. > > It compiles and ParallelBlackBox runs. No further guarantees. > > Well... One.. it will print "Hello World!" on an epson DX 10 > printer. > you know.. the 10 character per second daisy wheel printer ;) > > - Trent Jarvi > */ > > That comment is from 1997 or so. > > Since then some windows support was contributed but it is still very green > code. We get about four requests for parallel support a year so its just > not a well traveled area. > > It would be nice to have some documentation for the people trying to hook > parallel ports to electronic projects. That appears to be the exclusive > use of the Parallel support. The wiki pages are intended to let people > share information like this to help each other in their projects as they > figure out the details. > > -- > Trent Jarvi > tjarvi at qbang.org > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/fbb5ddb4/attachment-0320.html From lyon at docjava.com Tue Aug 15 06:06:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 15 Aug 2006 08:06:27 -0400 Subject: [Rxtx] smoking is bad for your health In-Reply-To: References: Message-ID: Hi All, If you are connecting to the parallel port and smoking chips, it is time for extra stuff to buffer the parallel port. You may be want more current, in which case driver transistors are needed, or, if you are using the port as an output only device, you may like to add your own bus transceiver (e.g., 74245), set for output. Do be careful to design this properly; http://www.beyondlogic.org/spp/parallel.htm Some people like to use Octal D-type F.F's with OC outputs, like a 74374, http://upgrade.cntc.ac.kr/data/ttl/74374.html I like this one, as it has the D FF's and can latch the outputs for presentation to slower electronics (like relays). But careful! A relay that needs more current than the family of the device you have selected will look like a short to ground, and you will smoke your bug! And MOBO's do NOT come with the ability to drive any load you like. Check the power specs on your relay and be sure to protect the chip against back EMF with a diode. It is best to smoke test this on a bread board BEFORE hooking it to the computer. And be sure you smoke test the corner points in the ckt for a while, lest it fail in the field. - Doug >Ah, I see. I've seen the caveats about limited >Parallel support, but I thought it was mainly >about the javax.comm package. The >gnu.io is derived from javax.comm >package right? That is, is the parallel support >in rxtx is a superset of what's in javax.comm? > >I'm using this not for hobby usage, but for some >simple instrumenation and control. If the >project mandates it, I'll gladly work on >extending the support. In the meantime, I need >to get some sanity checks working, and repair my >relay board (I smoked the ULN2803 chip, >apparently by tying the BUSY (pin 11) to vcc). I >guess I'll try the SEL pin next (and a supply of >2803s) with a ~1K pullup. > >The caveat in the comment block isn't very >encouraging (!), ?but?I borrowed an old Epson >Stylus Color 600 printer to see what I can do. >?If I can write out characters to it I'll be >happy. Parallel printers aren't easy to find >these days. > > I haven't yet looked at the native source, yet, >but I've just imported it into eclipse and I'll >surf around a bit. > >Ed > >On 8/14/06, Trent Jarvi <tjarvi at qbang.org> wrote: > >On Mon, 14 Aug 2006, Ed wrote: > >> When I try to get the mode with int mode = pPort.getMode(); it returns 0 >> which isn't any of the valid modes. I tried setting it explicitely with >> pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with >> >> gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced >> the requested mode in nativeSetSerialPortParams >> at gnu.io.LPRPort.setLPRMode(Native Method) >> at gnu.io.LPRPort.setMode(LPRPort.java:87) >> >> Except for LPT_MODE_ANY, but the getMode call still failed out with an >> invalid state. > >This is because rxtx only supports the basics. > >JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > ???????jclass jclazz, jint mode) >{ > ???????switch(mode) > ???????{ > ???????????????case LPT_MODE_ANY: > ???????????????????????break; > ???????????????case LPT_MODE_SPP: > ???????????????case LPT_MODE_PS2: > ???????????????case LPT_MODE_EPP: > ???????????????case LPT_MODE_ECP: > ???????????????case LPT_MODE_NIBBLE: > ???????????????default: > ???????????????????????throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, > ???????????????????????????????"nativeSetSerialPortParams", > ???????????????????????????????"setLPRMode was >unable to proced the requested \ > ???????????????????????????????mode" > ???????????????????????); > ???????} > ???????return(JNI_TRUE); >} > >One could program in more support.??When I did that I just had a daisy >wheel printer to test with and doing any more would have been blind. > >So that behavior is expected.??I'll look to see if the Parallel Complete >book mentions which pins you need to raise.??If you look in the source >code [ParallelImp.c] you can see this code isn't well tested.??It has >worked for hobby use in the past as I'd guess you are trying to do.??But >my experience with the code is as is mentioned in the top of the source: > >/* > fear he who enter here.??It appears that things have changed.??An attempt > has been made to put things the way the should be. > > ???????It compiles and ParallelBlackBox runs.??No further guarantees. > > ???????Well... One.. it will print "Hello World!" on an epson DX 10 printer. > ???????you know.. the 10 character per second daisy wheel printer ;) > > ???????- Trent Jarvi >*/ > >That comment is from 1997 or so. > >Since then some windows support was contributed but it is still very green >code.??We get about four requests for parallel support a year so its just >not a well traveled area. > >It would be nice to have some documentation for the people trying to hook >parallel ports to electronic projects.??That appears to be the exclusive >use of the Parallel support.??The wiki pages are intended to let people >share information like this to help each other in their projects as they >figure out the details. > >-- >Trent Jarvi >tjarvi at qbang.org > > > > >-- >Ed > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 15 13:26:16 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 15 Aug 2006 14:26:16 -0500 Subject: [Rxtx] crash with too much memory Message-ID: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded from qbang.org. I'm exercising the RXTX COMM serial interface, both in a small standalone test and with the same code pulled into a large OSGI framework setup. If I use the stock .jar/.dll's, then everything works correctly in both situations. I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 (mingw-special)). If I use my locally built version, then my small test case works just fine, both when run inside Eclipse and when run standalone on the command line. However, when I try and use my locally built .jar/.dll's in the large framework environment, then I get a JVM crash with the attached log. Normally this would lead me to think that I was running out of memory or something in the large environment, and when I try and play with the JVM memory args, some interesting things show up. In our large environment, we have -Xms32M/-Xmx1024M - this appears to be the problem. If I set max to something like 64M, then things work. The cross over point from working to failing seems to be around 32M/110M (works) and 32M/111M (fails). But 128M/128M works while 128M/129M fails. So it seems to have to do with how much memory is actually available, or something like that. The thing that occurs to me is if my GCC is somehow generating something like "near" calls. But when the JVM has a lot of RAM available, it puts the DLL up somehwere in the address space and then the near calls fail - far calls are needed. So, I'm thinking this is probably a difference in the MinGW GCC I'm using and the one that was used to build the stock binaries from qbang, or maybe some command line args were changed? So, I'm hoping someone will have an idea of what's going on here... Thanks, Pete From tjarvi at qbang.org Tue Aug 15 18:54:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 15 Aug 2006 18:54:04 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: On Tue, 15 Aug 2006, Pete Flugstad wrote: > I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded > from qbang.org. > > I'm exercising the RXTX COMM serial interface, both in a small > standalone test and with the same code pulled into a large OSGI > framework setup. > > If I use the stock .jar/.dll's, then everything works correctly in > both situations. > > I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 > (mingw-special)). > > If I use my locally built version, then my small test case works just > fine, both when run inside Eclipse and when run standalone on the > command line. However, when I try and use my locally built > .jar/.dll's in the large framework environment, then I get a JVM crash > with the attached log. > > Normally this would lead me to think that I was running out of memory > or something in the large environment, and when I try and play with > the JVM memory args, some interesting things show up. > > In our large environment, we have -Xms32M/-Xmx1024M - this appears to > be the problem. If I set max to something like 64M, then things work. > The cross over point from working to failing seems to be around > 32M/110M (works) and 32M/111M (fails). > But 128M/128M works while 128M/129M fails. So it seems to have to do > with how much memory is actually available, or something like that. > > The thing that occurs to me is if my GCC is somehow generating > something like "near" calls. But when the JVM has a lot of RAM > available, it puts the DLL up somehwere in the address space and then > the near calls fail - far calls are needed. > > So, I'm thinking this is probably a difference in the MinGW GCC I'm > using and the one that was used to build the stock binaries from > qbang, or maybe some command line args were changed? > > So, I'm hoping someone will have an idea of what's going on here... > Hi Pete The binaries are from the src. They should be reproducable. I did extensive testing of rxtx several years ago using mingw as the compiler. The version was 2.95. I have not changed versions since. There are way too many variables as it is. I have a linux->mingw cross compiler rpm I use for all windows use. If you want a copy of it you can have it. It isn't anything 'special' :) -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Thu Aug 17 11:49:24 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 17 Aug 2006 12:49:24 -0500 Subject: [Rxtx] crash with too much memory In-Reply-To: References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> On 8/15/06, Trent Jarvi wrote: > I did extensive testing of rxtx several years ago using mingw as the > compiler. The version was 2.95. I have not changed versions since. > There are way too many variables as it is. FYI, I believe I've solved this problem by changing how the dll's were built. The original mingw makefile was generating Serial.def, then performing various operations with dlltool and ld. I modified the makefile to create the dll using this page: as a guide. With that, there's no longer any need to deal with Serial.def and the makefile becomes _much_ simpler. This appears to have addressed my problems with crashing. FWIW, GCC 2.95 is _really_ old - you should consider investigating upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is supposed to generate a native binary (i.e. just like MinGW). Thanks, Pete From claretlc at yahoo.com Thu Aug 17 12:34:48 2006 From: claretlc at yahoo.com (Clare Cooley) Date: Thu, 17 Aug 2006 11:34:48 -0700 (PDT) Subject: [Rxtx] parallel port communication Message-ID: <20060817183448.76911.qmail@web53908.mail.yahoo.com> Hi, I'm trying to write a 1 to a bit 15 on a parallel port cable that isn't attached to a printer.(It's a control box for eye-tracking equipment.)I need to do this in Java. I looked at the javax.comm documentation, and it said, "Application programs should not directly create ParallelPortEvent objects." So is there a way to do this with your package? If not, do you have any suggestions of where to look? It really needs to be done in Java. Thanks, Clare Cooley __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From pat at xvalheru.org Thu Aug 17 13:13:52 2006 From: pat at xvalheru.org (pat) Date: Thu, 17 Aug 2006 21:13:52 +0200 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060817190751.M5586@xvalheru.org> Hi there, I've question(s) for you. I need to communicate with scale, I've used the Sun's direver. Now I've switched to Rxtx and the speed of the communication is perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, but the difference between the crash time is 5 second ... . My question is: Is there a stable driver ??? Or what I have to do to have stable enough serial port driver ??? OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. Thanks to all for the help. Pat From tjarvi at qbang.org Fri Aug 18 05:13:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 05:13:42 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> Message-ID: On Thu, 17 Aug 2006, Pete Flugstad wrote: > On 8/15/06, Trent Jarvi wrote: >> I did extensive testing of rxtx several years ago using mingw as the >> compiler. The version was 2.95. I have not changed versions since. >> There are way too many variables as it is. > > FWIW, GCC 2.95 is _really_ old - you should consider investigating > upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is > supposed to generate a native binary (i.e. just like MinGW). > It is really old but also well known like C itself. I have considered upgrading. The ToyBox builds should be gcc 3* cross-compiled. I'm not going to be validating gcc 3* w32 binaries though. It's looking like we will need to focus support on MSFT's toolchain for 64 bit windows support until it is possible for gcc to support w64. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Aug 18 05:32:10 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 07:32:10 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: Hi All, Does anyone know how to produce mac intel binaries on a Fedora Linux box? Thanks! - Doug From tjarvi at qbang.org Fri Aug 18 06:42:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 06:42:05 -0600 (MDT) Subject: [Rxtx] cross compilation for the mac In-Reply-To: References: Message-ID: On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Does anyone know how to produce > mac intel binaries on a Fedora Linux > box? > > Thanks! > - Doug Hi Doug You need to build the cross toolchain which means copying the Darwin/Mac binaries over to fedora. It would be nontrivial but possible. Do the Darwin libraries work with Mac in general? I'm not aware of the licensing issues associated with grabbing Mac binaries. Same with OpenSolaris/Solaris. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Aug 18 08:15:26 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 10:15:26 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> In theory building against Darwin would be sufficient to getting things working on MacOS X. You need to remember that Darwin is the low-level OS, while MacOS X adds the everything else on top. IOKit, which is the I/O API, is available as part of Darwin. The only thing you will need extra are the Java libraries. One thing is that I would recommend that when producing binaries for the Mac, is to ensure they are Universal binaries (PPC+Intel). Andre > > From: Trent Jarvi > Date: 2006/08/18 Fri AM 08:42:05 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] cross compilation for the mac > > On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > > > Hi All, > > Does anyone know how to produce > > mac intel binaries on a Fedora Linux > > box? > > > > Thanks! > > - Doug > > Hi Doug > > You need to build the cross toolchain which means copying the Darwin/Mac > binaries over to fedora. It would be nontrivial but possible. > > Do the Darwin libraries work with Mac in general? I'm not aware of the > licensing issues associated with grabbing Mac binaries. > > Same with OpenSolaris/Solaris. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Aug 18 13:43:16 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 15:43:16 -0400 Subject: [Rxtx] cross compilation for the mac In-Reply-To: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: >In theory building against Darwin would be sufficient to getting >things working on MacOS X. You need to remember that Darwin is the >low-level OS, while MacOS X adds the everything else on top. IOKit, >which is the I/O API, is available as part of Darwin. The only thing >you will need extra are the Java libraries. > >One thing is that I would recommend that when producing binaries for >the Mac, is to ensure they are Universal binaries (PPC+Intel). > >Andre I find the xcode ide for generating a mix of universal binaries and java very difficult to make work. Is there a way to do this with make files? Thanks! - Doug From ajmas at sympatico.ca Fri Aug 18 13:54:55 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 15:54:55 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818195455.PGAP29052.tomts13-srv.bellnexxia.net@smtp1.sympatico.ca> It should be doable. XCode hands off the compilation process to gcc et al, for the compilation of C/C++ code and to javac et al. for the Java side. While ant is the favoured tool for 'automated' Java compilation, make can easily be used. All is needed is someone to volounteer to do the work. Andre "Dr. Douglas Lyon" wrote > > >In theory building against Darwin would be sufficient to getting > >things working on MacOS X. You need to remember that Darwin is the > >low-level OS, while MacOS X adds the everything else on top. IOKit, > >which is the I/O API, is available as part of Darwin. The only thing > >you will need extra are the Java libraries. > > > >One thing is that I would recommend that when producing binaries for > >the Mac, is to ensure they are Universal binaries (PPC+Intel). > > > >Andre > > I find the xcode ide for generating a mix of universal binaries > and java very difficult to make work. Is there a way to do this > with make files? > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Fri Aug 18 16:34:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 16:34:46 -0600 (MDT) Subject: [Rxtx] serial driver newbe question and problem In-Reply-To: <20060817190751.M5586@xvalheru.org> References: <20060817190751.M5586@xvalheru.org> Message-ID: On Thu, 17 Aug 2006, pat wrote: > Hi there, > > I've question(s) for you. I need to communicate with scale, I've used the > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > but the difference between the crash time is 5 second ... . > > My question is: Is there a stable driver ??? Or what I have to do to have > stable enough serial port driver ??? > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > Thanks to all for the help. > > Pat > Could you describe the hardware you have, the version of rxtx and provide the log of the crash? Did you download binaries? I've not been seeing a jvm crash with rxtx -- Trent Jarvi tjarvi at qbang.org From lunareclipse03 at web.de Sat Aug 19 12:11:48 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 19 Aug 2006 20:11:48 +0200 Subject: [Rxtx] Problem solved! Message-ID: <920065539@web.de> Hi everybody, I posted some months ago and asked about some help on my very special problem concerning my win32 port of a communications library. Now I just want to inform you that no further "mindstorming" is needed because I solved the problem by completely rewriting the win32 port of the library. Now everything works fine. Thank you all for your time and patience. --Sven Ahlemann __________________________________________________________________________ Erweitern Sie FreeMail zu einem noch leistungsst?rkeren E-Mail-Postfach! Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131 From ajmas at sympatico.ca Mon Aug 21 09:58:23 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 21 Aug 2006 11:58:23 -0400 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060821155823.TLSM18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Next time that happens, including a copy of the crash log, produced by Windows could probably help too. Andre Trent Jarvi wrote: > > On Thu, 17 Aug 2006, pat wrote: > > > Hi there, > > > > I've question(s) for you. I need to communicate with scale, I've used the > > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > > but the difference between the crash time is 5 second ... . > > > > My question is: Is there a stable driver ??? Or what I have to do to have > > stable enough serial port driver ??? > > > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > > > Thanks to all for the help. > > > > Pat > > > > Could you describe the hardware you have, the version of rxtx and > provide the log of the crash? Did you download binaries? > > I've not been seeing a jvm crash with rxtx > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From adrian.l.parker at gmail.com Thu Aug 24 09:10:39 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Thu, 24 Aug 2006 11:10:39 -0400 Subject: [Rxtx] Portability issues Message-ID: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use RXTX 2.0? Does it provide system librairies that javax.comm does not? I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, or 2000, or server 2003). Can this be done with a single implementation of RXTX? I don't want to have different versions of Java code that have different package names. References: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Message-ID: On Thu, 24 Aug 2006, Adrian Parker wrote: > Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use > RXTX 2.0? Does it provide system librairies that javax.comm does not? > > I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's > OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, > or 2000, or server 2003). Can this be done with a single implementation of > RXTX? I don't want to have different versions of Java code that have > different package names. > Hi Adrian. The native code can support all of the platforms you mention. I've never compiled for unixware or openunix but the patches are in the code. So you would need to compile for that target. >From there you would probably be best off going with rxtx 2.1 so you have all the classes in one package. You can opt to use rxtx 2.0 with Sun's commapi for Solaris v 2. The main differences are rxtx 2.1 comes with all the source/classes and is in package gnu.io while Sun's requires rxtx for some platforms but is in package javax.comm. The low level code is the same in either case as far as rxtx is concerned. -- Trent Jarvi tarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 04:12:52 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 06:12:52 -0400 Subject: [Rxtx] Serial.addEventListener bug? Message-ID: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on OpenServer 5.0.7). Its what Sun packages. I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an exception. It seems to throw the exception if no listener was previously declared (although I've not had chance to verify). Is this desireable behaviour? Sun's original API doesn't mention anything about an exception on this function, http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) Of course this is an old version of RXTX, so perhaps this has been changed. -- Adrian Parker Simulation Software Developer DLCSPM 4-4-3 (c) Building A31, CFB Kingston Tel: (613) 541-5010 x3020 CSN: 271-3020 Email: parker at lsec.dnd.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/22e2ea57/attachment-0310.html From tjarvi at qbang.org Fri Aug 25 05:15:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 25 Aug 2006 05:15:44 -0600 (MDT) Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: On Fri, 25 Aug 2006, Adrian Parker wrote: > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > OpenServer 5.0.7). Its what Sun packages. > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > exception. It seems to throw the exception if no listener was previously > declared (although I've not had chance to verify). > > Is this desireable behaviour? Sun's original API doesn't mention anything > about an exception on this function, > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > Of course this is an old version of RXTX, so perhaps this has been changed. > > > What exception was thrown? You can replace 1.4-8 with 2.0 for testing purposes. They are the same package. I doubt Sun shipped or packaged that. I think Caldera/SCOx/... did at one point. There may still be updates on their pages. I recall them sending patches here which are in current rxtx. -- Trent Jarvi tjarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 05:28:32 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 07:28:32 -0400 Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: <7da71e910608250428q32b86632g9a67b1b4efe69830@mail.gmail.com> On 8/25/06, Trent Jarvi wrote: > > On Fri, 25 Aug 2006, Adrian Parker wrote: > > > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > > OpenServer 5.0.7). Its what Sun packages. > > > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > > exception. It seems to throw the exception if no listener was > previously > > declared (although I've not had chance to verify). > > > > Is this desireable behaviour? Sun's original API doesn't mention > anything > > about an exception on this function, > > > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > > > Of course this is an old version of RXTX, so perhaps this has been > changed. > > > > > > > > What exception was thrown? Its weird. I catch an Exception. But when on that exception I call getClass().getName() I end up with a NullPointerException. You can replace 1.4-8 with 2.0 for testing > purposes. They are the same package. > > I doubt Sun shipped or packaged that. Doh! I meant to say SCO sorry. I was surfing Sun's site when I wrote that :) Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/e43aed3a/attachment-0310.html From sjudd at seas.upenn.edu Sat Aug 26 16:42:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Sat, 26 Aug 2006 18:42:09 -0400 Subject: [Rxtx] Mac commapi Message-ID: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? If so, where do I get it? Sun has various versions at http://www.sun.com/download/products.xml?id=43208d3d but they are for SolarisSparc, SolarisX86, Linux, and Generic. Do I use the Generic one? If so, read on; otherwise redirect me. While using the Generic version, my attempt to run the BlackBox sample program elicits a message saying it "can't find javax.comm.properties". I found a note in the rxtx.org HowTo (for Linux) saying to create this thing in /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties but where should it go on the Mac? After reading many versions of documentation around, and updates and revisions and re-authorings, I have worked my way into a state of confusion and high uncertainty. Please release me. sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060826/02d6b163/attachment-0280.html From tod at todbot.com Sat Aug 26 17:08:33 2006 From: tod at todbot.com (Tod E. Kurt) Date: Sat, 26 Aug 2006 16:08:33 -0700 Subject: [Rxtx] Mac commapi In-Reply-To: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Message-ID: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> You don't need Sun's CommAPI. You just need RXTX. Once you download RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and the native library is ("librxtxSerial.jnilib" on Mac OS X) via the standard methods. For instance, if you've placed those two files in a directory called 'rxtxlib' and you want to run a Java class called HelloWorld in the current directory, do the following: % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar HelloWorld On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? > If so, where do I get it? Sun has various versions at > http://www.sun.com/download/products.xml?id=43208d3d > but they are for SolarisSparc, SolarisX86, Linux, and Generic. > Do I use the Generic one? > If so, read on; otherwise redirect me. > > While using the Generic version, my attempt to run the BlackBox > sample program > elicits a message saying it "can't find javax.comm.properties". > I found a note in the rxtx.org HowTo (for Linux) saying to create > this thing in > /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties > but where should it go on the Mac? > > After reading many versions of documentation around, and updates > and revisions > and re-authorings, I have worked my way into a state of confusion > and high > uncertainty. Please release me. > > sj > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From sjudd at seas.upenn.edu Sun Aug 27 22:55:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Mon, 28 Aug 2006 00:55:09 -0400 Subject: [Rxtx] Mac commapi In-Reply-To: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> Message-ID: This was immensely helpful. Thank you, Tod. I wish it had been explicit somewhere in the documentation; it would have saved me 2 days of grief. One hugely valuable thing like this little set of instructions is that it implicitly lists all the hundreds of things you DON"T have to do. I know it seems obvious to those in the know, but every little bit of help on an arcane topic like this opens up the product to an exponentially wider group of dilettantes. I managed to get the SerialDemo program (from Sun) to work too. Hurrah! However, it required changing all the javax.comm references to gnu.io which I had heard of due to all my rambling readings. Is there not a demo program on rxtx.org already available that would not have needed this? BTW, the link on the Projects page for jPIC[Source] sends a *.hex file to a PIC 16F877 or similar chip... takes me to nowhere useful. I do not understand what the name "Toybox" is meant to imply. Thanks, sj On 2006 Aug 26, at 7:08 PM, Tod E. Kurt wrote: > You don't need Sun's CommAPI. You just need RXTX. Once you download > RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and > the native library is ("librxtxSerial.jnilib" on Mac OS X) via the > standard methods. > > For instance, if you've placed those two files in a directory called > 'rxtxlib' and you want to run a Java class called HelloWorld in the > current directory, do the following: > > % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar > HelloWorld > > > On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > >> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? >> If so, where do I get it? Sun has various versions at >> http://www.sun.com/download/products.xml?id=43208d3d >> but they are for SolarisSparc, SolarisX86, Linux, and Generic. >> Do I use the Generic one? >> If so, read on; otherwise redirect me. >> >> While using the Generic version, my attempt to run the BlackBox >> sample program >> elicits a message saying it "can't find javax.comm.properties". >> I found a note in the rxtx.org HowTo (for Linux) saying to create >> this thing in >> /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties >> but where should it go on the Mac? >> >> After reading many versions of documentation around, and updates >> and revisions and re-authorings, I have worked my way into a state >> of confusion and high uncertainty. Please release me. >> >> sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060827/b80d6389/attachment-0280.html From pete.flugstad at gmail.com Mon Aug 28 12:38:27 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 13:38:27 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE Message-ID: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Okay, my understanding is that originally, RTS meant "Request to Send" - the DTE (the PC) would assert this and the DCE (modem) would assert "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send data. This really only provided uni-directional flow control, from the PC to the modem. Now, as I understand it, the more modern usage of RTS is that it is used for the DTE to assert flow control back to the DCE - basically it means "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) raises this, then the DCE(modem) is free to send data to the DTE - this allows the DTE(PC) to exert flow control back towards the DCE(modem). This discussion is based on the Serial HOWTO from: and lots of other reading... Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which is defined as: > Enables RTS flow-control handshaking. The driver raises the RTS line, > enabling the DCE to send, when the input buffer has enough room to > receive data. The driver lowers the RTS line, preventing the DCE to > send, when the input buffer does not have enough room to receive > data. If this value is used, it is an error for the application to adjust > the line with EscapeCommFunction. which clearly reflects the newer usage style - it keeps the RTS line high as long as there is space to _receive_ data. And takes it low when the receive/input buffer is getting full to stop the modem from sending it data. Does this jive with other peoples understanding of RTS usage? Unfortunately, the hardware I'm trying to talk to wants to use the OLD style of RTS line usage. An existing Windows C++ program uses RTS_CONTROL_TOGGLE, which documentation states: > Specifies that the RTS line will be high if bytes are available for transmission. > After all buffered bytes have been sent, the RTS line will be low. If this value is > set, it would be an error for an application to adjust the line with > EscapeCommFunction. This value is ignored in Windows 95; it causes the > driver to act as if RTS_CONTROL_ENABLE were specified. This seems to be the OLD RTS behavior, right? So, what I seem to need is to be able to control the RTS line, either using TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS when getting ready to TX and clear it when the output buffer is empty). Does this make sense, or am I off in the weeds? Thanks, Pete From tjarvi at qbang.org Mon Aug 28 18:21:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 28 Aug 2006 18:21:10 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: On Mon, 28 Aug 2006, Pete Flugstad wrote: > Okay, my understanding is that originally, RTS meant "Request to Send" > - the DTE (the PC) would assert this and the DCE (modem) would assert > "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send > data. This really only provided uni-directional flow control, from the PC to > the modem. > > Now, as I understand it, the more modern usage of RTS is that it is used > for the DTE to assert flow control back to the DCE - basically it means > "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) > raises this, then the DCE(modem) is free to send data to the DTE - this > allows the DTE(PC) to exert flow control back towards the DCE(modem). > > This discussion is based on the Serial HOWTO from: > > > > and lots of other reading... > > Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > is defined as: > >> Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > > which clearly reflects the newer usage style - it keeps the RTS line high > as long as there is space to _receive_ data. And takes it low when the > receive/input buffer is getting full to stop the modem from sending it data. > > Does this jive with other peoples understanding of RTS usage? > > Unfortunately, the hardware I'm trying to talk to wants to use the OLD > style of RTS line usage. An existing Windows C++ program uses > RTS_CONTROL_TOGGLE, which documentation states: > >> Specifies that the RTS line will be high if bytes are available for transmission. >> After all buffered bytes have been sent, the RTS line will be low. If this value is >> set, it would be an error for an application to adjust the line with >> EscapeCommFunction. This value is ignored in Windows 95; it causes the >> driver to act as if RTS_CONTROL_ENABLE were specified. > > This seems to be the OLD RTS behavior, right? > > So, what I seem to need is to be able to control the RTS line, either using > TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS > when getting ready to TX and clear it when the output buffer is empty). > > Does this make sense, or am I off in the weeds? > Hi Pete OK. That sounds right. I do not know how you would communicate the difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through CommAPI as it stands. I take it you did not find anything either? Perhaps the best thing to do for your code is to toggle the RTS yourself. This could be a feature in the future JSR API perhaps. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 28 20:54:34 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 21:54:34 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <44F3AC6A.10908@gmail.com> Trent Jarvi wrote: > OK. That sounds right. I do not know how you would communicate the > difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through > CommAPI as it stands. I take it you did not find anything either? > > Perhaps the best thing to do for your code is to toggle the > RTS yourself. This could be a feature in the future JSR API perhaps. Yeah, this is what I ended up doing. I had to modify the dll in order to be able to set hardware flow control (which I do want), but leave the RTS flow control at RS_CONTROL_ENABLE. After that I just toggle setRTS(true) when I'm ready to send and setRTS(false) when I get a OUTPUT_BUFFER_EMPTY notification. Haven't tested with real hardware yet, but it seems to work OK. Thanks for the feedback! Pete From Bob_Jacobsen at lbl.gov Tue Aug 29 08:49:02 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 29 Aug 2006 07:49:02 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >is defined as: > > > Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > >which clearly reflects the newer usage style - it keeps the RTS line high >as long as there is space to _receive_ data. And takes it low when the >receive/input buffer is getting full to stop the modem from sending it data. > >Does this jive with other peoples understanding of RTS usage? Can you point to any devices that actually implement this "new" understanding? I think the person who wrote that documentation paragraph is just confused. The original "RTS/CTS" handshaking was extended to input (from DCE to DTE) handshaking via the DTR (Data Terminal Ready) line. I think the person who wrote the double-quoted paragraph above was just confused between the directions, and mixed them up. If you change "RTS" to "DTR" in that paragraph, you get: > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > enabling the DCE to send, when the input buffer has enough room to > > receive data. The driver lowers the DTR line, preventing the DCE to > > send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. which describes how dozens of devices actually work for controlling flow into the DTE (computer). This then leaves RTS/CTS (with RTS usually just stuck high) for controlling flow into the DCE (peripheral). Again, lots of hardware devices actually do this. I don't work on Windows, so can't be sure of what happens. But on the MacOS X version of RXTX, CTS low stops transmission, exactly as the "old" style would expect. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From mschned at basis.com Tue Aug 29 12:57:45 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 12:57:45 -0600 Subject: [Rxtx] Porting to AIX Message-ID: <01f201c6cb9d$034d4f20$341416ac@basis.com> Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar From mschned at basis.com Tue Aug 29 13:58:05 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 13:58:05 -0600 Subject: [Rxtx] Porting to AIX References: <01f201c6cb9d$034d4f20$341416ac@basis.com> Message-ID: <024901c6cba5$714c3560$341416ac@basis.com> After looking through the build messages closer, there is an error building SerialImp.c: gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type Looks like B57600 is not defined and there are no definitions for DEVICEDIR and LOCKDIR on AIX. Can I just a the following to SerialImp.h? #if defined(__aix__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __aix__ */ Mark Schnedar ----- Original Message ----- From: "Mark E. Schnedar" To: Sent: Tuesday, August 29, 2006 12:57 PM Subject: [Rxtx] Porting to AIX Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 29 15:25:35 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 29 Aug 2006 16:25:35 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <84d4a6d50608291425i1fb819d3i615cf9b85b1e9617@mail.gmail.com> On 8/29/06, Bob Jacobsen wrote: > Can you point to any devices that actually implement this "new" understanding? > > I think the person who wrote that documentation paragraph is just confused. The paragraph is from the Windows documentation of its DCB structure which is used to configure the Serial Device. This is what RXTX uses internally. My version is from MSDN, and Google finds the same text here: (search for fRtsControl). I have not seen any mention anywhere of it being incorrect (and yes, I did look, because I thought the same thing). My discussion is based on trying to use RXTX to talk to a device that used the old style of one-way flow control (RTS is raised to SEND data from the PC to the device). An existing VC++ app use the old-style RTS_CONTROL_TOGGLE. RXTX did not - it used the newer style RTS_CONTROL_HANDSHAKE, so things didn't work - the device was seeing RTS HIGH all the time, so it was thinking that the PC was ready to TX all the time. When I switch RXTX to using RTS_CONTROL_ENABLED and manually control RTS, then things work correctly. The behavior is consistent with this understanding if I hook two serial ports on Windows XP in lookback (via null modem). I'd be very surprised if this had not been corrected by M$ by this time. The same structure has been around since WinNT (mid 1990's) - their documentation is typically pretty good. > > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > > enabling the DCE to send, when the input buffer has enough room to > > > receive data. The driver lowers the DTR line, preventing the DCE to > > > send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. There is a seperate field, fDtrControl, which you can set to DTR_CONTROL_HANDSHAKE, that appears to do exactly this. > This then leaves RTS/CTS (with RTS usually just stuck high) for > controlling flow into the DCE (peripheral). Again, lots of hardware > devices actually do this. > > I don't work on Windows, so can't be sure of what happens. But on > the MacOS X version of RXTX, CTS low stops transmission, exactly as > the "old" style would expect. Well, the Linux Serial HOWTO is where I got most of my information. And yes, I thought it was wrong as well, but it's apparently how things are implemented: Donno - but it works for me... Pete From tjarvi at qbang.org Tue Aug 29 19:11:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 29 Aug 2006 19:11:40 -0600 (MDT) Subject: [Rxtx] Porting to AIX In-Reply-To: <024901c6cba5$714c3560$341416ac@basis.com> References: <01f201c6cb9d$034d4f20$341416ac@basis.com> <024901c6cba5$714c3560$341416ac@basis.com> Message-ID: Hi Mark That should do it. You can put ifdef around the B57600 as we did with higher baudrates. You may want to use tip, minicom, kermit or some other serial application on the AIX to confirm that the lockfiles created are correct. Neat stuff. On Tue, 29 Aug 2006, Mark E. Schnedar wrote: > After looking through the build messages closer, > there is an error building SerialImp.c: > > gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o > /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type > > Looks like B57600 is not defined and there are no > definitions for DEVICEDIR and LOCKDIR on AIX. > > Can I just a the following to SerialImp.h? > > #if defined(__aix__) > # define DEVICEDIR "/dev/" > # define LOCKDIR "/var/lock" > # define LOCKFILEPREFIX "LCK.." > # define FHS > #endif /* __aix__ */ > > Mark Schnedar > > > ----- Original Message ----- > From: "Mark E. Schnedar" > To: > Sent: Tuesday, August 29, 2006 12:57 PM > Subject: [Rxtx] Porting to AIX > > > Hi, > > I'm new to rxtx. Currently my company has an interpreter product > that uses rxtx on Windows and Linux. I am trying to get rxtx to > build on AIX. I downloaded rxtx, ran ./configure and make. When > I run make I get the following error: > > libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object > make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 > > Do you have any suggestions on how to fix this problem? > > I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error > on both systems). I did have our system administrator load > automake, autoconf, make (gnu), and gcc. Here are the versions: > > AIX 4.3.3 AIX 5.3.0 > rxtx: 2.1-7r2 2.1-7r2 > autoconf: 2.53 2.59 > automake: 1.5 1.8.5 > make: 3.79.1 3.80 > gcc: (used native cc) 4.0.0 > > Any help would be appreciated. > > Mark Schnedar > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From guille at sms.nl Wed Aug 30 01:14:32 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 09:14:32 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <7.0.1.0.0.20060830091204.03652de0@sms.nl> At 16:49 29/08/2006, Bob Jacobsen wrote: >At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > > > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >is defined as: > > > > > Enables RTS flow-control handshaking. The driver raises the RTS line, > >> enabling the DCE to send, when the input buffer has enough room to > >> receive data. The driver lowers the RTS line, preventing the DCE to > >> send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. > > > >which clearly reflects the newer usage style - it keeps the RTS line high > >as long as there is space to _receive_ data. And takes it low when the > >receive/input buffer is getting full to stop the modem from sending it data. > > > >Does this jive with other peoples understanding of RTS usage? > >Can you point to any devices that actually implement this "new" understanding? Many (most) of the embedded devices we work with implement this kind of flow control. The host (DTE) raises RTS when it can receive data, and lowers it when the input buffers are full. In turn it watches the CTS line to see whether it can send data to the DCE. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From tjarvi at qbang.org Wed Aug 30 01:23:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 30 Aug 2006 01:23:46 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830091204.03652de0@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 16:49 29/08/2006, Bob Jacobsen wrote: >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: >>> >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >>> is defined as: >>> >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, >>>> enabling the DCE to send, when the input buffer has enough room to >>>> receive data. The driver lowers the RTS line, preventing the DCE to >>>> send, when the input buffer does not have enough room to receive >>>> data. If this value is used, it is an error for the application to adjust >>>> the line with EscapeCommFunction. >>> >>> which clearly reflects the newer usage style - it keeps the RTS line high >>> as long as there is space to _receive_ data. And takes it low when the >>> receive/input buffer is getting full to stop the modem from sending it data. >>> >>> Does this jive with other peoples understanding of RTS usage? >> >> Can you point to any devices that actually implement this "new" understanding? > > Many (most) of the embedded devices we work with implement this kind of flow > control. The host (DTE) raises RTS when it can receive data, and lowers it > when the input buffers are full. In turn it watches the CTS line to see > whether it can send data to the DCE. > I think this explains some hardware control 'bugs' I've seen. -- Trent Jarvi tjarvi at qbang.org From guille at sms.nl Wed Aug 30 02:01:35 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 10:01:35 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> At 09:23 30/08/2006, Trent Jarvi wrote: >On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > > > At 16:49 29/08/2006, Bob Jacobsen wrote: > >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >>> > >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >>> is defined as: > >>> > >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, > >>>> enabling the DCE to send, when the input buffer has enough room to > >>>> receive data. The driver lowers the RTS line, preventing the DCE to > >>>> send, when the input buffer does not have enough room to receive > >>>> data. If this value is used, it is an error for the > application to adjust > >>>> the line with EscapeCommFunction. > >>> > >>> which clearly reflects the newer usage style - it keeps the RTS line high > >>> as long as there is space to _receive_ data. And takes it low when the > >>> receive/input buffer is getting full to stop the modem from > sending it data. > >>> > >>> Does this jive with other peoples understanding of RTS usage? > >> > >> Can you point to any devices that actually implement this "new" > understanding? > > > > Many (most) of the embedded devices we work with implement this > kind of flow > > control. The host (DTE) raises RTS when it can receive data, and lowers it > > when the input buffers are full. In turn it watches the CTS line to see > > whether it can send data to the DCE. > > > >I think this explains some hardware control 'bugs' I've seen. I think the above is the most widespread use, but that may just mean it is the most widespread use in our specific segment (embedded systems). Some UART chips (e.g. from Exar) implement this kind of flow control directly in hardware. For example the Exar can be configured to suspend transmission when it sees CTS low, and resume transmission when it sees CTS high. This is also consistent with our experience. Maybe this helps clarify: http://www.tldp.org/HOWTO/Text-Terminal-HOWTO-10.html#ss10.7 Note the "Old RTS/CTS handshaking is different" section, which refers to "older terminals" whereas newer equipment would use RTS/CTS flow control (or equivalently DTR/DTS) as described above. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From Bob_Jacobsen at lbl.gov Wed Aug 30 07:55:31 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 30 Aug 2006 06:55:31 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> <7.0.1.0.0.20060830095557.0374ff28@sms.nl> Message-ID: I think we all agree that CTS inactive means "Send no more from DTE to DCE". The question is how to express the other direction, "Send no more from DCE to DTE". There are two parts to this question: What do various DTE-like devices do, and what do various DCE-like devices expect? Electrically, the lines that go that direction are DTR, DCD, and RTS (plus some special-purpose lines that are rarely present). All three devices I work most with respect the DTR lead. On the other hand, the FTDI chips for doing serial over USB provide either (RTS and CTS) or (DTR and DSR) as the two leads. What we're probably seeing is two different approaches, that have propagated separately. That's a problem. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From Pawan.Kharbanda at dot.state.co.us Wed Aug 30 09:07:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 30 Aug 2006 09:07:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0455E5E5@hqexchange3.dot.state.co.us> Trent, Sorry for not responding earlier to your email. I was actually waiting for the release of our software on the new Hardware. As I mentioned in my previous emails, RXTX crashes and locks up serial ports with the older version of Redhat (Linux 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:28:55 EDT 2005 i686 i686 i386 GNU/Linux), it might work ok if you are using one or 2 ports but anything more than that it has issues. I was using JDK1.5.0_06 and older firmwares of Digi boxes. Let me know if you need any more specific information of the older system. Thanks Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Thursday, August 10, 2006 5:40 AM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even > after 10000 operations (now I am trying 100,000 :). This is all with > the original RXTX 2.1.7 (final) api's without any of my fixes that I > have been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying > the RXTX saying the suggested kernel for Redhat Linux is > 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Aug 1 01:11:30 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 1 Aug 2006 09:11:30 +0200 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <34B6BC40-1405-4A13-8054-0FC6CE10466A@buechse.de> This is a problem with lock files. You should find it somewhere in the documentation... On 01.08.2006, at 03:53, Richard P. Welty wrote: > trying to get my app running on a Mac OS X powerbook, when > the following is executed as the first thing inside the > run method of a Thread: > > > try { > port = (SerialPort) selectedPort.open( > this.getClass().getName(), 2000); > } catch ( PortInUseException ex){ > ex.printStackTrace(); > return; > } > > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java: > 354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run > (ScaleWatcher.java:143) > > i've not seen any documentation suggesting that rxtx would be finicky > about application names... > > thanks for any suggestions, > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From rwelty at suespammers.org Tue Aug 1 05:37:53 2006 From: rwelty at suespammers.org (Richard P. Welty) Date: Tue, 01 Aug 2006 07:37:53 -0400 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <44CF3D11.9060108@suespammers.org> Richard P. Welty wrote: > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) Aha, a confusing error message. it's really a lock file problem; the code is trying to fill in the application name but when it's getting "Unknown Application" and filling that in... richard From ajmas at sympatico.ca Tue Aug 1 13:10:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:10:59 -0400 Subject: [Rxtx] Application Name? Message-ID: <20060801191059.HFCD18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> You need the source code in CVS. The forth coming 2.18 will correct this, but currently the only place to find the correction is in CVS. No idea when 2.18 is due. > > From: "Richard P. Welty" > Date: 2006/08/01 Tue AM 07:37:53 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Application Name? > > Richard P. Welty wrote: > > > i get the following: > > > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > at > > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) > > Aha, a confusing error message. it's really a lock file problem; the > code is trying to fill in the application name but when it's getting > "Unknown Application" and filling that in... > > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:15:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:15:57 -0400 Subject: [Rxtx] Do interfaces break backwards compatibility? Message-ID: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> It is the class that decides to add serializable that needs to worry about those issues. For the most part serial ports and their connection states should be considered as transient, since there is no guarantee they will still be present or that their state will be, especially in a USB world. What you can store is the port settings and port id and then simply test for port availability next time. Nothing else should be assumed. > > From: Gregg Wonderly > Date: 2006/07/31 Mon PM 01:21:19 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Do interfaces break backwards compatibility? > > Doug Berkland wrote: > > As far as I can tell, nothing in either RXTX or Sun's JavaCOMM > > implements Serializable. Therefore, there are no worries from that > > either. (I can't think of a reason anything in JavaCOMM should > > implement Serializable either.) > > Any interface in javax.comm can become implemented by a serializable object. > Thus, if someone wants to provide remote access to a serial port, then they > might (and I think this is not wise) choose to subclass and add Serializable to > the interface list. > > It's that kind of Serialization compatibility that I'm talking about. > > Gregg Wonderly > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:18:11 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:18:11 -0400 Subject: [Rxtx] precompiled for Intel Mac? Message-ID: <20060801191811.FLJY27612.tomts16-srv.bellnexxia.net@smtp1.sympatico.ca> > > From: Joachim Buechse > There will be. However not before we have figured out some remaining issues. What issues are remaining? Andre From Pawan.Kharbanda at dot.state.co.us Tue Aug 1 16:55:08 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 1 Aug 2006 16:55:08 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Hi, I am also experiencing occasional JVM crash thru the native code. I am attaching the log from the crash. Any ideas what might be causing it???? Regards Pawan Kharbanda # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # --------------- T H R E A D --------------- Current thread (0x8d000480): JavaThread "Thread-119" [_thread_in_native, id=111 51] siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba Registers: EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 Top of Stack: (sp=0x8d3482b8) 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 0x8d348308: 00000000 00000002 00000000 00000000 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 Instructions: (pc=0xb75e39b2) 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~StubRoutines::call_stub V [libjvm.so+0x2607ec] V [libjvm.so+0x423828] V [libjvm.so+0x260045] V [libjvm.so+0x2600de] V [libjvm.so+0x2d7745] V [libjvm.so+0x4c2ba3] V [libjvm.so+0x424338] C [libpthread.so.0+0x4dd8] 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 ) =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, id=11026] 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, id=11023] From tjarvi at qbang.org Tue Aug 1 18:46:21 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 1 Aug 2006 18:46:21 -0600 (MDT) Subject: [Rxtx] JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Message-ID: On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) > C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] > 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, > id=11034] > 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, > id=11033] > 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, > id=11032] > 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, > id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] > 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, > id=11028] > 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, > id=11027] > 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, > id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] > 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- Index: termios.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/termios.c,v retrieving revision 1.9.2.57 diff -u -r1.9.2.57 termios.c --- termios.c 4 Jun 2006 02:50:01 -0000 1.9.2.57 +++ termios.c 11 Jun 2006 21:51:10 -0000 @@ -1048,26 +1048,29 @@ if ( !first_tl ) { port->prev = NULL; + port->next = NULL; first_tl = port; } else { - while ( index->next ) + while ( ( index->fd < port->fd ) && index->next ) index = index->next; - if ( port == first_tl ) + if ( index->fd > port->fd ) { - port->prev = NULL; - port->next = first_tl; - first_tl->prev = port; - first_tl = port; + /* inserting previously closed fd */ + port->prev = index->prev; + port->next=index + index->prev->next = port; + index->prev = port; } else { + /* adding to end of list */ port->prev = index; + port->next = NULL; index->next = port; } } - port->next = NULL; LEAVE( "add_port" ); return port; From gergg at cox.net Tue Aug 1 23:25:19 2006 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 02 Aug 2006 00:25:19 -0500 Subject: [Rxtx] Do interfaces break backwards compatibility? In-Reply-To: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <44D0373F.7020600@cox.net> Andre-John Mas wrote: > It is the class that decides to add serializable that needs to worry about those issues. > For the most part serial ports and their connection states should be considered as > transient, since there is no guarantee they will still be present or that their state > will be, especially in a USB world. Right, but when you provide an interface as the standard, that opens the doors for a lot more interpretation and variation. An abstract class can indicate a lot more about what the expected implementation is. Gregg Wonderly From lyon at docjava.com Wed Aug 2 06:02:15 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:02:15 -0400 Subject: [Rxtx] jsr spec and license issues Message-ID: Hi All, Trent and I have been discussing the license issues of the JSR spec and code that we develop, as a community. Here is what we have come up with: >During the development, the new JSR spec that we derive >will be >covered under the LGPL license. Since it is >just interfaces, any contributions will come back to me, for inclusion >into the specification. The goal is to provide a detailed set of >interfaces that >document the present state of our reference model. I am using >the RXTX as the reference model. If there is something missing from >the reference model, or if the reference model has something that should >not be there, we will need to discuss it. > >After Sun accepts the JSR, I, as the copyright holder, can issue >a version with a JSR compatible license. > >The goal is to migrate the interfaces into javax.comm. Does this sound like a reasonable plan to everyone? Thanks! - Doug From joachim at buechse.de Wed Aug 2 06:21:03 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 14:21:03 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Good day, quite frankly I think that this is a very bad idea. This specification (!) should be in the public domain and nowhere else. Defining a spec under the (L)GPL makes absolutely no sense. After all it is a specification not an implementation. There is no or only trivial code attached to it. So while nothing can be gained by putting it under the LGPL, a lot can be lost - for example the contribution of companies that do not like to open source their implementations. Furthermore you are plain wrong assuming you will be the copyright holder to additions made by other people. Best regards, Joachim On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for >> inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that >> should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Aug 2 06:39:28 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:39:28 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Hi All, I don't know anything about licensing issues. The below sounds reasonable. If we make this public domain, will that be compatible with Sun's JSR? Thanks! - DL P.S. I really don't care what we do, as long as there is some sort of collective agreement. >Good day, > >quite frankly I think that this is a very bad idea. This specification >(!) should be in the public domain and nowhere else. > >Defining a spec under the (L)GPL makes absolutely no sense. After all? >it is a specification not an implementation. There is no or only? >trivial code attached to it. So while nothing can be gained by? >putting it under the LGPL, a lot can be lost - for example the? >contribution of companies that do not like to open source their? >implementations. > >Furthermore you are plain wrong assuming you will be the copyright? >holder to additions made by other people. > >Best regards, >Joachim > > >On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for? >>> inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that? >>> should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> >> Does this sound like a reasonable plan to everyone? >> >> Thanks! >> - Doug >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 07:50:09 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 10:50:09 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D0AD91.4080103@gmail.com> Hi, I have been searching the web and here it is: http://jcp.org/en/resources/license_reference Here there is a list of the licenses that are compatible with the JCP for JSR submitting. I think that Apache, CDDL, CPL and OSL are the one that are compatible with our needs. But I think that Apache is the best for us, Doug why do not make a votation? Regards, Manuel > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. > >> Good day, >> >> quite frankly I think that this is a very bad idea. This specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From lyon at docjava.com Wed Aug 2 08:10:55 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 10:10:55 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D0AD91.4080103@gmail.com> References: <44D0AD91.4080103@gmail.com> Message-ID: Hi All, I have no objection to an Apache license for the JSR interfaces that we produce. Would anyone care to comment? Joachim: Does this address your public domain concerns? How does this impact the reference implementation (i.e. RXTX)? Thanks! - DL >Hi, >I have been searching the web and here it is: >http://jcp.org/en/resources/license_reference >Here there is a list of the licenses that are compatible with the JCP >for JSR submitting. >I think that Apache, CDDL, CPL and OSL are the one that are compatible >with our needs. >But I think that Apache is the best for us, Doug why do not make a votation? >Regards, >Manuel > >> Hi All, >> I don't know anything about licensing issues. >> The below sounds reasonable. If we make this public domain, >> will that be compatible with Sun's JSR? >> Thanks! >> - DL >> P.S. I really don't care what we do, as long as there is >> some sort of collective agreement. >>?? >>> Good day, >>> >>> quite frankly I think that this is a very bad idea. This specification >>> (!) should be in the public domain and nowhere else. >>> >>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>> it is a specification not an implementation. There is no or only >>> trivial code attached to it. So while nothing can be gained by >>> putting it under the LGPL, a lot can be lost - for example the >>> contribution of companies that do not like to open source their >>> implementations. >>> >>> Furthermore you are plain wrong assuming you will be the copyright >>> holder to additions made by other people. >>> >>> Best regards, > >> Joachim >>> >>> >>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>> >>>???? >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>?????? >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for >>>>> inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that >>>>> should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>>>???????? >>>> Does this sound like a reasonable plan to everyone? >>>> >>>> Thanks! >>>> - Doug >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>?????? >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>???? >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 08:20:29 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 11:20:29 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D0AD91.4080103@gmail.com> Message-ID: <44D0B4AD.2050106@gmail.com> Doug; > How does this impact the reference implementation (i.e. RXTX)? > Fuck I have not thinked about that, we would need that everyone who had colaborated with RXTX and have putted code on it to agree a license chaging. Or start from sractch. I don't know if Trent have the right to do that. Regards, Manuel > > >> Hi, >> I have been searching the web and here it is: >> http://jcp.org/en/resources/license_reference >> Here there is a list of the licenses that are compatible with the JCP >> for JSR submitting. >> I think that Apache, CDDL, CPL and OSL are the one that are compatible >> with our needs. >> But I think that Apache is the best for us, Doug why do not make a votation? >> Regards, >> Manuel >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> >> >> Joachim >> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 08:21:15 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 16:21:15 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Putting something in the public domain means, that it can be used by anyone for whatever (s)he thinks is appropriate. The authors define no restriction regarding it's use. That's how any specification should be. Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From berkland at spamcop.net Wed Aug 2 08:50:50 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 10:50:50 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> You may want to consider making it available under two separate licenses. 1 - LGPL as it is today The LGPL can be used by anyone wanting to extend the current functionality, as long as they provide code for anything they change. 2 - Sun Community Source License (SCSL) http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf The SCSL will allow anyone who wants to do a closed source implementation from the ground up to do so, if I'm reading it correctly, as long as they don't use any of the code from the Reference Implementation. This will satisfy any company that wants to have a closed-source implementation, but not help them out very much. On 8/2/06, Joachim Buechse wrote: > Putting something in the public domain means, that it can be used by > anyone for whatever (s)he thinks is appropriate. The authors define > no restriction regarding it's use. That's how any specification > should be. > > Best regards, > Joachim > > > On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > > > Hi All, > > I don't know anything about licensing issues. > > The below sounds reasonable. If we make this public domain, > > will that be compatible with Sun's JSR? > > Thanks! > > - DL > > P.S. I really don't care what we do, as long as there is > > some sort of collective agreement. > >> Good day, > >> > >> quite frankly I think that this is a very bad idea. This > >> specification > >> (!) should be in the public domain and nowhere else. > >> > >> Defining a spec under the (L)GPL makes absolutely no sense. After all > >> it is a specification not an implementation. There is no or only > >> trivial code attached to it. So while nothing can be gained by > >> putting it under the LGPL, a lot can be lost - for example the > >> contribution of companies that do not like to open source their > >> implementations. > >> > >> Furthermore you are plain wrong assuming you will be the copyright > >> holder to additions made by other people. > >> > >> Best regards, > >> Joachim > >> > >> > >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> > >>> Hi All, > >>> Trent and I have been discussing the license issues of the > >>> JSR spec and code that we develop, as a community. > >>> Here is what we have come up with: > >>> > >>>> During the development, the new JSR spec that we derive > >>>> will be > >>>> covered under the LGPL license. Since it is > >>>> just interfaces, any contributions will come back to me, for > >>>> inclusion > >>>> into the specification. The goal is to provide a detailed set of > >>>> interfaces that > >>>> document the present state of our reference model. I am using > >>>> the RXTX as the reference model. If there is something missing > >>>> from > >>>> the reference model, or if the reference model has something that > >>>> should > >>>> not be there, we will need to discuss it. > >>>> > >>>> After Sun accepts the JSR, I, as the copyright holder, can issue > >>>> a version with a JSR compatible license. > >>>> > >>>> The goal is to migrate the interfaces into javax.comm. > >>> > >>> Does this sound like a reasonable plan to everyone? > >>> > >>> Thanks! > >>> - Doug > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From naranjo.manuel at gmail.com Wed Aug 2 09:03:02 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 12:03:02 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> References: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> Message-ID: <44D0BEA6.2040408@gmail.com> Or even better, you can use Apache v2, which allows both Open Source and Closed Source forms ;-) > You may want to consider making it available under two separate licenses. > > 1 - LGPL as it is today > > The LGPL can be used by anyone wanting to extend the current > functionality, as long as they provide code for anything they change. > > 2 - Sun Community Source License (SCSL) > http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf > > The SCSL will allow anyone who wants to do a closed source > implementation from the ground up to do so, if I'm reading it > correctly, as long as they don't use any of the code from the > Reference Implementation. This will satisfy any company that wants to > have a closed-source implementation, but not help them out very much. > > On 8/2/06, Joachim Buechse wrote: > >> Putting something in the public domain means, that it can be used by >> anyone for whatever (s)he thinks is appropriate. The authors define >> no restriction regarding it's use. That's how any specification >> should be. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This >>>> specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> Joachim >>>> >>>> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing >>>>>> from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 09:46:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 17:46:25 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> I assume that javax.comm/RXTX is to be redefined using Interfaces. In this case we should separate 2 things: 1) The specification and it's incarnation in the form of java classes defining the interfaces. 2) The actual implementation of the functionality. It is possible that 1) may contain some trivial code in abstract or none abstract classes (ie PortFactory, PortRegistry, etc). Doug's original question was regarding 1) - unless I misunderstood. I personally think that 1) should be in the public domain. It should not be covered by any restrictions what-so-ever. Let it be free as in "totally free in any respect". I do not care under which license 2) is released. Why? Because it is in my very interest that all/almost all vendors include implementations with their distributions. Which will only happen if they do not need to respect open source licenses. (javax.comm is not nearly as important as the Apache web server or MySql, so nobody will take licensing risks). Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ssbello at gmail.com Wed Aug 2 10:28:30 2006 From: ssbello at gmail.com (Simone) Date: Wed, 2 Aug 2006 18:28:30 +0200 Subject: [Rxtx] pocketPC 2003 Message-ID: <39ed505d0608020928k6ceb01aen470c2e6a78c5a6b0@mail.gmail.com> Does anyone know if the Rxtx works on PocketPc 2003? If yes, could you, please, give me some suggestion. Thanks, Simone Bell? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/72e0fb87/attachment-0333.html From berkland at spamcop.net Wed Aug 2 13:00:10 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 15:00:10 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> Message-ID: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> How about these for the "Business Terms" of the new JSR: > The specification will be released in accordance with standard terms > as specified by the JCP process. > > The reference implementation (RI) will be delivered in binary form > free of charge from http://rxtx.org. Licensing details are expected to > be under the Binary Code License (BCL). > > The source for the reference implementation is expected to be > delivered via the Limited GNU Public License (LGPL) and available free > of charge. > > The TCK will be made available free of charge to all J2SE and J2EE licensees. > > The TCK will be offered for license at no charge, without support or > any trademark license rights, to qualified not-for-profit entities > (including not-for-profit) academic institutions) and qualified > individuals engaged in efforts to create compatible implementations of > the Specification. From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 13:13:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 13:13:33 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E495@hqexchange3.dot.state.co.us> Trent, I didn't exactly get it. Again I am not a C guy, maybe its very simple for you but I don't see any checks for FD (as written in the patch for termios.c) in the initialise_event_info_struct, I see some checks in the interruptEventLoop call. Second as you explained I open three("/dev/cuf01","/dev/cuf01","/dev/cuf01") ports, I close the 2nd ("/dev/cuf02", the other 2 are still open) , I never try to open the third ("/dev/cuf03") port again if it is already open. Are you planning to have a fix for this in the next release 2.1.8. Its very important for me to have a fix for this, its causing some major headaches for our project. I know you have your regular job too, I will appreciate any help. Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, August 01, 2006 6:46 PM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java > VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic > frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) C [librxtxSerial.so+0x69b2] > initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] > Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" > [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: > /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread > "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 > JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon > [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" > daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread > "AdapterThread" daemon [_thread_blocked, id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, > id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Wed Aug 2 13:14:20 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 16:14:20 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> Message-ID: <44D0F98C.1070600@gmail.com> +1 Agree > How about these for the "Business Terms" of the new JSR: > > >> The specification will be released in accordance with standard terms >> as specified by the JCP process. >> >> The reference implementation (RI) will be delivered in binary form >> free of charge from http://rxtx.org. Licensing details are expected to >> be under the Binary Code License (BCL). >> >> The source for the reference implementation is expected to be >> delivered via the Limited GNU Public License (LGPL) and available free >> of charge. >> >> The TCK will be made available free of charge to all J2SE and J2EE licensees. >> >> The TCK will be offered for license at no charge, without support or >> any trademark license rights, to qualified not-for-profit entities >> (including not-for-profit) academic institutions) and qualified >> individuals engaged in efforts to create compatible implementations of >> the Specification. >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From savagobr at yahoo.com Wed Aug 2 13:40:42 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:40:42 -0700 (PDT) Subject: [Rxtx] jsr spec and license issues Message-ID: <20060802194042.83599.qmail@web53807.mail.yahoo.com> Friends Apache seems ok... if I get it right, does it *almost* equals to BSD? Regarding public domain: I think that the good people that spent so much time on this library will like to keep some rights over its own work, don't you think? Best regards Savago --------------------------------- Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/79abdfd5/attachment-0333.html From savagobr at yahoo.com Wed Aug 2 13:58:04 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:58:04 -0700 (PDT) Subject: [Rxtx] JVM Crashing Message-ID: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago --------------------------------- Groups are talking. We´re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/47d561ae/attachment-0333.html From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 14:09:18 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 14:09:18 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E4AD@hqexchange3.dot.state.co.us> Thank You :) ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adenilson Cavalcanti Sent: Wednesday, August 02, 2006 1:58 PM To: rxtx at qbang.org Subject: Re: [Rxtx] JVM Crashing Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago ________________________________ Groups are talking. We?re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/b4eb22cf/attachment-0333.html From tjarvi at qbang.org Wed Aug 2 20:23:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 20:23:42 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > Hi Doug As mentioned off the list, the important point in my mind is that everyone is on the same base more than what license is decided upon. These things are just best addressed early so there isn't confusion. The Apache license is fairly standard in the Open Source community vs several of the relatively unknown [and obviously redundat even by their descriptions] offerings by Sun. Perhaps one option here that would kill a few birds with one stone is to dual license the interface as Apache and LGPL. This would allow everyone to use the interfaces without needing to do wastefull work for internal license requirements. Projects could choose between the two the license that best suits their needs. If there is a software shop doing Java that isn't familiar with the Apache license, they must be doing some strange Java. I do think it is foolhearty to blindly travel in public domain but nobody is trying to undermine the spec files. The intent is to use the work for a JSR submission that everyone can use without confusion later on down the line. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 21:01:16 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 20:01:16 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D166FC.9090005@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> Does this sound like a reasonable plan to everyone? >> > > Hi Doug > > As mentioned off the list, the important point in my mind is that everyone > is on the same base more than what license is decided upon. These things > are just best addressed early so there isn't confusion. > > The Apache license is fairly standard in the Open Source community vs > several of the relatively unknown [and obviously redundat even by > their descriptions] offerings by Sun. The JCP is a reasonable process for what the RxTx project intends to achieve by evolving the API. There isn't much to lose by going the JSR route. The community will benefit from a fair API like so many other that have undergone the process. Sun isn't going to own the API or manipulate it into anything weird anymore than anyone else is. I think your fears are rather vague and unfounded. Which isn't to say that I am a well-informed representative of the JCP, I've only sat through one JSR process and we ended up with javax.usb, and IBM got what it wanted out of the deal and the community got a very nice standard. Paul > > Perhaps one option here that would kill a few birds with one stone is to > dual license the interface as Apache and LGPL. This would allow everyone > to use the interfaces without needing to do wastefull work for internal > license requirements. Projects could choose between the two the license > that best suits their needs. If there is a software shop doing Java that > isn't familiar with the Apache license, they must be doing some strange > Java. > > I do think it is foolhearty to blindly travel in public domain but nobody > is trying to undermine the spec files. The intent is to use the work for > a JSR submission that everyone can use without confusion later on down the > line. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Aug 2 22:10:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 22:10:48 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D166FC.9090005@sun.com> References: <44D166FC.9090005@sun.com> Message-ID: On Wed, 2 Aug 2006, Paul Klissner wrote: > Trent Jarvi wrote: >> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> Does this sound like a reasonable plan to everyone? >>> >> >> Hi Doug >> >> As mentioned off the list, the important point in my mind is that everyone >> is on the same base more than what license is decided upon. These things >> are just best addressed early so there isn't confusion. >> >> The Apache license is fairly standard in the Open Source community vs >> several of the relatively unknown [and obviously redundat even by >> their descriptions] offerings by Sun. > > The JCP is a reasonable process for what the RxTx project intends > to achieve by evolving the API. > > There isn't much to lose by going the JSR route. The community will > benefit from a fair API like so many other that have undergone > the process. Sun isn't going to own the API or manipulate it > into anything weird anymore than anyone else is. I think your > fears are rather vague and unfounded. > > Which isn't to say that I am a well-informed representative > of the JCP, I've only sat through one JSR process and we ended > up with javax.usb, and IBM got what it wanted out of the deal > and the community got a very nice standard. > Hi Paul The JCP should work fine. As our intentions are in line, licensing so that everyone can use the interface code should not be a problem. Note that the current default right now is that the interfaces are copyrighted and no license for distribution is included. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 22:33:51 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 21:33:51 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D166FC.9090005@sun.com> Message-ID: <44D17CAF.1090802@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Paul Klissner wrote: > >> Trent Jarvi wrote: >>> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>> Does this sound like a reasonable plan to everyone? >>>> >>> Hi Doug >>> >>> As mentioned off the list, the important point in my mind is that everyone >>> is on the same base more than what license is decided upon. These things >>> are just best addressed early so there isn't confusion. >>> >>> The Apache license is fairly standard in the Open Source community vs >>> several of the relatively unknown [and obviously redundat even by >>> their descriptions] offerings by Sun. >> The JCP is a reasonable process for what the RxTx project intends >> to achieve by evolving the API. >> >> There isn't much to lose by going the JSR route. The community will >> benefit from a fair API like so many other that have undergone >> the process. Sun isn't going to own the API or manipulate it >> into anything weird anymore than anyone else is. I think your >> fears are rather vague and unfounded. >> >> Which isn't to say that I am a well-informed representative >> of the JCP, I've only sat through one JSR process and we ended >> up with javax.usb, and IBM got what it wanted out of the deal >> and the community got a very nice standard. >> > > Hi Paul > > The JCP should work fine. As our intentions are in line, licensing so > that everyone can use the interface code should not be a problem. Sorry, looks like my concerns were unfounded. I haven't been following the threads closely this week, as work got busy with an escalated issue and new project. Sorry about that. > > Note that the current default right now is that the interfaces are > copyrighted and no license for distribution is included. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Aug 3 03:45:56 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 03 Aug 2006 05:45:56 -0400 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: Hi All, I have been waiting a day for things to cool down. Licensing appears to be a hot-button topic. I have no objection to dual license the interfaces as both Apache and LGPL. Some thoughts: Goal: developers wish to work together on a common piece of code that the team needs. It makes sense that the code base they work on should be Apache-licensed. That makes it possible for the team to use and develop common code, even if the end result is LGPL'd as a whole. If we combine licenses, we must follow the terms of both licenses when distributing the combined work. Thus, the dual license contains the super set of terms in the licenses of Apached and LGPL. This should address concern about using Apache-licensed code within LGPL projects due to the FSF's claim that they are incompatible. Here is a draft statement for RXSL: The RXTX Specification Library (RXSL) uses a dual license strategy for the source code. These licenses are the GNU Lesser General Public License (LGPL) and the Apache License. I strongly encourage users to use the LGPL license and participate fully in the free software community. Dual licensing of the RXSL source code provides open and free access to the technology both for the GPL community and for other developers or companies that cannot use the GPL. Dual license is common practice in open source projects like OpenOffice, Perl and Mozilla. Through the combined use of LGPL and Apache license, developers will have a high degree of freedom yet compatibility and interoperability will be preserved. You can freely modify, extend, and improve the RXSL source code. The only question is whether or not you must provide the source code and contribute modifications to the community. The GNU and Apache licenses allow different ranges of flexibility in this regard, but in the end, regardless of the license used, any and all incompatible changes must be published openly. Note that there is the RXTX Reference Model that uses the org.rxtx package, which itself is protected by the LGPL. This may be part of the distribution, however, it can not be redistributed using a different license. Is everybody OK with this? Thanks Trent, great idea! - Doug From joachim at buechse.de Thu Aug 3 04:15:44 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 3 Aug 2006 12:15:44 +0200 Subject: [Rxtx] JVM Crashing In-Reply-To: <20060802195804.70935.qmail@web53812.mail.yahoo.com> References: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Message-ID: <6ABA2AB2-CECE-4C4B-A7D6-0CDF8B9C95A8@buechse.de> I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of > rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jvermillard at archean.fr Thu Aug 3 04:26:48 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Thu, 03 Aug 2006 12:26:48 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <1154600808.16732.18.camel@localhost.localdomain> Hi, I'm a developer of the Apache MINA framework. It's a network application framework which helps users develop high performance and high scalability network applications easily. http://directory.apache.org/subprojects/mina/index.html . I would like to integrate serial connection to the framework (actualy supporting TCP, UDP (broadcast) and in VM communications), but LGPL is an issue for me. An Apache License would be pretty usefull for me and integrate rxtx functionnalities easly. Thanks, Julien Le jeudi 03 ao?t 2006 ? 05:45 -0400, Dr. Douglas Lyon a ?crit : > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/755cca7f/smime-0333.bin From pascal at quies.net Thu Aug 3 04:32:35 2006 From: pascal at quies.net (Pascal S. de Kloe) Date: Thu, 3 Aug 2006 12:32:35 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <200608031232.35838.pascal@quies.net> Hi Doug, The Apache license is unnessesary complex. It puts all kinds of limitations on the usage. Is there a particular reason why people chose this or was it just the familiar name? I agree with Joachim (again) that the specification and the interfaces should be public domain. However, if we realy need a license then have a look at the X11 license because that one is compatible with the GPL and suits our needs: http://www.fsf.org/licensing/licenses/index_html http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3 ---- start: implementation Copyright (C) 2006 Sun Microsystems, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Sun Microsystems shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Sun Microsystems. Java is a trademark of Sun Microsystems, Inc. ---- end Op donderdag 3 augustus 2006 11:45, schreef Dr. Douglas Lyon: > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Aug 3 05:17:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 05:17:07 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154600808.16732.18.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: On Thu, 3 Aug 2006, Julien Vermillard wrote: > Hi, > > I'm a developer of the Apache MINA framework. It's a network application > framework which helps users develop high performance and high > scalability network applications easily. > http://directory.apache.org/subprojects/mina/index.html . I would like > to integrate serial connection to the framework (actualy supporting TCP, > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > An Apache License would be pretty usefull for me and integrate rxtx > functionnalities easly. > > Thanks, > > Julien > Hi Julien The rxtx license itself will not change. This is just the interface. You would be free to implement an rxtx replacement if the LGPL low level code is a problem for you. These licensing details would make it possible to take the interface code instead of needing to recode them for a new project. You are probably confusing the license problems with the GPL not the LGPL though you can share links to concerns off the list if you would like to go through them. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 11:59:48 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 11:59:48 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E516@hqexchange3.dot.state.co.us> Joachim, I think my both problems (JVM crashing & Port Locking) are being caused by the corruption of "Event Info Struct / EIS" I have noticed with in EIS my "FD" and "Closing" value being overwritten. The problem is definitely in SerialImp.c file. I am trying to understand what the code does and try to pin point the problem by trying few other options. I will keep everybody posted. Regards Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Joachim Buechse Sent: Thursday, August 03, 2006 4:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Thu Aug 3 13:50:07 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 14:50:07 -0500 Subject: [Rxtx] slow startup Message-ID: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete From brian at mbari.org Thu Aug 3 14:05:57 2006 From: brian at mbari.org (Brian Schlining) Date: Thu, 3 Aug 2006 13:05:57 -0700 Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> References: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Message-ID: Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B > Greetings, > I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/ > qbang.org). > > In testing things out, I ran the list ports example from the Wiki, > and it seems to take quite a while for the library to initialize? > Like on the order of 30+ seconds or so after startup (and the RXTX > banner prints), and before the application starts running. > > Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then > I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ > terminal server) and I'm wondering if they are not responding properly > and this is causing the slow startup? Or is this a known problem of > some kind, or maybe something on my system is screwy? > > Thanks, > Pete > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/6123f730/attachment-0332.html From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 14:13:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 14:13:47 -0600 Subject: [Rxtx] slow startup Message-ID: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Hi Pete, RXTX does open and close the ports in Windows. Try downloading utility like PORTMON(only for windows) and you can see that whenever you load RXTX it tries to register all the available COMM ports in the system. It is a little slow if you have virtual ports, we use digi as a terminal server, Its going to get worst of you have comm ports in 100's Thanks Pawan Kharbanda ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Brian Schlining Sent: Thursday, August 03, 2006 2:06 PM To: RXTX Developers and Users Subject: Re: [Rxtx] slow startup Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/94fd105d/attachment-0332.html From pete.flugstad at gmail.com Thu Aug 3 14:32:04 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 15:32:04 -0500 Subject: [Rxtx] slow startup In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Message-ID: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> On 8/3/06, Kharbanda, Pawan wrote: > RXTX does open and close the ports in Windows. Try downloading utility > like PORTMON(only for windows) and you can see that whenever you load RXTX > it tries to register all the available COMM ports in the system. It is a > little slow if you have virtual ports, we use digi as a terminal server, Its > going to get worst of you have comm ports in 100's Okay, I can understand that, but from the PORTMON output, it looks like it's opening each port TWICE: 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS ... 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS Also, assuming instead of listing the ports I wanted to just open one, I'm still seeing the 30 second delay, so it's scanning at startup regardless of what the Java code is going to do. Probably necessary, but annoying. I know, I know, contribute patches... :-) Thanks, Pete From tjarvi at qbang.org Thu Aug 3 15:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 15:04:42 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: On Thu, 3 Aug 2006, Pete Flugstad wrote: > On 8/3/06, Kharbanda, Pawan wrote: >> RXTX does open and close the ports in Windows. Try downloading utility >> like PORTMON(only for windows) and you can see that whenever you load RXTX >> it tries to register all the available COMM ports in the system. It is a >> little slow if you have virtual ports, we use digi as a terminal server, Its >> going to get worst of you have comm ports in 100's > > Okay, I can understand that, but from the PORTMON output, it looks > like it's opening each port TWICE: > > 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > ... > 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > > Also, assuming instead of listing the ports I wanted to just open one, > I'm still seeing the 30 second delay, so it's scanning at startup > regardless of what the Java code is going to do. Probably necessary, > but annoying. > > I know, I know, contribute patches... :-) > I think this problem is in RXTXCommDriver.java. I've just not tracked it down but it should be in the java code, not the native code so easy enough to track down. -- Trent Jarvi tjarvi at qbang.org From jvermillard at archean.fr Fri Aug 4 03:43:28 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:43:28 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: <1154684608.6181.4.camel@localhost.localdomain> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > Hi, > > > > I'm a developer of the Apache MINA framework. It's a network application > > framework which helps users develop high performance and high > > scalability network applications easily. > > http://directory.apache.org/subprojects/mina/index.html . I would like > > to integrate serial connection to the framework (actualy supporting TCP, > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > An Apache License would be pretty usefull for me and integrate rxtx > > functionnalities easly. > > > > Thanks, > > > > Julien > > > > Hi Julien > > The rxtx license itself will not change. This is just the interface. > You would be free to implement an rxtx replacement if the LGPL low level > code is a problem for you. These licensing details would make it possible > to take the interface code instead of needing to recode them for a new > project. > > You are probably confusing the license problems with the GPL not the LGPL > though you can share links to concerns off the list if you would like to > go through them. > > -- > Trent Jarvi > tjarvi at qbang.org Hi, I'm not a license expert but some guys at ASF said me you can't call LGPLed libs from java. some peoples interprete that as static linking and not dynamic linking (no idea why). So ASF/BSD licensied interface willl solve the license probleme. If you got some questions about the ASL and the way you can dual license LGPL/ASL you can ask it on legal-discuss at apache.org Julien -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/8d46c0aa/smime-0332.bin From jvermillard at archean.fr Fri Aug 4 03:51:30 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:51:30 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <1154685091.6181.6.camel@localhost.localdomain> erm from java -> from ASLed Java code Le vendredi 04 ao?t 2006 ? 11:43 +0200, Julien Vermillard a ?crit : > Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > Hi, > > I'm not a license expert but some guys at ASF said me you can't call > LGPLed libs from java. some peoples interprete that as static linking > and not dynamic linking (no idea why). So ASF/BSD licensied interface > willl solve the license probleme. > > If you got some questions about the ASL and the way you can dual license > LGPL/ASL you can ask it on legal-discuss at apache.org > > Julien > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dcc29d70/smime-0332.bin From guille at sms.nl Fri Aug 4 04:35:24 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Fri, 04 Aug 2006 12:35:24 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <7.0.1.0.0.20060804123322.036dc748@sms.nl> At 11:43 04/08/2006, Julien Vermillard wrote: >Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > >Hi, > >I'm not a license expert but some guys at ASF said me you can't call >LGPLed libs from java. some peoples interprete that as static linking >and not dynamic linking (no idea why). This interpretation is wrong. See the official position of the FSF regarding the LGPL and Java: http://www.gnu.org/licenses/lgpl-java.html http://www.fsf.org/licensing/licenses/lgpl-java.html Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From hambyiii at hotmail.com Fri Aug 4 04:52:47 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 10:52:47 +0000 Subject: [Rxtx] error getting InputStream Message-ID: Hi, I have written a program in Java for Windows xp using RXTX (which is why I am using this mailing list :). However, I am getting a problem. I am connecting to a serial port, like so: private CommPortIdentifier portID; private boolean openPort(String selectedPort) { boolean portFound = false; Enumeration portList; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portID.getName().equals(selectedPort)) { portFound = true; break; } } } return portFound; } and then I try and get the serial port input stream (leaving out the try and catch for the sake of space): SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); InputStream inputStream = serialPort.getInputStream(); but on the getInputStream() I get the following error message: Bad file descriptor in nativeavailable I cannot figure out where it is going wrong...anyone any ideas. A quick answer would be wonderful, as I am kinda under the hammer to get this fixed quickly Thanks in Advance Keith From tjarvi at qbang.org Fri Aug 4 05:13:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 05:13:19 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <7.0.1.0.0.20060804123322.036dc748@sms.nl> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> <7.0.1.0.0.20060804123322.036dc748@sms.nl> Message-ID: On Fri, 4 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 11:43 04/08/2006, Julien Vermillard wrote: >> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : >>> On Thu, 3 Aug 2006, Julien Vermillard wrote: >>> >>>> Hi, >>>> >>>> I'm a developer of the Apache MINA framework. It's a network application >>>> framework which helps users develop high performance and high >>>> scalability network applications easily. >>>> http://directory.apache.org/subprojects/mina/index.html . I would like >>>> to integrate serial connection to the framework (actualy supporting TCP, >>>> UDP (broadcast) and in VM communications), but LGPL is an issue for me. >>>> >>>> An Apache License would be pretty usefull for me and integrate rxtx >>>> functionnalities easly. >>>> >>>> Thanks, >>>> >>>> Julien >>>> >>> >>> Hi Julien >>> >>> The rxtx license itself will not change. This is just the interface. >>> You would be free to implement an rxtx replacement if the LGPL low level >>> code is a problem for you. These licensing details would make it possible >>> to take the interface code instead of needing to recode them for a new >>> project. >>> >>> You are probably confusing the license problems with the GPL not the LGPL >>> though you can share links to concerns off the list if you would like to >>> go through them. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >> >> Hi, >> >> I'm not a license expert but some guys at ASF said me you can't call >> LGPLed libs from java. some peoples interprete that as static linking >> and not dynamic linking (no idea why). > > This interpretation is wrong. See the official position of the FSF regarding > the LGPL and Java: > > http://www.gnu.org/licenses/lgpl-java.html > > http://www.fsf.org/licensing/licenses/lgpl-java.html > What I do with legal groups that go down that rat hole is give them a copy of the rxtx 2.0 license. Since the confused legal folks are going in a direction that does not represent the intent of the license or authors at that point and are confused about basic things in our industry that most consider facts, the discussions are very short. The rxtx 2.0 license just adds the following and has for 6 years or so. Not because the lawyers are right. They get confused about intent and even facts. The following is added to make confused lawyers that cant understand intent go far away and never come back. period. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. From hambyiii at hotmail.com Fri Aug 4 05:42:21 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 11:42:21 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Okay, I made a little mistake in my last message. The error is not occuring where I thought it was. Instead it is occuring when I do the following: byte[] readBuffer = new byte[128]; try { int numBytes = 0; try { Thread.sleep(500); } catch (InterruptedException e) {} while (inputStream.available() > 0) { numBytes = inputStream.read(readBuffer); } processReceivedData(readBuffer, numBytes); } catch (IOException e) { System.out.println(e.getMessage()); } So I guess the error is happening on the inputStream.read(readBuffer) again, any help is appreciated and again, thanks in advance Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 10:52:47 +0000 > >Hi, > >I have written a program in Java for Windows xp using RXTX (which is why I >am using this mailing list :). However, I am getting a problem. I am >connecting to a serial port, like so: > private CommPortIdentifier portID; > > private boolean openPort(String selectedPort) > { > boolean portFound = false; > Enumeration portList; > > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portID.getName().equals(selectedPort)) > { > portFound = true; > break; > } > } > } > > return portFound; > } > >and then I try and get the serial port input stream (leaving out the try >and >catch for the sake of space): > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >InputStream inputStream = serialPort.getInputStream(); > >but on the getInputStream() I get the following error message: > >Bad file descriptor in nativeavailable > >I cannot figure out where it is going wrong...anyone any ideas. A quick >answer would be wonderful, as I am kinda under the hammer to get this fixed >quickly > >Thanks in Advance >Keith > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From hambyiii at hotmail.com Fri Aug 4 07:08:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:08:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Hi, I know I am replying to myself a lot at the moment, but more information has come to light (These errors are actually happening on a client machine, on software that has worked for the past month, and only now has started to fail, which is why I am a little slow finding things out) The errors I have already written about are only symptoms of an orignal error. The original error occurs the first time I try to WRITE thte OutputStream: OutputStream oStream = serialPort.getOutputStream(); serialPort.notifyOnOutputEmpty(true); byte[] bs = encodeMessage(configString.toString()); oStream.write(bs); oStream.flush(); The error occurs on oStream.write(bs); and is: Input/output error in writeArray Now writeArray is native code, so I have no idea what is going on there. Any help would be appreciated Thanks Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 11:42:21 +0000 > >Okay, I made a little mistake in my last message. > >The error is not occuring where I thought it was. Instead it is occuring >when I do the following: > >byte[] readBuffer = new byte[128]; > >try { > > int numBytes = 0; > try { > Thread.sleep(500); > } > catch (InterruptedException e) > {} > > while (inputStream.available() > 0) > { > numBytes = inputStream.read(readBuffer); > } > > processReceivedData(readBuffer, numBytes); >} >catch (IOException e) >{ > System.out.println(e.getMessage()); >} > >So I guess the error is happening on the inputStream.read(readBuffer) > >again, any help is appreciated and again, thanks in advance >Keith > > >From: "Keith Thorne" > >Reply-To: RXTX Developers and Users > >To: rxtx at qbang.org > >Subject: [Rxtx] error getting InputStream > >Date: Fri, 04 Aug 2006 10:52:47 +0000 > > > >Hi, > > > >I have written a program in Java for Windows xp using RXTX (which is why >I > >am using this mailing list :). However, I am getting a problem. I am > >connecting to a serial port, like so: > > private CommPortIdentifier portID; > > > > private boolean openPort(String selectedPort) > > { > > boolean portFound = false; > > Enumeration portList; > > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > > while (portList.hasMoreElements()) > > { > > portID = (CommPortIdentifier) portList.nextElement(); > > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > > { > > if (portID.getName().equals(selectedPort)) > > { > > portFound = true; > > break; > > } > > } > > } > > > > return portFound; > > } > > > >and then I try and get the serial port input stream (leaving out the try > >and > >catch for the sake of space): > > > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); > >InputStream inputStream = serialPort.getInputStream(); > > > >but on the getInputStream() I get the following error message: > > > >Bad file descriptor in nativeavailable > > > >I cannot figure out where it is going wrong...anyone any ideas. A quick > >answer would be wonderful, as I am kinda under the hammer to get this >fixed > >quickly > > > >Thanks in Advance > >Keith > > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Aug 4 07:26:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: Hi Keith Can you tell us more about the physical serial port? Might it be 'vanishing?' On Fri, 4 Aug 2006, Keith Thorne wrote: > Hi, > > I know I am replying to myself a lot at the moment, but more information has > come to light (These errors are actually happening on a client machine, on > software that has worked for the past month, and only now has started to > fail, which is why I am a little slow finding things out) > > The errors I have already written about are only symptoms of an orignal > error. The original error occurs the first time I try to WRITE thte > OutputStream: > > OutputStream oStream = serialPort.getOutputStream(); > serialPort.notifyOnOutputEmpty(true); > > byte[] bs = encodeMessage(configString.toString()); > > oStream.write(bs); > oStream.flush(); > > The error occurs on oStream.write(bs); and is: > > Input/output error in writeArray > > Now writeArray is native code, so I have no idea what is going on there. Any > help would be appreciated > Thanks > Keith > > >> From: "Keith Thorne" >> Reply-To: RXTX Developers and Users >> To: rxtx at qbang.org >> Subject: Re: [Rxtx] error getting InputStream >> Date: Fri, 04 Aug 2006 11:42:21 +0000 >> >> Okay, I made a little mistake in my last message. >> >> The error is not occuring where I thought it was. Instead it is occuring >> when I do the following: >> >> byte[] readBuffer = new byte[128]; >> >> try { >> >> int numBytes = 0; >> try { >> Thread.sleep(500); >> } >> catch (InterruptedException e) >> {} >> >> while (inputStream.available() > 0) >> { >> numBytes = inputStream.read(readBuffer); >> } >> >> processReceivedData(readBuffer, numBytes); >> } >> catch (IOException e) >> { >> System.out.println(e.getMessage()); >> } >> >> So I guess the error is happening on the inputStream.read(readBuffer) >> >> again, any help is appreciated and again, thanks in advance >> Keith >> >>> From: "Keith Thorne" >>> Reply-To: RXTX Developers and Users >>> To: rxtx at qbang.org >>> Subject: [Rxtx] error getting InputStream >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 >>> >>> Hi, >>> >>> I have written a program in Java for Windows xp using RXTX (which is why >> I >>> am using this mailing list :). However, I am getting a problem. I am >>> connecting to a serial port, like so: >>> private CommPortIdentifier portID; >>> >>> private boolean openPort(String selectedPort) >>> { >>> boolean portFound = false; >>> Enumeration portList; >>> >>> portList = CommPortIdentifier.getPortIdentifiers(); >>> >>> while (portList.hasMoreElements()) >>> { >>> portID = (CommPortIdentifier) portList.nextElement(); >>> if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) >>> { >>> if (portID.getName().equals(selectedPort)) >>> { >>> portFound = true; >>> break; >>> } >>> } >>> } >>> >>> return portFound; >>> } >>> >>> and then I try and get the serial port input stream (leaving out the try >>> and >>> catch for the sake of space): >>> >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >>> InputStream inputStream = serialPort.getInputStream(); >>> >>> but on the getInputStream() I get the following error message: >>> >>> Bad file descriptor in nativeavailable >>> >>> I cannot figure out where it is going wrong...anyone any ideas. A quick >>> answer would be wonderful, as I am kinda under the hammer to get this >> fixed >>> quickly >>> >>> Thanks in Advance >>> Keith >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From hambyiii at hotmail.com Fri Aug 4 07:52:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:52:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more information >has > > come to light (These errors are actually happening on a client machine, >on > > software that has worked for the past month, and only now has started to > > fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an orignal > > error. The original error occurs the first time I try to WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); > >> } > >> catch (IOException e) > >> { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance > >> Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I am > >>> connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Fri Aug 4 08:21:07 2006 From: gergg at cox.net (Gregg Wonderly) Date: Fri, 04 Aug 2006 09:21:07 -0500 Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: <44D357D3.40303@cox.net> Keith Thorne wrote: > Okay, I made a little mistake in my last message. > > The error is not occuring where I thought it was. Instead it is occuring > when I do the following: > > byte[] readBuffer = new byte[128]; > > try { > > } > catch (IOException e) > { > System.out.println(e.getMessage()); > } > > So I guess the error is happening on the inputStream.read(readBuffer) This is one of the most frustrating things to see over and over. The exception tells you exactly which line the error is occuring on, if you will use it to see where. In Java, these days, every class should do the following. import java.util.logging.*; public class MyClass { Logger log = Logger.getLogger( getClass().getName() ); ...in some method... { String data = ...; // any extra data like addresses or // ports which might be wrong and // cause an exception. try { ... } catch( SomeException ex ) { log.log( Level.SEVERE, ex.toString()+": "+data, ex ); } } } By default, you will see all of the appropriate details of any exception logged at the WARNING or SEVERE level. You can read the javadocs about logging to get more information too. Once you do this, people can then turn up logging and get more information, or otherwise manage it with a logging configuration file or other tools such as JMX or my http://logman.dev.java.net project. Gregg Wonderly From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 09:15:24 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 09:15:24 -0600 Subject: [Rxtx] error getting InputStream Message-ID: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Keith, Please send the full stack trace of the exception, may be I can help you. On Trent's question regarding physical 'Serial Port', do you mean you have a USB(Connected to Client Machine) to 9 Pin Serial cable(Connected to H/W device)? Also please mention which java version you are using? Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Keith Thorne Sent: Friday, August 04, 2006 7:52 AM To: rxtx at qbang.org Subject: Re: [Rxtx] error getting InputStream The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more > > information >has > > come to light (These errors are actually happening on a client > > machine, >on > > software that has worked for the past month, and only now has > > started to fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an > > orignal error. The original error occurs the first time I try to > > WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); } catch (IOException > >> e) { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the > >> inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which > >>> is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I > >>> am connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out > >>> the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get > >>> this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 14:36:16 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 14:36:16 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Trent, As discussed over the phone yesterday, I am emailing you all the details of the bugs I have been experiencing. We do not use Serial Ports like most of the applications. Our application uses approx 80 -100 serial ports (attached thru Digi boxes) which are opened and closed every 20 sec to 1 minute depending upon the type of device. Some Serial ports are left opened all the time and receive event based serial calls while other devices uses polling (request and reply) to collect data. So the opening and closing of the Serial Ports is not really in a sequential order as you mentioned in our conversation yesterday. Also 2 same serial ports can never be opened at one time we have business locks to prevent that from happening. Our findings so far (of course with the help of RXTX user group): The real culprit is in the SerialImp.c file, somehow the other the Event Info Structure in the Linked List gets damaged and loses references to the original EIS structure. I believe both the problems are caused because of the corruption of EIS packet. I have noticed that the link list traversal of EIS in the following methods under SerialImp.c : 1)initialise_event_info_struct 2)finalize_event_info_struct 3)interruptEventLoop So culprit code might be in one of these methods. I am currently using JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and Fedora Core 5). I am also attaching a Test Class to replicate the problem. You need to modify the class and add your systems Serial ports into the code and execute. java TestOpenClosePort 100 It will open and close all the serial ports 100 times in there own thread. Please let me know, I will be available thru out this weekend and can help you as much as I can with testing. Regards Pawan Kharbanda CDOT-ITS 303-478-2991 (cell) 303-985-4350 (home) -------------- next part -------------- A non-text attachment was scrubbed... Name: TestOpenClosePort.java Type: application/octet-stream Size: 6139 bytes Desc: TestOpenClosePort.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dd3754d9/TestOpenClosePort-0331.obj From tjarvi at qbang.org Fri Aug 4 15:43:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 15:43:09 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: Thanks, I'll look at it tomorrow morning. I don't know when I'll find the solution but you may check email tomorrow afternoon to see if I think I found it. On Fri, 4 Aug 2006, Kharbanda, Pawan wrote: > Trent, > As discussed over the phone yesterday, I am emailing you all the > details of the bugs I have been experiencing. We do not use Serial Ports > like most of the applications. Our application uses approx 80 -100 > serial ports (attached thru Digi boxes) which are opened and closed > every 20 sec to 1 minute depending upon the type of device. Some Serial > ports are left opened all the time and receive event based serial calls > while other devices uses polling (request and reply) to collect data. So > the opening and closing of the Serial Ports is not really in a > sequential order as you mentioned in our conversation yesterday. Also 2 > same serial ports can never be opened at one time we have business locks > to prevent that from happening. > > Our findings so far (of course with the help of RXTX user group): > > The real culprit is in the SerialImp.c file, somehow the other the Event > Info Structure in the Linked List gets damaged and loses references to > the original EIS structure. I believe both the problems are caused > because of the corruption of EIS packet. I have noticed that the link > list traversal of EIS in the following methods under SerialImp.c : > > 1)initialise_event_info_struct > 2)finalize_event_info_struct > 3)interruptEventLoop > > So culprit code might be in one of these methods. I am currently using > JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and > Fedora Core 5). > > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > > Regards > Pawan Kharbanda > CDOT-ITS > 303-478-2991 (cell) > 303-985-4350 (home) > > > > > > > > > > From tjarvi at qbang.org Sat Aug 5 12:32:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:32:40 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:34:27 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:34:27 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> You need to run it few times. More the number of ports, more frequently you can reproduce. With just 2 ports it will be hard to reproduce frequently. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:33 PM To: Kharbanda, Pawan Cc: tjarvi at qbang.org; RXTX Developers and Users Subject: Re: Port Locking / JVM Crashing > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Aug 5 12:52:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:52:26 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> Message-ID: Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more frequently > you can reproduce. With just 2 ports it will be hard to reproduce > frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:57:49 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:57:49 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Trent, I have 5 ports of Digi and I can reproduce almost every time. Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX version -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:52 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more > frequently you can reproduce. With just 2 ports it will be hard to > reproduce frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need >> to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From tjarvi at qbang.org Sat Aug 5 13:06:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:06:07 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Message-ID: You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few thousand > iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:07:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:07:33 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E659@hqexchange3.dot.state.co.us> We use our own locks but I haven't turned off the RXTX locks. I am still using the RXTX locks that might be the difference. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:13:22 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:13:22 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Trent, How can you turn off the lock files? I can try using that. I never tried that, I thought you can't turn off the file locking. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From tjarvi at qbang.org Sat Aug 5 13:18:53 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:18:53 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Message-ID: Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java > -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except lockfiles > are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:31:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:31:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Trent, I am able to constantly replicate almost everytime even when I have locks disabled. Don't know the reason why you are not able to on your environment. Any suggestions??????? Cycle No (Thread ::: /dev/cuf04) ::::::: 7 Cycle No (Thread ::: /dev/cuf01) ::::::: 7 Cycle No (Thread ::: /dev/cuf02) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) Exiting Thread ::: /dev/cuf03 Cycle No (Thread ::: /dev/cuf03) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent Port /dev/cuf01 is Opened 0x01 Sent Port /dev/cub01 is Opened 0x01 Sent Port /dev/cuf01 is Closed Port /dev/cuf02 is Closed Port /dev/cuf03 is Closed Port /dev/cuf04 is Closed Port /dev/cub01 is Closed Exiting Thread ::: /dev/cuf03 Exiting Thread ::: /dev/cuf02 Cycle No (Thread ::: /dev/cuf03) ::::::: 8 Cycle No (Thread ::: /dev/cuf02) ::::::: 8 Exiting Thread ::: /dev/cuf04 Exiting Thread ::: /dev/cuf01 Cycle No (Thread ::: /dev/cuf01) ::::::: 8 Cycle No (Thread ::: /dev/cuf04) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened 0x01 Sent Port /dev/cuf01 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 # # An error report file with more information is saved as hs_err_pid21386.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:19 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) > 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux > java -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except > lockfiles are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code >>>> and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm >>> running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From tjarvi at qbang.org Sat Aug 5 14:14:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 14:14:49 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: I'd stick a couple $15 dual port serial boards in the machine to see if its kernel driver specific. I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more problematic. They do not get the same number of eyes looking for problems. You could try putting #undef TIOCSERGETLSR #undef TIOCGICOUNT in the very top of SerialImp.h or one or the other to flip bits of code off and on. The kernel here is 2.6.11.4-20a-smp from Suse. glibc is 2.3.4-23.4 from Suse the jre is 1.5.0_06-b05 from Sun. The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC ram. You should be able to reproduce what I'm seeing then go from there. I don't think I'm going to see this problem without having the same cornercase hardware you have. Maybe we can work that out off the list but I doubt I'm going to find it in rxtx at this point. I have seen problems in the past were kernel structs don't match user space struct and bad things happen but I was including a kernel struct to get functionality that had not made its way into user space at the time. The only thing I may be missing is that when I write 0x01 out the port, nothing comes back. That was not specified but you could easily disconnect anything connected to the ports to see if that changes anything. rxtx is far from bug free but I do not see anything yet. On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I am able to constantly replicate almost everytime even when I have > locks disabled. Don't know the reason why you are not able to on your > environment. Any suggestions??????? > > > Cycle No (Thread ::: /dev/cuf04) ::::::: 7 > Cycle No (Thread ::: /dev/cuf01) ::::::: 7 > Cycle No (Thread ::: /dev/cuf02) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > Exiting Thread ::: /dev/cuf03 > Cycle No (Thread ::: /dev/cuf03) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > Port /dev/cuf01 is Opened > 0x01 Sent > Port /dev/cub01 is Opened > 0x01 Sent > Port /dev/cuf01 is Closed > Port /dev/cuf02 is Closed > Port /dev/cuf03 is Closed > Port /dev/cuf04 is Closed > Port /dev/cub01 is Closed > Exiting Thread ::: /dev/cuf03 > Exiting Thread ::: /dev/cuf02 > Cycle No (Thread ::: /dev/cuf03) ::::::: 8 > Cycle No (Thread ::: /dev/cuf02) ::::::: 8 > Exiting Thread ::: /dev/cuf04 > Exiting Thread ::: /dev/cuf01 > Cycle No (Thread ::: /dev/cuf01) ::::::: 8 > Cycle No (Thread ::: /dev/cuf04) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > 0x01 Sent > Port /dev/cuf01 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 > # > # An error report file with more information is saved as > hs_err_pid21386.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > Aborted > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:19 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Lockfiles are a compile time option. I've turned them on now, corrected > a mistake resulting in only 3 ports being used and now have it going > through a few hundred iterations again without a crash. > > To disable lockfiles.. > > ./configure --disable-lockfiles && make install > > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > Port /dev/ttyS5 is Closed > Exiting Thread ::: /dev/ttyS1 > Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: > /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting > Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port > /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS1 is Closed > Port /dev/ttyS4 is Closed > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > > > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, How can you turn off the lock files? I can try using that. I >> never tried that, I thought you can't turn off the file locking. >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:06 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> You may try 4 ports instead of 5 to make sure thats not the issue. >> >> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >> 2.6.11.4-20a-smp >> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >> java -version java version "1.5.0_06" >> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >> >> I'm using rxtx 2.1-7 (final) with default configuration except >> lockfiles are disabled. I gathered that you are doing your own > resource locking. >> >> ... >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> ... >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>> version >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:52 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> Whats a few times? I've got 4 ports here and have run it a few >>> thousand iterations. >>> >>> Is that true for you if you run it with just four of your DIGI ports? >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> You need to run it few times. More the number of ports, more >>>> frequently you can reproduce. With just 2 ports it will be hard to >>>> reproduce frequently. >>>> >>>> ~pk >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:33 PM >>>> To: Kharbanda, Pawan >>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>> Subject: Re: Port Locking / JVM Crashing >>>> >>>>> I am also attaching a Test Class to replicate the problem. You need > >>>>> to >>>> >>>>> modify the class and add your systems Serial ports into the code >>>>> and >> >>>>> execute. >>>>> >>>>> java TestOpenClosePort 100 >>>>> >>>>> It will open and close all the serial ports 100 times in there own >>>>> thread. >>>>> >>>>> Please let me know, I will be available thru out this weekend and >>>>> can >>> >>>>> help you as much as I can with testing. >>>>> >>>> >>>> How reproducable is the problem with the above testcase? I'm >>>> running >> >>>> 100's of iterations without reproducing the problem. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> >>> >> > From rtlane01 at comcast.net Tue Aug 1 19:22:03 2006 From: rtlane01 at comcast.net (Randall T. Lane) Date: Tue, 01 Aug 2006 21:22:03 -0400 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] Message-ID: <44CFFE3B.90001@comcast.net> Rxtx Community: Please see my e-mail to Trent. Does anyone have any experience using rxtx to successfully communicate with hardware via USB? Thanks. Randy Lane -------------- next part -------------- An embedded message was scrubbed... From: Trent Jarvi Subject: Re: Help with RxTx for USB Communication Date: Tue, 1 Aug 2006 18:49:13 -0600 (MDT) Size: 3300 Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060801/9bbbc255/HelpwithRxTxforUSBCommunication-0329.mht From naranjo.manuel at gmail.com Sun Aug 6 16:59:28 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Sun, 06 Aug 2006 19:59:28 -0300 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44CFFE3B.90001@comcast.net> References: <44CFFE3B.90001@comcast.net> Message-ID: <44D67450.8010100@gmail.com> Randy: I have been able to communicate to AIRcable USB Bluetooth Dongle, with success. I'm not sure which are the options that you have to send to RXTX library, but you can indeed. Check that you do not have the port avaible for much long. I have heard of a problem with WinXP that it simply turn off virtual ports when they are too much long with out activity. If you want I can send you my code, because it is avaible under GPL, the new release is not avaible at AIRcable web site, but it should in short time. Regards, Manu > Rxtx Community: > > Please see my e-mail to Trent. Does anyone have any experience using > rxtx to successfully communicate with hardware via USB? > > Thanks. > > Randy Lane > > ------------------------------------------------------------------------ > > Asunto: > Re: Help with RxTx for USB Communication > De: > Trent Jarvi > Fecha: > Tue, 1 Aug 2006 18:49:13 -0600 (MDT) > Para: > "Randall T. Lane" > > Para: > "Randall T. Lane" > CC: > taj at www.linux.org.uk > > > On Tue, 1 Aug 2006, Randall T. Lane wrote: > >> Trent, >> >> I am working on a project written in Java (1.5) and need to >> communicate to an external device via a USB port. >> >> I have downloaded rxtx-2.1-7-bins-r2.zip from www.rxtx.org and setup >> a Java test project to learn how to use rxtx. I am able to list the >> serial ports available, however rxtx does not recognize my USB port. >> I am running on Windows XP. Here is some output from my test project >> ... >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> COM1 - Serial >> COM3 - Serial >> LPT1 - Parallel >> >> I would appreciate any help you could provide in getting rxtx to >> allow me to communicate via my USB port. >> >> Here is my code, if that would help. >> >> public static void main(String[] args) { >> listPorts(); >> // The listPorts() and getPortTypeName() methods are used for >> port identification. >> static void listPorts() >> { >> Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); >> while ( portEnum.hasMoreElements() ) >> { >> CommPortIdentifier portIdentifier = (CommPortIdentifier) >> portEnum.nextElement(); >> System.out.println(portIdentifier.getName() + " - " + >> getPortTypeName(portIdentifier.getPortType()) ); >> } } >> static String getPortTypeName ( int portType ) >> { >> switch ( portType ) >> { >> case CommPortIdentifier.PORT_I2C: >> return "I2C"; >> case CommPortIdentifier.PORT_PARALLEL: >> return "Parallel"; >> case CommPortIdentifier.PORT_RAW: >> return "Raw"; >> case CommPortIdentifier.PORT_RS485: >> return "RS485"; >> case CommPortIdentifier.PORT_SERIAL: >> return "Serial"; >> default: >> return "unknown type"; >> } >> } >> >> Thanks. >> >> Randy Lane >> > > Hi Randy > > The rxtx mail list is a better place to ask as there are more eyes. > I'm swamped with work. > > Be sure to look to see that your serial port dongle shows up as a > serial port in device manager and no other applications have it open. > USB serial dongles do work with rxtx. Some are less complete than > others. > > -- > Trent Jarvi > tjarvi at qbang.org > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From eddythejekyll at gmail.com Sun Aug 6 23:31:45 2006 From: eddythejekyll at gmail.com (Ed) Date: Sun, 6 Aug 2006 23:31:45 -0600 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? Message-ID: I have written a simple client server (RMI) application without using RxTx where the server controls a parallel port simply by addressing the port and banging the bits in order to drive a relay. It also reads the port's. I am doing this by making Runtime.exec calls to a binary that actually does the parallel port bit banging and reading. However, I'd like to use RxTx so it is a pure Java application, and I've so far installed and figured out how to discover the ports, but I'm having trouble finding good examples or some howto type documentation for this. I did find the two examples on the Wiki: one for serial IO and the other to discover the ports on a system. As I said, I have so far installed RxTx and gotten it to compile and run and I can identify the ports. When I run the server I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found Ports! Found port COM1 Found port COM3 Found port LPT1 LPT1 Not Currently owned EASSwitch Server starting. EASSwitch is bound. Server Ready. So it looks like thing are installed and working, but I feel all dressed up and no idea how to proceed. Basically, I just want to be able to toggle the data lines on the parallel port and read them. Very simple. No parallel printer type usage. Are there any examples I can work off of? If so, please advise. Thank you. -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060806/c7e39898/attachment-0329.html From hambyiii at hotmail.com Sun Aug 6 23:53:54 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Mon, 07 Aug 2006 05:53:54 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Message-ID: Hi, sorry I took the weekend to reply, but I was away for the last couple of days. Unfortunately I cannot send the full stack trace yet. The problem is not, unfortunately, happening on my computer, but on a clients computer, which I will go and visit today. I will hopefully be able to get a stack trace then. As to the physical connection, tt is indeed a USB from the computer, connected to a 9 pin serial device that connects to the hard-ware. My java version is 1.5.06 >From: "Kharbanda, Pawan" >Reply-To: RXTX Developers and Users >To: "RXTX Developers and Users" >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 09:15:24 -0600 > >Keith, > Please send the full stack trace of the exception, may be I can help >you. On Trent's question regarding physical 'Serial Port', do you mean >you have a USB(Connected to Client Machine) to 9 Pin Serial >cable(Connected to H/W device)? > >Also please mention which java version you are using? > >Thanks >Pawan Kharbanda > > >-----Original Message----- >From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >Of Keith Thorne >Sent: Friday, August 04, 2006 7:52 AM >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream > >The physical serial port is actually a USB connection that is then >changed to a "virtual serial port", so I can use the serial port >protocols to connect to it. The other end of the connection is a >hardware device that is constantly turned on. I am not sure about the >port 'vanishing'...we have another piece of software that came with the >hardware device, which we can test the device (and with it the virtual >serial port) with. This has no problem connecting to the serial port or >writing to/reading from the device. >It is only when my software is run, that the error occurs. Like I have >said, my software (using rxtx) is connecting to the serial port >successfully, but it is when I try and write to the serial port that I >get the error. > >Although to be truthful, I am not absolutely certain if the error is >happening on the oStream.write() or the oStream.flush(). I only think it >is the write(), because that is where the writeArray() function is >called. > >thanks >Keith > > > >From: Trent Jarvi > >Reply-To: RXTX Developers and Users > >To: RXTX Developers and Users > >Subject: Re: [Rxtx] error getting InputStream > >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > > > > >Hi Keith > > > >Can you tell us more about the physical serial port? Might it be > >'vanishing?' > > > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > > > Hi, > > > > > > I know I am replying to myself a lot at the moment, but more > > > information > >has > > > come to light (These errors are actually happening on a client > > > machine, > >on > > > software that has worked for the past month, and only now has > > > started to fail, which is why I am a little slow finding things out) > > > > > > The errors I have already written about are only symptoms of an > > > orignal error. The original error occurs the first time I try to > > > WRITE thte > > > OutputStream: > > > > > > OutputStream oStream = serialPort.getOutputStream(); > > > serialPort.notifyOnOutputEmpty(true); > > > > > > byte[] bs = encodeMessage(configString.toString()); > > > > > > oStream.write(bs); > > > oStream.flush(); > > > > > > The error occurs on oStream.write(bs); and is: > > > > > > Input/output error in writeArray > > > > > > Now writeArray is native code, so I have no idea what is going on >there. > >Any > > > help would be appreciated > > > Thanks > > > Keith > > > > > > > > >> From: "Keith Thorne" > > >> Reply-To: RXTX Developers and Users > > >> To: rxtx at qbang.org > > >> Subject: Re: [Rxtx] error getting InputStream > > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > > >> > > >> Okay, I made a little mistake in my last message. > > >> > > >> The error is not occuring where I thought it was. Instead it is > >occuring > > >> when I do the following: > > >> > > >> byte[] readBuffer = new byte[128]; > > >> > > >> try { > > >> > > >> int numBytes = 0; > > >> try { > > >> Thread.sleep(500); > > >> } > > >> catch (InterruptedException e) > > >> {} > > >> > > >> while (inputStream.available() > 0) > > >> { > > >> numBytes = inputStream.read(readBuffer); > > >> } > > >> > > >> processReceivedData(readBuffer, numBytes); } catch (IOException > > >> e) { > > >> System.out.println(e.getMessage()); > > >> } > > >> > > >> So I guess the error is happening on the > > >> inputStream.read(readBuffer) > > >> > > >> again, any help is appreciated and again, thanks in advance Keith > > >> > > >>> From: "Keith Thorne" > > >>> Reply-To: RXTX Developers and Users > > >>> To: rxtx at qbang.org > > >>> Subject: [Rxtx] error getting InputStream > > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > > >>> > > >>> Hi, > > >>> > > >>> I have written a program in Java for Windows xp using RXTX (which > > >>> is > >why > > >> I > > >>> am using this mailing list :). However, I am getting a problem. I > > >>> am connecting to a serial port, like so: > > >>> private CommPortIdentifier portID; > > >>> > > >>> private boolean openPort(String selectedPort) > > >>> { > > >>> boolean portFound = false; > > >>> Enumeration portList; > > >>> > > >>> portList = CommPortIdentifier.getPortIdentifiers(); > > >>> > > >>> while (portList.hasMoreElements()) > > >>> { > > >>> portID = (CommPortIdentifier) portList.nextElement(); > > >>> if (portID.getPortType() == > >CommPortIdentifier.PORT_SERIAL) > > >>> { > > >>> if (portID.getName().equals(selectedPort)) > > >>> { > > >>> portFound = true; > > >>> break; > > >>> } > > >>> } > > >>> } > > >>> > > >>> return portFound; > > >>> } > > >>> > > >>> and then I try and get the serial port input stream (leaving out > > >>> the > >try > > >>> and > > >>> catch for the sake of space): > > >>> > > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", > >2000); > > >>> InputStream inputStream = serialPort.getInputStream(); > > >>> > > >>> but on the getInputStream() I get the following error message: > > >>> > > >>> Bad file descriptor in nativeavailable > > >>> > > >>> I cannot figure out where it is going wrong...anyone any ideas. A > >quick > > >>> answer would be wonderful, as I am kinda under the hammer to get > > >>> this > > >> fixed > > >>> quickly > > >>> > > >>> Thanks in Advance > > >>> Keith > > >>> > > >>> > > >>> _______________________________________________ > > >>> Rxtx mailing list > > >>> Rxtx at qbang.org > > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > > >> > > >> > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Aug 7 06:22:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:22:03 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: Hmm.. I left the test running went I went home Saturday. It looks like something did show up after ~30k iterations. I'll look at it more in my free time. Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS5 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 29417 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 29417 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 29417 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00002aab14c2ec63, pid=20573, tid=1095125344 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6c63] initialise_event_info_struct+0x63 # [thread 1087756640 also had an error] Port /dev/ttyS5 is Opened 0x01 Sent [thread 1089861984 also had an error] Port /dev/ttyS4 is Opened 0x01 Sent [thread 1090914656 also had an error] # An error report file with more information is saved as [thread 1090914656 also had an error] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted On Sat, 5 Aug 2006, Trent Jarvi wrote: > > I'd stick a couple $15 dual port serial boards in the machine to see if its > kernel driver specific. > > I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more > problematic. They do not get the same number of eyes looking for problems. > > You could try putting > > #undef TIOCSERGETLSR > #undef TIOCGICOUNT > > in the very top of SerialImp.h or one or the other to flip bits of code off > and on. > > The kernel here is 2.6.11.4-20a-smp from Suse. > glibc is 2.3.4-23.4 from Suse > the jre is 1.5.0_06-b05 from Sun. > > The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC > ram. > > You should be able to reproduce what I'm seeing then go from there. I don't > think I'm going to see this problem without having the same cornercase > hardware you have. Maybe we can work that out off the list but I doubt I'm > going to find it in rxtx at this point. > > I have seen problems in the past were kernel structs don't match user space > struct and bad things happen but I was including a kernel struct to get > functionality that had not made its way into user space at the time. > > The only thing I may be missing is that when I write 0x01 out the port, > nothing comes back. That was not specified but you could easily disconnect > anything connected to the ports to see if that changes anything. > > rxtx is far from bug free but I do not see anything yet. > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, >> I am able to constantly replicate almost everytime even when I have >> locks disabled. Don't know the reason why you are not able to on your >> environment. Any suggestions??????? >> >> >> Cycle No (Thread ::: /dev/cuf04) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> Exiting Thread ::: /dev/cuf03 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> Port /dev/cuf01 is Opened >> 0x01 Sent >> Port /dev/cub01 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Closed >> Port /dev/cuf02 is Closed >> Port /dev/cuf03 is Closed >> Port /dev/cuf04 is Closed >> Port /dev/cub01 is Closed >> Exiting Thread ::: /dev/cuf03 >> Exiting Thread ::: /dev/cuf02 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 8 >> Exiting Thread ::: /dev/cuf04 >> Exiting Thread ::: /dev/cuf01 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf04) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 >> # >> # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 >> # >> # An error report file with more information is saved as >> hs_err_pid21386.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> Aborted >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:19 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Lockfiles are a compile time option. I've turned them on now, corrected >> a mistake resulting in only 3 ports being used and now have it going >> through a few hundred iterations again without a crash. >> >> To disable lockfiles.. >> >> ./configure --disable-lockfiles && make install >> >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> Port /dev/ttyS5 is Closed >> Exiting Thread ::: /dev/ttyS1 >> Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: >> /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting >> Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port >> /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> >> >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, How can you turn off the lock files? I can try using that. I >>> never tried that, I thought you can't turn off the file locking. >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 1:06 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> You may try 4 ports instead of 5 to make sure thats not the issue. >>> >>> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >>> 2.6.11.4-20a-smp >>> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >>> java -version java version "1.5.0_06" >>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >>> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >>> >>> I'm using rxtx 2.1-7 (final) with default configuration except >>> lockfiles are disabled. I gathered that you are doing your own >> resource locking. >>> >>> ... >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> Port /dev/ttyS4 is Closed >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> ... >>> >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>>> version >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:52 PM >>>> To: Kharbanda, Pawan >>>> Cc: Trent Jarvi; RXTX Developers and Users >>>> Subject: RE: Port Locking / JVM Crashing >>>> >>>> >>>> Whats a few times? I've got 4 ports here and have run it a few >>>> thousand iterations. >>>> >>>> Is that true for you if you run it with just four of your DIGI ports? >>>> >>>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>>> >>>>> You need to run it few times. More the number of ports, more >>>>> frequently you can reproduce. With just 2 ports it will be hard to >>>>> reproduce frequently. >>>>> >>>>> ~pk >>>>> >>>>> -----Original Message----- >>>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>>> Sent: Saturday, August 05, 2006 12:33 PM >>>>> To: Kharbanda, Pawan >>>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>>> Subject: Re: Port Locking / JVM Crashing >>>>> >>>>>> I am also attaching a Test Class to replicate the problem. You need >> >>>>>> to >>>>> >>>>>> modify the class and add your systems Serial ports into the code >>>>>> and >>> >>>>>> execute. >>>>>> >>>>>> java TestOpenClosePort 100 >>>>>> >>>>>> It will open and close all the serial ports 100 times in there own >>>>>> thread. >>>>>> >>>>>> Please let me know, I will be available thru out this weekend and >>>>>> can >>>> >>>>>> help you as much as I can with testing. >>>>>> >>>>> >>>>> How reproducable is the problem with the above testcase? I'm >>>>> running >>> >>>>> 100's of iterations without reproducing the problem. >>>>> >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> >>>> >>> >> > From iinjlv01 at gmail.com Mon Aug 7 06:22:07 2006 From: iinjlv01 at gmail.com (J LV) Date: Mon, 7 Aug 2006 14:22:07 +0200 Subject: [Rxtx] Data lost or Slow sampling Message-ID: Hello I am using RXTX to comm with a motion controller using Serial Port and i can write the commands using SerialPort or RXTXPort without problems, but when i try write and read at high sampling rate, for example to know the position and speed at every moment of a trajectory, i obtain a very irregular response times. I am using the most simple algorimth: 1-Write the command "is trajectory finished?" and wait for SerialPortEvent.DATA_AVAILABLE 2-Read the InputStreamReader of serial port while not empty 3-If trajectory finished then stop program, else, continue 4-Read actual time using System.currentTimeMillis() (t0) 5-Write the command "give me position" and wait for SerialPortEvent.DATA_AVAILABLE 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) 7-Read the InputStreamReader of serial port while not empty 8-Save position in Vector or ArrayList and repeat from 1 I don't know if the problem is the RXTX, my program or the motion controller hardware but i have response times from 16 millis to 78 millis at 19200 bauds!. I am using SwingWorked to threading SerialPort reading/writing process. Any idea or similar data leak problem? Thanks for RXTX project and sorry for my badde english! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/909a4cb3/attachment-0329.html From tjarvi at qbang.org Mon Aug 7 06:50:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:50:10 -0600 (MDT) Subject: [Rxtx] Data lost or Slow sampling In-Reply-To: References: Message-ID: On Mon, 7 Aug 2006, J LV wrote: > Hello > > I am using RXTX to comm with a motion controller using Serial Port and i can > write the commands using SerialPort or RXTXPort without problems, but when i > try write and read at high sampling rate, for example to know the position > and speed at every moment of a trajectory, i obtain a very irregular > response times. I am using the most simple algorimth: > 1-Write the command "is trajectory finished?" and wait for > SerialPortEvent.DATA_AVAILABLE > 2-Read the InputStreamReader of serial port while not empty > 3-If trajectory finished then stop program, else, continue > 4-Read actual time using System.currentTimeMillis() (t0) > 5-Write the command "give me position" and wait for > SerialPortEvent.DATA_AVAILABLE > 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) > 7-Read the InputStreamReader of serial port while not empty > 8-Save position in Vector or ArrayList and repeat from 1 > > > I don't know if the problem is the RXTX, my program or the motion controller > hardware but i have response times from 16 millis to 78 millis at 19200 > bauds!. I am using SwingWorked to threading SerialPort reading/writing > process. > > Any idea or similar data leak problem? > > Thanks for RXTX project and sorry for my badde english! > This can be platform dependant. What you may do for a starting point is use a loopback connection and time the same thing at 19200. Write the date, wait for data available, read the data. I would expect from write to data available to take around 10 ms from past experiences. You can experiment with turning on and off buffering in the port settings of the OS, if the OS supports more realtime like interrupts, that could help. You have a java schedual and the kernel schedual. Serial interrupts traditionally have very high priority but modern OSs tend to realize thats not good for GUIs, ... and delay responding to the interrupts. You should be able to have usec response times in a realtime OS. Windows and Linux are not typically setup as realtime OSs. For comparison, the last time I looked which was about 5 years ago, windows NT4 came back with data available in 8 ms and Linux came back in 10 ms. I would be interested in seeing what you get today. -- Trent Jarvi tjarvi at qbang.org From gergg at cox.net Mon Aug 7 09:21:56 2006 From: gergg at cox.net (Gregg Wonderly) Date: Mon, 07 Aug 2006 10:21:56 -0500 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? In-Reply-To: References: Message-ID: <44D75A94.9030205@cox.net> Ed wrote: > Are there any examples I can work off of? If so, please advise. Just read the javax.comm javadocs. You need to take the parallel port and write values to it based on which bits of which lines you want on and off. Gregg Wonderly From pete.flugstad at gmail.com Mon Aug 7 09:36:19 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 7 Aug 2006 10:36:19 -0500 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44D67450.8010100@gmail.com> References: <44CFFE3B.90001@comcast.net> <44D67450.8010100@gmail.com> Message-ID: <84d4a6d50608070836v97e9a29q96e98441ea903ac7@mail.gmail.com> FYI, I'm talking to a USB<->Serial dongle just fine under Windows XP Pro. I did have to install a driver for the thing - Windows XP by default, did not recognize it. Once installed, it just showed up as another COM port, and I've been pushing data over it with no problems. Pete From savagobr at yahoo.com Mon Aug 7 10:13:06 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Mon, 7 Aug 2006 09:13:06 -0700 (PDT) Subject: [Rxtx] Port Locking / JVM Crashing: 2 ports (Serial + usb) Message-ID: <20060807161306.9648.qmail@web53803.mail.yahoo.com> Trent This is curious, since I did reproduced the aformentioned bug using only 2 ports: /dev/ttyS0 and /dev/ttyUSB0. It only need to run for 500 times: $ java -cp . TestOpenClosePort 500 500 Port /dev/ttyS0 is Closed Excpetion ::: Thread ::: /dev/ttyUSB0null Exiting Thread ::: /dev/ttyUSB0 Cycle No (Thread ::: /dev/ttyUSB0) ::::::: 227 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 184 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x203d2044, pid=32368, tid=2986859424 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing) # Problematic frame: # C 0x203d2044 # # An error report file with more information is saved as /tmp/hs_err_pid32368.log # # If you would like to submit a bug report, please visit: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Best regards Savago ps: Test environment $ uname -a Linux localhost.localdomain 2.6.15-1.2054_FC5 #1 Tue Mar 14 15:48:33 EST 2006 i686 i686 i386 GNU/Linux $ java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) $gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.1 20060525 (Red Hat 4.1.1-1) --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/c6ca8094/attachment-0328.html From Pawan.Kharbanda at dot.state.co.us Mon Aug 7 17:23:25 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 7 Aug 2006 17:23:25 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Trent, I think I got the problem fixed after some code changes in the C (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the staging environment (with 10 devices) with real time data and haven't seen a JVM lock/ Port locking since last night. I am going to do further stress testing and will send all my code changes and my findings in next few days. I believe the problem was causing due to the digi drivers and how the Linux kernel talked to it, so after making some code changes and synchronization fixes, I got it to work. I am keeping my fingers crossed :) Thanks for all your help. You have been a great help. Will keep you posted. Cheers ~pk PS : We are going to test my new RXTX changes with the 2.6 Red Hat kernel (currently using 2.4.21-37.ELsmp) too. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 5:08 PM To: Kharbanda, Pawan Subject: RE: Port Locking / JVM Crashing Hi Pawan As mentioned I did reproduce the error but after several hours of cycles. I'm looking at RXTXPort.java and thinking about what may be happening. The error is in the C layer but it may be preventable in the java code. lets say two closes are overlapping or an operation is trying to happen while another port is closing. The structure may be out of sync by the time the code using the structure in another thread gets to the event info struct. So I'm wondering if synchronization in RXTXPort() and close() may help you. A second thing that may help is you can put printf("got here\n"); in each of the lines in initialize event info struct to verify that the problem is in walking the linked list. Thats my suspicion. So a properly timed close() while calling the constructor may be catching rxtx off guard. You can synchronize to test that and it may do away with the problem. From tjarvi at qbang.org Mon Aug 7 18:01:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 18:01:54 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Message-ID: Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do further > stress testing and will send all my code changes and my findings in next > few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to happen > while another port is closing. The structure may be out of sync by the > time the code using the structure in another thread gets to the event > info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may do > away with the problem. > From Pawan.Kharbanda at dot.state.co.us Tue Aug 8 13:49:14 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 8 Aug 2006 13:49:14 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Trent, I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and have absolutely no problem with JVM crashing or Port Locking even after 10000 operations (now I am trying 100,000 :). This is all with the original RXTX 2.1.7 (final) api's without any of my fixes that I have been trying for last 2-3 weeks. I will suggest that we update the INSTALL or Readme file accompnying the RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: 82000685_G 02/02/2006). This should helped everybody using the RXTX API's with RedHat Linux atleast. Regards Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 6:02 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do > further stress testing and will send all my code changes and my > findings in next few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers > crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to > happen while another port is closing. The structure may be out of > sync by the time the code using the structure in another thread gets > to the event info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may > do away with the problem. > From jimo at earthlink.net Wed Aug 9 21:21:00 2006 From: jimo at earthlink.net (Jim Owen) Date: Wed, 9 Aug 2006 20:21:00 -0700 Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat Message-ID: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Hi All, I've run into some difficulties with rxtx that have me baffled and need some help. I have an application that has used earlier versions of rxtx successfully and on a variety of platforms. We recently needed to deploy this application into an environment where we could not utilize lock files. I pulled down the 2.0.7 pre1 source distribution and executed configure with --disable-lockfiles. I then executed make and make install. When I execute the program, as root, I get the following error: ************************************************************************ Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) # Problematic frame: # C 0x00001004 # # An error report file with more information is saved as hs_err_pid20151.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # **************************************************************************** If I execute as a normal user, I get no errors, but no ports listed: (Using an earlier version, I get a serial and parallel port listed.) **************************************************************************** [jim at linuxDev ingenicoApp]$ java VerifyCommBuild Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Some ports appear to have been found, let's try to enumerate them. Complete. **************************************************************************** When I built rxtx, there was a warning given of the following: **************************************************************************** conftest.c: In function 'main': conftest.c:6: warning: incompatible implicit declaration of built-in function 'printf' conftest.c:7: warning: incompatible implicit declaration of built-in function 'exit' WARNING: Kernel include files do not match the current kernel **************************************************************************** uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux JAVA_HOME=/usr/java/j2sdk1.4.2_11 javax.comm.properties: Driver=gnu.io.RXTXCommDriver Here's the code for VerifyCommBuild.java that I'm using to test: **************************************************************************** import javax.comm.*; import java.util.Enumeration; /** * A quick app to check that the javax.comm (Serial) Communications extension has been properly * installed and configured on this machine. * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. */ public class VerifyCommBuild { public static void main(String args[]) { Enumeration ports; System.out.println("Verifying Comm Build Environment"); try { ports = CommPortIdentifier.getPortIdentifiers(); if (ports == null) { System.out.println("No comm ports found!"); return; } System.out.println("Some ports appear to have been found, let's try to enumerate them."); while (ports.hasMoreElements()) { System.out.println("Here is a port [" + ((CommPortIdentifier)ports.nextElement()).getName() + "]"); } } catch (Exception e) { System.out.println("Failed to enumerate ports [" + e.getMessage() + "]"); e.printStackTrace(); } System.out.println("Complete."); } } **************************************************************************** Any suggestions as to what I'm missing? Thanks, Jim Owen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060809/92503a81/attachment-0326.html From tjarvi at qbang.org Thu Aug 10 05:39:36 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 05:39:36 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Message-ID: On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even after > 10000 operations (now I am trying 100,000 :). This is all with the > original RXTX 2.1.7 (final) api's without any of my fixes that I have > been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying the > RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp > and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From oliver.archner at bayceer.uni-bayreuth.de Wed Aug 9 06:13:36 2006 From: oliver.archner at bayceer.uni-bayreuth.de (Oliver Archner) Date: Wed, 09 Aug 2006 14:13:36 +0200 Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() Message-ID: <44D9D170.5020806@bayceer.uni-bayreuth.de> Dear Users, i would like to send a byte to a parallel device. The following piece of code works well but throws an IOException in LPRPort$ParallelOutputStream.write() saying that everything is ok ?! Oliver import java.io.*; import gnu.io.*; public class Test { public static void main(String[] args) { RXTXCommDriver TxPort = new RXTXCommDriver(); ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", CommPortIdentifier.PORT_PARALLEL); OutputStream oStream = null; try { oStream = pPort.getOutputStream(); oStream.write((byte)0x51); } catch (IOException e) { e.printStackTrace(); } finally { try { if (oStream != null) oStream.close(); } catch (IOException e) { e.printStackTrace(); } } } } Output: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Der Vorgang wurde erfolgreich beendet. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at Test.main(Test.java:12) From tjarvi at qbang.org Thu Aug 10 18:12:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 18:12:27 -0600 (MDT) Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() In-Reply-To: <44D9D170.5020806@bayceer.uni-bayreuth.de> References: <44D9D170.5020806@bayceer.uni-bayreuth.de> Message-ID: On Wed, 9 Aug 2006, Oliver Archner wrote: > Dear Users, > > i would like to send a byte to a parallel device. > The following piece of code works well but throws an IOException in > LPRPort$ParallelOutputStream.write() saying that everything is ok ?! > > Oliver > > > import java.io.*; > import gnu.io.*; > > public class Test { > > public static void main(String[] args) { > RXTXCommDriver TxPort = new RXTXCommDriver(); > ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", > CommPortIdentifier.PORT_PARALLEL); > OutputStream oStream = null; > try { > oStream = pPort.getOutputStream(); > oStream.write((byte)0x51); > } catch (IOException e) { > e.printStackTrace(); > } finally { > try { > if (oStream != null) oStream.close(); > } catch (IOException e) { > e.printStackTrace(); > > } > } > > } > } > > Output: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Der Vorgang wurde erfolgreich beendet. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at Test.main(Test.java:12) WriteFile is returning a negative value or 0. I do not know what that exception is saying but it should be an IO Exception. The native code in question is line 405 in ParallelImp.c. If you find the documentation pointing out how the code is wrong, we can fix it. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 08:12:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 09:12:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question Message-ID: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Hello, I'm trying to send data over a serial port using the RXTX libraries. I've got the binaries for Windows XP from qbang.org. On the receiving side, I'm using event notification (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial Ports InputStream. Similarly on the transmist side, I use SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. First question: does this make sense? The code was largely adopted from an existing Windows C++ program and that's more or less how it operated (overlapped io using ReadFile, WriteFile, GetOverlappedResult, Events, etc). Second question: in a small standalone test program I wrote, everything seems to work just fine - whenever SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good chunk of data available (I explicitly set the in/out buffers to 1024 bytes) to read. However, when I pull my "library" into a much larger environment (OSGI framework based, but same JVM/OS/etc), whenever SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a byte or two available. Needless to say, this really kills performance. Everything appears to still operate properly, just really, really slowly. So, has anyone seen this problem before? I haven't dived into the details of RXTX library, and I'm wondering what the mechanism is here? How does the RXTX thread determine when to issue the SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to tweak in RXTX or the JVM to get this to operate more like the small test program? Seems like I want RXTX to call me back _less_ often. Thanks, Pete From tjarvi at qbang.org Fri Aug 11 09:55:23 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 09:55:23 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Hello, > > I'm trying to send data over a serial port using the RXTX > libraries. I've got the binaries for Windows XP from qbang.org. > > On the receiving side, I'm using event notification > (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial > Ports InputStream. Similarly on the transmist side, I use > SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. > > First question: does this make sense? The code was largely adopted > from an existing Windows C++ program and that's more or less how it > operated (overlapped io using ReadFile, WriteFile, > GetOverlappedResult, Events, etc). > > Second question: in a small standalone test program I wrote, > everything seems to work just fine - whenever > SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good > chunk of data available (I explicitly set the in/out buffers to 1024 > bytes) to read. > > However, when I pull my "library" into a much larger environment > (OSGI framework based, but same JVM/OS/etc), whenever > SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a > byte or two available. Needless to say, this really kills > performance. Everything appears to still operate properly, just > really, really slowly. > > So, has anyone seen this problem before? I haven't dived into the > details of RXTX library, and I'm wondering what the mechanism is here? > How does the RXTX thread determine when to issue the > SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to > tweak in RXTX or the JVM to get this to operate more like the small > test program? > Seems like I want RXTX to call me back _less_ often. > Hi Pete RXTX is doing overlapped IO in termios.c. In this file we map the windows functionality to termios (mostly POSIX). From there, we just talk termios to all platforms. What I guess is happening is the eventloop is waiting a specified amount of time. As you application uses more cpu cycles, you observe the difference in behavior. You could go into the C code and change this after looking at the eventLoop() code in serialImp.c and following that to the serial_ioctl() and serial_select() in termios.c Another option is to go into RXTXPort.java and put a sleep in the sendEvent() code. This way you would not have to recompile the native code (not very easy at this point). -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 13:27:36 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:27:36 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > Another option is to go into RXTXPort.java and put a sleep in the > sendEvent() code. This way you would not have to recompile the native > code (not very easy at this point). Are the instructions in the INSTALL file still valid? If so, it wasn't very hard to build it (I already had MinGW installed). Everything seemed to build just fine. Haven't tried to install/use it yet, but it wasn't a big deal (assuming those instructions were correct. Thanks, Pete From pete.flugstad at gmail.com Fri Aug 11 13:42:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:42:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, but there doesn't appear to be a way to select that via RXTX (which appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control is selected). Is there a way I'm not seeing? Thanks, Pete From eddythejekyll at gmail.com Fri Aug 11 15:20:44 2006 From: eddythejekyll at gmail.com (Ed) Date: Fri, 11 Aug 2006 15:20:44 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion Message-ID: I'm trying to read and write a parallel port on a standard (Dell) pc running RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. I'm having problems getting rxtx to return a port enumeration from getPortIdentifiers. I'm using a file PortChooser.java as a test file to get things going. This is from the Java CookBook 2nd edition (Chapter 12). The call // get list of ports available on this particular computer, // by calling static method in CommPortIdentifier. Enumeration pList = CommPortIdentifier.getPortIdentifiers(); returns a null pList; I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and compile without --disable-lockfiles I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ... When I compile with --disable-lockfiles the call to getPortIdentifiers simply returns a null Enumeration. I've read the documention and threads about this issue and I feel like I've tried everything, so at the moment I'm stumped. I can supply any further info that may help. Thanks in advance. Ed -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060811/80c4eeec/attachment-0324.html From tjarvi at qbang.org Fri Aug 11 18:29:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:29:48 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > On 8/11/06, Trent Jarvi wrote: >> Another option is to go into RXTXPort.java and put a sleep in the >> sendEvent() code. This way you would not have to recompile the native >> code (not very easy at this point). > > Are the instructions in the INSTALL file still valid? If so, it > wasn't very hard to build it > (I already had MinGW installed). Everything seemed to build just > fine. Haven't tried to install/use it yet, but it wasn't a big deal > (assuming those instructions were correct. > Hi Pete The instructions are correct. You will want to make sure that the exports worked. If the library does not work properly, then the exports failed. The exports are currently generated with nm, sed and grep in the Makefile which is often commented out. If the def file is old, it will cause problems. You should be good to go then. Look at the serial_select and eventLoop code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:33:32 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:33:32 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > but there doesn't appear to be a way to select that via RXTX (which > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > is selected). > > Is there a way I'm not seeing? > Hi Pete I'm guessing I didn't know the difference. At the time, I really didn't have windows API documentation. I just had some pages I found with altivista/google. Later microsoft made their documentation available on msdn or I learned about it. For rxtx, the calls need to be platform neutral. So if you see how to do each in termios, then we can get it going. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:45:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:45:24 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Fri, 11 Aug 2006, Ed wrote: > I'm trying to read and write a parallel port on a standard (Dell) pc running > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. > > I'm having problems getting rxtx to return a port enumeration from > getPortIdentifiers. I'm using a file > PortChooser.java as a test file to get things going. This is from the Java > CookBook 2nd edition (Chapter 12). The call > > // get list of ports available on this particular computer, > // by calling static method in CommPortIdentifier. > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > returns a null pList; > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and > compile without --disable-lockfiles I get: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > ... > > When I compile with --disable-lockfiles the call to getPortIdentifiers > simply returns a null Enumeration. > > I've read the documention and threads about this issue and I feel like I've > tried everything, so at the moment I'm stumped. > > I can supply any further info that may help. > > Thanks in advance. > > Ed > Hi Ed You may want to check the permissions of /dev/lp*. Also make sure lp or your kernel support for lp is loaded. It should show up in dmesg and lsmod. For my laptop with no printer port enabled in BIOS is see: lp: driver loaded but no devices found in desg |grep lp [] $ ls -l /dev/lp* crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 here root and group lp can read and write. Normal users cannot. Try a simple read as a user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: Permission denied Fix as root [] chmod 666 /dev/lp* [] $ ls -l /dev/lp* crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 Now as user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: No such device or address So this is saying there is no lp0 on my laptop. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:58:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:58:31 -0600 (MDT) Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat In-Reply-To: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> References: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Message-ID: On Wed, 9 Aug 2006, Jim Owen wrote: > Hi All, > > I've run into some difficulties with rxtx that have me baffled and need > some help. > > I have an application that has used earlier versions of rxtx > successfully and on a variety of platforms. We recently needed to deploy > this application into an environment where we could not utilize lock files. > > I pulled down the 2.0.7 pre1 source distribution and executed configure > with --disable-lockfiles. I then executed make and make install. > > When I execute the program, as root, I get the following error: > > ************************************************************************ > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) > # Problematic frame: > # C 0x00001004 > # > # An error report file with more information is saved as hs_err_pid20151.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > **************************************************************************** > > If I execute as a normal user, I get no errors, but no ports listed: > (Using an earlier version, I get a serial and parallel port listed.) > > **************************************************************************** > [jim at linuxDev ingenicoApp]$ java VerifyCommBuild > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Some ports appear to have been found, let's try to enumerate them. > Complete. > **************************************************************************** > > When I built rxtx, there was a warning given of the following: > > **************************************************************************** > conftest.c: In function 'main': > conftest.c:6: warning: incompatible implicit declaration of built-in > function 'printf' > conftest.c:7: warning: incompatible implicit declaration of built-in > function 'exit' > > WARNING: Kernel include files do not match the current kernel > **************************************************************************** > > > uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 > Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux > > JAVA_HOME=/usr/java/j2sdk1.4.2_11 > > javax.comm.properties: Driver=gnu.io.RXTXCommDriver > > Here's the code for VerifyCommBuild.java that I'm using to test: > > > **************************************************************************** > import javax.comm.*; > import java.util.Enumeration; > /** > * A quick app to check that the javax.comm (Serial) Communications > extension has been properly > * installed and configured on this machine. > * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. > */ > public class VerifyCommBuild > { > public static void main(String args[]) > { > Enumeration ports; > System.out.println("Verifying Comm Build Environment"); > try > { > ports = CommPortIdentifier.getPortIdentifiers(); > if (ports == null) > { > System.out.println("No comm ports found!"); > return; > } > System.out.println("Some ports appear to have been found, let's > try to enumerate them."); > while (ports.hasMoreElements()) > { > System.out.println("Here is a port [" + > ((CommPortIdentifier)ports.nextElement()).getName() > + "]"); > } > } catch (Exception e) > { > System.out.println("Failed to enumerate ports [" + > e.getMessage() + "]"); > e.printStackTrace(); > } > System.out.println("Complete."); > } > } > Hi Jim This is a new one to me. Have you tried it on another system. Maybe something isnt sane in your toolchain. -- Trent Jarvi tarvi at qbang.org From eddythejekyll at gmail.com Sat Aug 12 11:45:39 2006 From: eddythejekyll at gmail.com (Ed) Date: Sat, 12 Aug 2006 11:45:39 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Trent, Right after I sent the results indicated below I re-ran the app and it apparently found the parallel port. The difference was that I set the permissions to : /dev: wildcard lp* crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 I'm still not sure how to interpret the dmesg and lsmod before. However I'm thinking that since the user now has permission to access the lp* port, a request to access it loaded the lp and parport modules automatically and allowed me access. Here's the output of lsmod now: ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp lp 5540 0 (autoclean) parport 21608 1 (autoclean) [parport_pc lp] and dmesg: ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp On node 0 totalpages: 161776 lp0: using parport0 (polling). So I think I'm good, and ready to move on the next steps. Thanks Trent! Ed On 8/12/06, Ed wrote: > > Thanks for the reply Trent. > > I'm on a different system today but am trying your suggestons. This is a > debian 3.1r2 system and I'm running jdk 1.5.0_04. > > Take a look below, but I think I have no parallel port support on this > kernel, however I never get the "No such device or address" return from the > cat call as you did so I'm not sure how to interpret the results. > > When I run the test program (PortChooser.java), the getPortIdentifiers > call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is > more than I found on the RedHat system. Incidently --disable-lockfiles has > no effect. > > It looks as though there is no parallel support in this kernel: > falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > On node 0 totalpages: 161776 > falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > > I'm a little confused by the results when I cat to the lp0 device. It > seems from the dmesg output that I don't have parallel printer support, but > when I cat to the lp0 device, I get permission denied if I'm non-root user > and input/output error if I'm root. Apparently this means I have the device, > but no support in the kernel? > > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > ed at falcon:~/src/workspace/EASServer/src$ su > Password: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > > Here's my lp* device permissions. > /dev: > wildcard lp* > crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > If I change it to > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I get: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > falcon:/home/ed/src/workspace/EASServer/src# exit > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > cat: /dev/lp0: Input/output error > ed at falcon:~/src/workspace/EASServer/src$ > > What do you think? Should I recompile the kernel or is it something else? > > By the way, I added the user ed to the lp and uucp groups on this system. > > Thanks again, > > Ed > > On 8/11/06, Trent Jarvi wrote: > > > > On Fri, 11 Aug 2006, Ed wrote: > > > > > I'm trying to read and write a parallel port on a standard (Dell) pc > > running > > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > > gates. > > > > > > I'm having problems getting rxtx to return a port enumeration from > > > getPortIdentifiers. I'm using a file > > > PortChooser.java as a test file to get things going. This is from the > > Java > > > CookBook 2nd edition (Chapter 12). The call > > > > > > // get list of ports available on this particular computer, > > > // by calling static method in CommPortIdentifier. > > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > > > > > returns a null pList; > > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure > > and > > > compile without --disable-lockfiles I get: > > > > > > Stable Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7 > > > Java lib Version = RXTX-2.1-7 > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > ... > > > > > > When I compile with --disable-lockfiles the call to getPortIdentifiers > > > > > simply returns a null Enumeration. > > > > > > I've read the documention and threads about this issue and I feel like > > I've > > > tried everything, so at the moment I'm stumped. > > > > > > I can supply any further info that may help. > > > > > > Thanks in advance. > > > > > > Ed > > > > > > > Hi Ed > > > > You may want to check the permissions of /dev/lp*. Also make sure lp or > > your kernel support for lp is loaded. It should show up in dmesg and > > lsmod. > > > > For my laptop with no printer port enabled in BIOS is see: > > > > lp: driver loaded but no devices found > > > > in desg |grep lp > > > > [] $ ls -l /dev/lp* > > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > here root and group lp can read and write. Normal users cannot. > > > > Try a simple read as a user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > > > > Fix as root > > > > [] chmod 666 /dev/lp* > > [] $ ls -l /dev/lp* > > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > Now as user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: No such device or address > > > > So this is saying there is no lp0 on my laptop. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > > > -- > > Ed > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060812/c2afe1f8/attachment-0323.html From tjarvi at qbang.org Sat Aug 12 14:01:52 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 12 Aug 2006 14:01:52 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Remember that the lp code expects a printer - or something like it. There is a line that specifies the printer is online. If you are doing hobby work, you will need to raise that line or loop it back to something that is raised. If you just try reading a port with no device connected and online, there will be an error while trying to read. This should be addressed in the mail-list archives. On Sat, 12 Aug 2006, Ed wrote: > Trent, > Right after I sent the results indicated below I re-ran the app and it > apparently found the parallel port. The difference was that I set the > permissions to : > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I'm still not sure how to interpret the dmesg and lsmod before. However I'm > thinking that since the user now has permission to access the lp* port, a > request to access it loaded the lp and parport modules automatically and > allowed me access. Here's the output of lsmod now: > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > lp 5540 0 (autoclean) > parport 21608 1 (autoclean) [parport_pc lp] > > and dmesg: > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > On node 0 totalpages: 161776 > lp0: using parport0 (polling). > > So I think I'm good, and ready to move on the next steps. > > Thanks Trent! > > Ed > > > On 8/12/06, Ed wrote: >> >> Thanks for the reply Trent. >> >> I'm on a different system today but am trying your suggestons. This is a >> debian 3.1r2 system and I'm running jdk 1.5.0_04. >> >> Take a look below, but I think I have no parallel port support on this >> kernel, however I never get the "No such device or address" return from the >> cat call as you did so I'm not sure how to interpret the results. >> >> When I run the test program (PortChooser.java), the getPortIdentifiers >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is >> more than I found on the RedHat system. Incidently --disable-lockfiles has >> no effect. >> >> It looks as though there is no parallel support in this kernel: >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp >> On node 0 totalpages: 161776 >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp >> >> I'm a little confused by the results when I cat to the lp0 device. It >> seems from the dmesg output that I don't have parallel printer support, but >> when I cat to the lp0 device, I get permission denied if I'm non-root user >> and input/output error if I'm root. Apparently this means I have the >> device, >> but no support in the kernel? >> >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> >> cat: /dev/lp0: Permission denied >> ed at falcon:~/src/workspace/EASServer/src$ su >> Password: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> >> Here's my lp* device permissions. >> /dev: >> wildcard lp* >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> If I change it to >> /dev: >> wildcard lp* >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> I get: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> falcon:/home/ed/src/workspace/EASServer/src# exit >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> ed at falcon:~/src/workspace/EASServer/src$ >> >> What do you think? Should I recompile the kernel or is it something else? >> >> By the way, I added the user ed to the lp and uucp groups on this system. >> >> Thanks again, >> >> Ed >> >> On 8/11/06, Trent Jarvi wrote: >> > >> > On Fri, 11 Aug 2006, Ed wrote: >> > >> > > I'm trying to read and write a parallel port on a standard (Dell) pc >> > running >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the >> > gates. >> > > >> > > I'm having problems getting rxtx to return a port enumeration from >> > > getPortIdentifiers. I'm using a file >> > > PortChooser.java as a test file to get things going. This is from the >> > Java >> > > CookBook 2nd edition (Chapter 12). The call >> > > >> > > // get list of ports available on this particular computer, >> > > // by calling static method in CommPortIdentifier. >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); >> > > >> > > returns a null pList; >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure >> > and >> > > compile without --disable-lockfiles I get: >> > > >> > > Stable Library >> > > ========================================= >> > > Native lib Version = RXTX-2.1-7 >> > > Java lib Version = RXTX-2.1-7 >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > ... >> > > >> > > When I compile with --disable-lockfiles the call to getPortIdentifiers >> > >> > > simply returns a null Enumeration. >> > > >> > > I've read the documention and threads about this issue and I feel like >> > I've >> > > tried everything, so at the moment I'm stumped. >> > > >> > > I can supply any further info that may help. >> > > >> > > Thanks in advance. >> > > >> > > Ed >> > > >> > >> > Hi Ed >> > >> > You may want to check the permissions of /dev/lp*. Also make sure lp or >> > your kernel support for lp is loaded. It should show up in dmesg and >> > lsmod. >> > >> > For my laptop with no printer port enabled in BIOS is see: >> > >> > lp: driver loaded but no devices found >> > >> > in desg |grep lp >> > >> > [] $ ls -l /dev/lp* >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > here root and group lp can read and write. Normal users cannot. >> > >> > Try a simple read as a user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: Permission denied >> > >> > Fix as root >> > >> > [] chmod 666 /dev/lp* >> > [] $ ls -l /dev/lp* >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > Now as user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: No such device or address >> > >> > So this is saying there is no lp0 on my laptop. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > >> >> >> >> -- >> >> Ed >> > > > > From pete.flugstad at gmail.com Mon Aug 14 07:51:41 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 08:51:41 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: <84d4a6d50608140651h3cb2266ap90c47780abace00@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > On Fri, 11 Aug 2006, Pete Flugstad wrote: > > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > > but there doesn't appear to be a way to select that via RXTX (which > > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > > is selected). > > I'm guessing I didn't know the difference. At the time, I really didn't > have windows API documentation. I just had some pages I found with > altivista/google. Later microsoft made their documentation available on > msdn or I learned about it. > > For rxtx, the calls need to be platform neutral. So if you see how to do > each in termios, then we can get it going. so, RTSCTS_IN/OUT at the COMM API is mapped to HARDWARE_FLOW_CONTROL in the POSIX layer. Which termios.c maps to RTS_CONTROL_HANDSHAKE and fOutxCtsFlow = true. Since termios.c is Windows only anway... Would it work to change the mapping in termios.c to map hardware flow control to RTS_CONTROL_TOGGLE? I just wondering (I'm going to go look, but there's a lot of code in there) if the code does anything special playing with flow control signals? Thanks, Pete From pete.flugstad at gmail.com Mon Aug 14 09:42:48 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 10:42:48 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> On 8/3/06, Trent Jarvi wrote: > On Thu, 3 Aug 2006, Pete Flugstad wrote: > > Okay, I can understand that, but from the PORTMON output, it looks > > like it's opening each port TWICE: > > I think this problem is in RXTXCommDriver.java. I've just not tracked it > down but it should be in the java code, not the native code so easy > enough to track down. Okay, I'm trying to track this down... Looks like the CommPortIdentifier static initializer loads RXTXCommDriver, and then calls RXTXDriver.initialize. But then CommPortIdentifier.getPortIdentifiers does the exact same thing. So that's where the two scans are coming from. I would guess that one or the other can be removed? Probably the one in the CommPortIdentifier.getPortIdentifiers? Doing so removes the 2nd scan. Pete PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) val = System.getProperty("gnu.io.SerialPorts"); Shouldn't the comparison be != null? getProperty returns null if the variable is NOT found, and you only want to assign to val if it IS found, right? Same thing for the parallel port case. End result is the same I guess, since you check for null later, but probably should be fixed. From eddythejekyll at gmail.com Mon Aug 14 11:55:17 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 11:55:17 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: When I try to get the mode with int mode = pPort.getMode(); it returns 0 which isn't any of the valid modes. I tried setting it explicitely with pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced the requested mode in nativeSetSerialPortParams at gnu.io.LPRPort.setLPRMode(Native Method) at gnu.io.LPRPort.setMode(LPRPort.java:87) Except for LPT_MODE_ANY, but the getMode call still failed out with an invalid state. I'm wondering if it's because I don't have the line pulled high like you said. This isn't a printer connected. It's a relay board with pins 2-9 tied to data, and 18-25 to gnd. The rest are open. I looked at a DB25 pinout diagram and I'm not sure which pin I need to tie high, and I looked through the archives, but didn't find a reference to something definitive. Can someone help me with which pin is the "online" pin as Trent mentioned? DB25 spec has ( I hope this formats correctly in this email) BUSY (11), SEL (13) or INIT (16) are candidates, but I'm guessing. Any clues? *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Thanks, Ed On 8/12/06, Trent Jarvi wrote: > > > Remember that the lp code expects a printer - or something like it. There > is a line that specifies the printer is online. If you are doing hobby > work, you will need to raise that line or loop it back to something that > is raised. > > If you just try reading a port with no device connected and online, there > will be an error while trying to read. This should be addressed in the > mail-list archives. > > On Sat, 12 Aug 2006, Ed wrote: > > > Trent, > > Right after I sent the results indicated below I re-ran the app and it > > apparently found the parallel port. The difference was that I set the > > permissions to : > > /dev: > > wildcard lp* > > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > > > I'm still not sure how to interpret the dmesg and lsmod before. However > I'm > > thinking that since the user now has permission to access the lp* port, > a > > request to access it loaded the lp and parport modules automatically and > > allowed me access. Here's the output of lsmod now: > > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > > lp 5540 0 (autoclean) > > parport 21608 1 (autoclean) [parport_pc lp] > > > > and dmesg: > > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > > On node 0 totalpages: 161776 > > lp0: using parport0 (polling). > > > > So I think I'm good, and ready to move on the next steps. > > > > Thanks Trent! > > > > Ed > > > > > > On 8/12/06, Ed wrote: > >> > >> Thanks for the reply Trent. > >> > >> I'm on a different system today but am trying your suggestons. This is > a > >> debian 3.1r2 system and I'm running jdk 1.5.0_04. > >> > >> Take a look below, but I think I have no parallel port support on this > >> kernel, however I never get the "No such device or address" return from > the > >> cat call as you did so I'm not sure how to interpret the results. > >> > >> When I run the test program (PortChooser.java), the getPortIdentifiers > >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this > is > >> more than I found on the RedHat system. Incidently --disable-lockfiles > has > >> no effect. > >> > >> It looks as though there is no parallel support in this kernel: > >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > >> On node 0 totalpages: 161776 > >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > >> > >> I'm a little confused by the results when I cat to the lp0 device. It > >> seems from the dmesg output that I don't have parallel printer support, > but > >> when I cat to the lp0 device, I get permission denied if I'm non-root > user > >> and input/output error if I'm root. Apparently this means I have the > >> device, > >> but no support in the kernel? > >> > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> > >> cat: /dev/lp0: Permission denied > >> ed at falcon:~/src/workspace/EASServer/src$ su > >> Password: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> > >> Here's my lp* device permissions. > >> /dev: > >> wildcard lp* > >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> If I change it to > >> /dev: > >> wildcard lp* > >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> I get: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> falcon:/home/ed/src/workspace/EASServer/src# exit > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> ed at falcon:~/src/workspace/EASServer/src$ > >> > >> What do you think? Should I recompile the kernel or is it something > else? > >> > >> By the way, I added the user ed to the lp and uucp groups on this > system. > >> > >> Thanks again, > >> > >> Ed > >> > >> On 8/11/06, Trent Jarvi wrote: > >> > > >> > On Fri, 11 Aug 2006, Ed wrote: > >> > > >> > > I'm trying to read and write a parallel port on a standard (Dell) > pc > >> > running > >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > >> > gates. > >> > > > >> > > I'm having problems getting rxtx to return a port enumeration from > >> > > getPortIdentifiers. I'm using a file > >> > > PortChooser.java as a test file to get things going. This is from > the > >> > Java > >> > > CookBook 2nd edition (Chapter 12). The call > >> > > > >> > > // get list of ports available on this particular computer, > >> > > // by calling static method in CommPortIdentifier. > >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > >> > > > >> > > returns a null pList; > >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I > configure > >> > and > >> > > compile without --disable-lockfiles I get: > >> > > > >> > > Stable Library > >> > > ========================================= > >> > > Native lib Version = RXTX-2.1-7 > >> > > Java lib Version = RXTX-2.1-7 > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > ... > >> > > > >> > > When I compile with --disable-lockfiles the call to > getPortIdentifiers > >> > > >> > > simply returns a null Enumeration. > >> > > > >> > > I've read the documention and threads about this issue and I feel > like > >> > I've > >> > > tried everything, so at the moment I'm stumped. > >> > > > >> > > I can supply any further info that may help. > >> > > > >> > > Thanks in advance. > >> > > > >> > > Ed > >> > > > >> > > >> > Hi Ed > >> > > >> > You may want to check the permissions of /dev/lp*. Also make sure lp > or > >> > your kernel support for lp is loaded. It should show up in dmesg and > >> > lsmod. > >> > > >> > For my laptop with no printer port enabled in BIOS is see: > >> > > >> > lp: driver loaded but no devices found > >> > > >> > in desg |grep lp > >> > > >> > [] $ ls -l /dev/lp* > >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > here root and group lp can read and write. Normal users cannot. > >> > > >> > Try a simple read as a user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: Permission denied > >> > > >> > Fix as root > >> > > >> > [] chmod 666 /dev/lp* > >> > [] $ ls -l /dev/lp* > >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > Now as user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: No such device or address > >> > > >> > So this is saying there is no lp0 on my laptop. > >> > > >> > -- > >> > Trent Jarvi > >> > tjarvi at qbang.org > >> > > >> > >> > >> > >> -- > >> > >> Ed > >> > > > > > > > > > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/59164078/attachment-0321.html From eddythejekyll at gmail.com Mon Aug 14 14:19:58 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 14:19:58 -0600 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? Message-ID: I'm using the ParallelPort class to drive a relay board. According to Mr. Jarvi, since this board isn't a printer, there will be a read error unless I hold the "printer online" line high in order to make the API think I'm talking to a printer. The problem is, I can't figure out which line is the "printer online". My DB25 spec lists the following: *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Anyone know which one I should tie high? I tried the busy line and it still errored out on the read. Thanks in advance, -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/66cf3c3e/attachment-0321.html From tjarvi at qbang.org Mon Aug 14 18:06:29 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:06:29 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Mon, 14 Aug 2006, Ed wrote: > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > which isn't any of the valid modes. I tried setting it explicitely with > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced > the requested mode in nativeSetSerialPortParams > at gnu.io.LPRPort.setLPRMode(Native Method) > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > invalid state. This is because rxtx only supports the basics. JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } One could program in more support. When I did that I just had a daisy wheel printer to test with and doing any more would have been blind. So that behavior is expected. I'll look to see if the Parallel Complete book mentions which pins you need to raise. If you look in the source code [ParallelImp.c] you can see this code isn't well tested. It has worked for hobby use in the past as I'd guess you are trying to do. But my experience with the code is as is mentioned in the top of the source: /* fear he who enter here. It appears that things have changed. An attempt has been made to put things the way the should be. It compiles and ParallelBlackBox runs. No further guarantees. Well... One.. it will print "Hello World!" on an epson DX 10 printer. you know.. the 10 character per second daisy wheel printer ;) - Trent Jarvi */ That comment is from 1997 or so. Since then some windows support was contributed but it is still very green code. We get about four requests for parallel support a year so its just not a well traveled area. It would be nice to have some documentation for the people trying to hook parallel ports to electronic projects. That appears to be the exclusive use of the Parallel support. The wiki pages are intended to let people share information like this to help each other in their projects as they figure out the details. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Aug 14 18:40:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:40:40 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: > PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): > > if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) > val = System.getProperty("gnu.io.SerialPorts"); > > Shouldn't the comparison be != null? getProperty returns null if the > variable is NOT found, and you only want to assign to val if it IS > found, right? Same thing for the > parallel port case. End result is the same I guess, since you check > for null later, > but probably should be fixed. I think this is just a fallback to the second property. gnu.io.SerialPorts isn't documented but perhaps it is used. It should behave properly as documented in INSTALL. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 14 18:56:55 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 19:56:55 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: <44E11BD7.5030102@gmail.com> Trent Jarvi wrote: >> PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): >> >> if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) >> val = System.getProperty("gnu.io.SerialPorts"); >> > > I think this is just a fallback to the second property. > gnu.io.SerialPorts isn't documented but perhaps it is used. It should > behave properly as documented in INSTALL. Doh - yup, I missed the fact that the property names were different... Pete From berkland at spamcop.net Mon Aug 14 19:58:21 2006 From: berkland at spamcop.net (Doug Berkland) Date: Mon, 14 Aug 2006 21:58:21 -0400 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? In-Reply-To: References: Message-ID: <269e40090608141858g698c2579v8d962deca3f4df53@mail.gmail.com> Based on memory and this page as confirmation, I would say pin 13 is the "Online" pin for SPP (standard parallel port). http://www.quatech.com/support/comm-over-parallel.php On 8/14/06, Ed wrote: > > I'm using the ParallelPort class to drive a relay board. According to Mr. > Jarvi, since this board isn't a printer, there will be a read error unless I > hold the "printer online" line high in order to make the API think I'm > talking to a printer. The problem is, I can't figure out which line is the > "printer online". My DB25 spec lists the following: > > *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and > Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data > Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 > D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select > 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select > In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit > 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 > Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and > Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground > > Anyone know which one I should tie high? I tried the busy line and it > still errored out on the read. > > Thanks in advance, > > -- > Ed > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/842bb770/attachment-0321.html From eddythejekyll at gmail.com Mon Aug 14 20:25:42 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 20:25:42 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Ah, I see. I've seen the caveats about limited Parallel support, but I thought it was mainly about the javax.comm package. The gnu.io is derived from javax.comm package right? That is, is the parallel support in rxtx is a superset of what's in javax.comm? I'm using this not for hobby usage, but for some simple instrumenation and control. If the project mandates it, I'll gladly work on extending the support. In the meantime, I need to get some sanity checks working, and repair my relay board (I smoked the ULN2803 chip, apparently by tying the BUSY (pin 11) to vcc). I guess I'll try the SEL pin next (and a supply of 2803s) with a ~1K pullup. The caveat in the comment block isn't very encouraging (!), but I borrowed an old Epson Stylus Color 600 printer to see what I can do. If I can write out characters to it I'll be happy. Parallel printers aren't easy to find these days. I haven't yet looked at the native source, yet, but I've just imported it into eclipse and I'll surf around a bit. Ed On 8/14/06, Trent Jarvi wrote: > > On Mon, 14 Aug 2006, Ed wrote: > > > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > > which isn't any of the valid modes. I tried setting it explicitely with > > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to > proced > > the requested mode in nativeSetSerialPortParams > > at gnu.io.LPRPort.setLPRMode(Native Method) > > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > > invalid state. > > This is because rxtx only supports the basics. > > JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > jclass jclazz, jint mode) > { > switch(mode) > { > case LPT_MODE_ANY: > break; > case LPT_MODE_SPP: > case LPT_MODE_PS2: > case LPT_MODE_EPP: > case LPT_MODE_ECP: > case LPT_MODE_NIBBLE: > default: > throw_java_exception( env, > UNSUPPORTED_COMM_OPERATION, > "nativeSetSerialPortParams", > "setLPRMode was unable to proced the > requested \ > mode" > ); > } > return(JNI_TRUE); > } > > One could program in more support. When I did that I just had a daisy > wheel printer to test with and doing any more would have been blind. > > So that behavior is expected. I'll look to see if the Parallel Complete > book mentions which pins you need to raise. If you look in the source > code [ParallelImp.c] you can see this code isn't well tested. It has > worked for hobby use in the past as I'd guess you are trying to do. But > my experience with the code is as is mentioned in the top of the source: > > /* > fear he who enter here. It appears that things have changed. An > attempt > has been made to put things the way the should be. > > It compiles and ParallelBlackBox runs. No further guarantees. > > Well... One.. it will print "Hello World!" on an epson DX 10 > printer. > you know.. the 10 character per second daisy wheel printer ;) > > - Trent Jarvi > */ > > That comment is from 1997 or so. > > Since then some windows support was contributed but it is still very green > code. We get about four requests for parallel support a year so its just > not a well traveled area. > > It would be nice to have some documentation for the people trying to hook > parallel ports to electronic projects. That appears to be the exclusive > use of the Parallel support. The wiki pages are intended to let people > share information like this to help each other in their projects as they > figure out the details. > > -- > Trent Jarvi > tjarvi at qbang.org > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/fbb5ddb4/attachment-0321.html From lyon at docjava.com Tue Aug 15 06:06:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 15 Aug 2006 08:06:27 -0400 Subject: [Rxtx] smoking is bad for your health In-Reply-To: References: Message-ID: Hi All, If you are connecting to the parallel port and smoking chips, it is time for extra stuff to buffer the parallel port. You may be want more current, in which case driver transistors are needed, or, if you are using the port as an output only device, you may like to add your own bus transceiver (e.g., 74245), set for output. Do be careful to design this properly; http://www.beyondlogic.org/spp/parallel.htm Some people like to use Octal D-type F.F's with OC outputs, like a 74374, http://upgrade.cntc.ac.kr/data/ttl/74374.html I like this one, as it has the D FF's and can latch the outputs for presentation to slower electronics (like relays). But careful! A relay that needs more current than the family of the device you have selected will look like a short to ground, and you will smoke your bug! And MOBO's do NOT come with the ability to drive any load you like. Check the power specs on your relay and be sure to protect the chip against back EMF with a diode. It is best to smoke test this on a bread board BEFORE hooking it to the computer. And be sure you smoke test the corner points in the ckt for a while, lest it fail in the field. - Doug >Ah, I see. I've seen the caveats about limited >Parallel support, but I thought it was mainly >about the javax.comm package. The >gnu.io is derived from javax.comm >package right? That is, is the parallel support >in rxtx is a superset of what's in javax.comm? > >I'm using this not for hobby usage, but for some >simple instrumenation and control. If the >project mandates it, I'll gladly work on >extending the support. In the meantime, I need >to get some sanity checks working, and repair my >relay board (I smoked the ULN2803 chip, >apparently by tying the BUSY (pin 11) to vcc). I >guess I'll try the SEL pin next (and a supply of >2803s) with a ~1K pullup. > >The caveat in the comment block isn't very >encouraging (!), ?but?I borrowed an old Epson >Stylus Color 600 printer to see what I can do. >?If I can write out characters to it I'll be >happy. Parallel printers aren't easy to find >these days. > > I haven't yet looked at the native source, yet, >but I've just imported it into eclipse and I'll >surf around a bit. > >Ed > >On 8/14/06, Trent Jarvi <tjarvi at qbang.org> wrote: > >On Mon, 14 Aug 2006, Ed wrote: > >> When I try to get the mode with int mode = pPort.getMode(); it returns 0 >> which isn't any of the valid modes. I tried setting it explicitely with >> pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with >> >> gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced >> the requested mode in nativeSetSerialPortParams >> at gnu.io.LPRPort.setLPRMode(Native Method) >> at gnu.io.LPRPort.setMode(LPRPort.java:87) >> >> Except for LPT_MODE_ANY, but the getMode call still failed out with an >> invalid state. > >This is because rxtx only supports the basics. > >JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > ???????jclass jclazz, jint mode) >{ > ???????switch(mode) > ???????{ > ???????????????case LPT_MODE_ANY: > ???????????????????????break; > ???????????????case LPT_MODE_SPP: > ???????????????case LPT_MODE_PS2: > ???????????????case LPT_MODE_EPP: > ???????????????case LPT_MODE_ECP: > ???????????????case LPT_MODE_NIBBLE: > ???????????????default: > ???????????????????????throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, > ???????????????????????????????"nativeSetSerialPortParams", > ???????????????????????????????"setLPRMode was >unable to proced the requested \ > ???????????????????????????????mode" > ???????????????????????); > ???????} > ???????return(JNI_TRUE); >} > >One could program in more support.??When I did that I just had a daisy >wheel printer to test with and doing any more would have been blind. > >So that behavior is expected.??I'll look to see if the Parallel Complete >book mentions which pins you need to raise.??If you look in the source >code [ParallelImp.c] you can see this code isn't well tested.??It has >worked for hobby use in the past as I'd guess you are trying to do.??But >my experience with the code is as is mentioned in the top of the source: > >/* > fear he who enter here.??It appears that things have changed.??An attempt > has been made to put things the way the should be. > > ???????It compiles and ParallelBlackBox runs.??No further guarantees. > > ???????Well... One.. it will print "Hello World!" on an epson DX 10 printer. > ???????you know.. the 10 character per second daisy wheel printer ;) > > ???????- Trent Jarvi >*/ > >That comment is from 1997 or so. > >Since then some windows support was contributed but it is still very green >code.??We get about four requests for parallel support a year so its just >not a well traveled area. > >It would be nice to have some documentation for the people trying to hook >parallel ports to electronic projects.??That appears to be the exclusive >use of the Parallel support.??The wiki pages are intended to let people >share information like this to help each other in their projects as they >figure out the details. > >-- >Trent Jarvi >tjarvi at qbang.org > > > > >-- >Ed > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 15 13:26:16 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 15 Aug 2006 14:26:16 -0500 Subject: [Rxtx] crash with too much memory Message-ID: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded from qbang.org. I'm exercising the RXTX COMM serial interface, both in a small standalone test and with the same code pulled into a large OSGI framework setup. If I use the stock .jar/.dll's, then everything works correctly in both situations. I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 (mingw-special)). If I use my locally built version, then my small test case works just fine, both when run inside Eclipse and when run standalone on the command line. However, when I try and use my locally built .jar/.dll's in the large framework environment, then I get a JVM crash with the attached log. Normally this would lead me to think that I was running out of memory or something in the large environment, and when I try and play with the JVM memory args, some interesting things show up. In our large environment, we have -Xms32M/-Xmx1024M - this appears to be the problem. If I set max to something like 64M, then things work. The cross over point from working to failing seems to be around 32M/110M (works) and 32M/111M (fails). But 128M/128M works while 128M/129M fails. So it seems to have to do with how much memory is actually available, or something like that. The thing that occurs to me is if my GCC is somehow generating something like "near" calls. But when the JVM has a lot of RAM available, it puts the DLL up somehwere in the address space and then the near calls fail - far calls are needed. So, I'm thinking this is probably a difference in the MinGW GCC I'm using and the one that was used to build the stock binaries from qbang, or maybe some command line args were changed? So, I'm hoping someone will have an idea of what's going on here... Thanks, Pete From tjarvi at qbang.org Tue Aug 15 18:54:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 15 Aug 2006 18:54:04 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: On Tue, 15 Aug 2006, Pete Flugstad wrote: > I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded > from qbang.org. > > I'm exercising the RXTX COMM serial interface, both in a small > standalone test and with the same code pulled into a large OSGI > framework setup. > > If I use the stock .jar/.dll's, then everything works correctly in > both situations. > > I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 > (mingw-special)). > > If I use my locally built version, then my small test case works just > fine, both when run inside Eclipse and when run standalone on the > command line. However, when I try and use my locally built > .jar/.dll's in the large framework environment, then I get a JVM crash > with the attached log. > > Normally this would lead me to think that I was running out of memory > or something in the large environment, and when I try and play with > the JVM memory args, some interesting things show up. > > In our large environment, we have -Xms32M/-Xmx1024M - this appears to > be the problem. If I set max to something like 64M, then things work. > The cross over point from working to failing seems to be around > 32M/110M (works) and 32M/111M (fails). > But 128M/128M works while 128M/129M fails. So it seems to have to do > with how much memory is actually available, or something like that. > > The thing that occurs to me is if my GCC is somehow generating > something like "near" calls. But when the JVM has a lot of RAM > available, it puts the DLL up somehwere in the address space and then > the near calls fail - far calls are needed. > > So, I'm thinking this is probably a difference in the MinGW GCC I'm > using and the one that was used to build the stock binaries from > qbang, or maybe some command line args were changed? > > So, I'm hoping someone will have an idea of what's going on here... > Hi Pete The binaries are from the src. They should be reproducable. I did extensive testing of rxtx several years ago using mingw as the compiler. The version was 2.95. I have not changed versions since. There are way too many variables as it is. I have a linux->mingw cross compiler rpm I use for all windows use. If you want a copy of it you can have it. It isn't anything 'special' :) -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Thu Aug 17 11:49:24 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 17 Aug 2006 12:49:24 -0500 Subject: [Rxtx] crash with too much memory In-Reply-To: References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> On 8/15/06, Trent Jarvi wrote: > I did extensive testing of rxtx several years ago using mingw as the > compiler. The version was 2.95. I have not changed versions since. > There are way too many variables as it is. FYI, I believe I've solved this problem by changing how the dll's were built. The original mingw makefile was generating Serial.def, then performing various operations with dlltool and ld. I modified the makefile to create the dll using this page: as a guide. With that, there's no longer any need to deal with Serial.def and the makefile becomes _much_ simpler. This appears to have addressed my problems with crashing. FWIW, GCC 2.95 is _really_ old - you should consider investigating upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is supposed to generate a native binary (i.e. just like MinGW). Thanks, Pete From claretlc at yahoo.com Thu Aug 17 12:34:48 2006 From: claretlc at yahoo.com (Clare Cooley) Date: Thu, 17 Aug 2006 11:34:48 -0700 (PDT) Subject: [Rxtx] parallel port communication Message-ID: <20060817183448.76911.qmail@web53908.mail.yahoo.com> Hi, I'm trying to write a 1 to a bit 15 on a parallel port cable that isn't attached to a printer.(It's a control box for eye-tracking equipment.)I need to do this in Java. I looked at the javax.comm documentation, and it said, "Application programs should not directly create ParallelPortEvent objects." So is there a way to do this with your package? If not, do you have any suggestions of where to look? It really needs to be done in Java. Thanks, Clare Cooley __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From pat at xvalheru.org Thu Aug 17 13:13:52 2006 From: pat at xvalheru.org (pat) Date: Thu, 17 Aug 2006 21:13:52 +0200 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060817190751.M5586@xvalheru.org> Hi there, I've question(s) for you. I need to communicate with scale, I've used the Sun's direver. Now I've switched to Rxtx and the speed of the communication is perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, but the difference between the crash time is 5 second ... . My question is: Is there a stable driver ??? Or what I have to do to have stable enough serial port driver ??? OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. Thanks to all for the help. Pat From tjarvi at qbang.org Fri Aug 18 05:13:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 05:13:42 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> Message-ID: On Thu, 17 Aug 2006, Pete Flugstad wrote: > On 8/15/06, Trent Jarvi wrote: >> I did extensive testing of rxtx several years ago using mingw as the >> compiler. The version was 2.95. I have not changed versions since. >> There are way too many variables as it is. > > FWIW, GCC 2.95 is _really_ old - you should consider investigating > upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is > supposed to generate a native binary (i.e. just like MinGW). > It is really old but also well known like C itself. I have considered upgrading. The ToyBox builds should be gcc 3* cross-compiled. I'm not going to be validating gcc 3* w32 binaries though. It's looking like we will need to focus support on MSFT's toolchain for 64 bit windows support until it is possible for gcc to support w64. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Aug 18 05:32:10 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 07:32:10 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: Hi All, Does anyone know how to produce mac intel binaries on a Fedora Linux box? Thanks! - Doug From tjarvi at qbang.org Fri Aug 18 06:42:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 06:42:05 -0600 (MDT) Subject: [Rxtx] cross compilation for the mac In-Reply-To: References: Message-ID: On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Does anyone know how to produce > mac intel binaries on a Fedora Linux > box? > > Thanks! > - Doug Hi Doug You need to build the cross toolchain which means copying the Darwin/Mac binaries over to fedora. It would be nontrivial but possible. Do the Darwin libraries work with Mac in general? I'm not aware of the licensing issues associated with grabbing Mac binaries. Same with OpenSolaris/Solaris. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Aug 18 08:15:26 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 10:15:26 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> In theory building against Darwin would be sufficient to getting things working on MacOS X. You need to remember that Darwin is the low-level OS, while MacOS X adds the everything else on top. IOKit, which is the I/O API, is available as part of Darwin. The only thing you will need extra are the Java libraries. One thing is that I would recommend that when producing binaries for the Mac, is to ensure they are Universal binaries (PPC+Intel). Andre > > From: Trent Jarvi > Date: 2006/08/18 Fri AM 08:42:05 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] cross compilation for the mac > > On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > > > Hi All, > > Does anyone know how to produce > > mac intel binaries on a Fedora Linux > > box? > > > > Thanks! > > - Doug > > Hi Doug > > You need to build the cross toolchain which means copying the Darwin/Mac > binaries over to fedora. It would be nontrivial but possible. > > Do the Darwin libraries work with Mac in general? I'm not aware of the > licensing issues associated with grabbing Mac binaries. > > Same with OpenSolaris/Solaris. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Aug 18 13:43:16 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 15:43:16 -0400 Subject: [Rxtx] cross compilation for the mac In-Reply-To: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: >In theory building against Darwin would be sufficient to getting >things working on MacOS X. You need to remember that Darwin is the >low-level OS, while MacOS X adds the everything else on top. IOKit, >which is the I/O API, is available as part of Darwin. The only thing >you will need extra are the Java libraries. > >One thing is that I would recommend that when producing binaries for >the Mac, is to ensure they are Universal binaries (PPC+Intel). > >Andre I find the xcode ide for generating a mix of universal binaries and java very difficult to make work. Is there a way to do this with make files? Thanks! - Doug From ajmas at sympatico.ca Fri Aug 18 13:54:55 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 15:54:55 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818195455.PGAP29052.tomts13-srv.bellnexxia.net@smtp1.sympatico.ca> It should be doable. XCode hands off the compilation process to gcc et al, for the compilation of C/C++ code and to javac et al. for the Java side. While ant is the favoured tool for 'automated' Java compilation, make can easily be used. All is needed is someone to volounteer to do the work. Andre "Dr. Douglas Lyon" wrote > > >In theory building against Darwin would be sufficient to getting > >things working on MacOS X. You need to remember that Darwin is the > >low-level OS, while MacOS X adds the everything else on top. IOKit, > >which is the I/O API, is available as part of Darwin. The only thing > >you will need extra are the Java libraries. > > > >One thing is that I would recommend that when producing binaries for > >the Mac, is to ensure they are Universal binaries (PPC+Intel). > > > >Andre > > I find the xcode ide for generating a mix of universal binaries > and java very difficult to make work. Is there a way to do this > with make files? > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Fri Aug 18 16:34:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 16:34:46 -0600 (MDT) Subject: [Rxtx] serial driver newbe question and problem In-Reply-To: <20060817190751.M5586@xvalheru.org> References: <20060817190751.M5586@xvalheru.org> Message-ID: On Thu, 17 Aug 2006, pat wrote: > Hi there, > > I've question(s) for you. I need to communicate with scale, I've used the > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > but the difference between the crash time is 5 second ... . > > My question is: Is there a stable driver ??? Or what I have to do to have > stable enough serial port driver ??? > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > Thanks to all for the help. > > Pat > Could you describe the hardware you have, the version of rxtx and provide the log of the crash? Did you download binaries? I've not been seeing a jvm crash with rxtx -- Trent Jarvi tjarvi at qbang.org From lunareclipse03 at web.de Sat Aug 19 12:11:48 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 19 Aug 2006 20:11:48 +0200 Subject: [Rxtx] Problem solved! Message-ID: <920065539@web.de> Hi everybody, I posted some months ago and asked about some help on my very special problem concerning my win32 port of a communications library. Now I just want to inform you that no further "mindstorming" is needed because I solved the problem by completely rewriting the win32 port of the library. Now everything works fine. Thank you all for your time and patience. --Sven Ahlemann __________________________________________________________________________ Erweitern Sie FreeMail zu einem noch leistungsst?rkeren E-Mail-Postfach! Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131 From ajmas at sympatico.ca Mon Aug 21 09:58:23 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 21 Aug 2006 11:58:23 -0400 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060821155823.TLSM18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Next time that happens, including a copy of the crash log, produced by Windows could probably help too. Andre Trent Jarvi wrote: > > On Thu, 17 Aug 2006, pat wrote: > > > Hi there, > > > > I've question(s) for you. I need to communicate with scale, I've used the > > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > > but the difference between the crash time is 5 second ... . > > > > My question is: Is there a stable driver ??? Or what I have to do to have > > stable enough serial port driver ??? > > > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > > > Thanks to all for the help. > > > > Pat > > > > Could you describe the hardware you have, the version of rxtx and > provide the log of the crash? Did you download binaries? > > I've not been seeing a jvm crash with rxtx > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From adrian.l.parker at gmail.com Thu Aug 24 09:10:39 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Thu, 24 Aug 2006 11:10:39 -0400 Subject: [Rxtx] Portability issues Message-ID: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use RXTX 2.0? Does it provide system librairies that javax.comm does not? I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, or 2000, or server 2003). Can this be done with a single implementation of RXTX? I don't want to have different versions of Java code that have different package names. References: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Message-ID: On Thu, 24 Aug 2006, Adrian Parker wrote: > Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use > RXTX 2.0? Does it provide system librairies that javax.comm does not? > > I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's > OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, > or 2000, or server 2003). Can this be done with a single implementation of > RXTX? I don't want to have different versions of Java code that have > different package names. > Hi Adrian. The native code can support all of the platforms you mention. I've never compiled for unixware or openunix but the patches are in the code. So you would need to compile for that target. >From there you would probably be best off going with rxtx 2.1 so you have all the classes in one package. You can opt to use rxtx 2.0 with Sun's commapi for Solaris v 2. The main differences are rxtx 2.1 comes with all the source/classes and is in package gnu.io while Sun's requires rxtx for some platforms but is in package javax.comm. The low level code is the same in either case as far as rxtx is concerned. -- Trent Jarvi tarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 04:12:52 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 06:12:52 -0400 Subject: [Rxtx] Serial.addEventListener bug? Message-ID: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on OpenServer 5.0.7). Its what Sun packages. I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an exception. It seems to throw the exception if no listener was previously declared (although I've not had chance to verify). Is this desireable behaviour? Sun's original API doesn't mention anything about an exception on this function, http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) Of course this is an old version of RXTX, so perhaps this has been changed. -- Adrian Parker Simulation Software Developer DLCSPM 4-4-3 (c) Building A31, CFB Kingston Tel: (613) 541-5010 x3020 CSN: 271-3020 Email: parker at lsec.dnd.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/22e2ea57/attachment-0311.html From tjarvi at qbang.org Fri Aug 25 05:15:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 25 Aug 2006 05:15:44 -0600 (MDT) Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: On Fri, 25 Aug 2006, Adrian Parker wrote: > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > OpenServer 5.0.7). Its what Sun packages. > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > exception. It seems to throw the exception if no listener was previously > declared (although I've not had chance to verify). > > Is this desireable behaviour? Sun's original API doesn't mention anything > about an exception on this function, > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > Of course this is an old version of RXTX, so perhaps this has been changed. > > > What exception was thrown? You can replace 1.4-8 with 2.0 for testing purposes. They are the same package. I doubt Sun shipped or packaged that. I think Caldera/SCOx/... did at one point. There may still be updates on their pages. I recall them sending patches here which are in current rxtx. -- Trent Jarvi tjarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 05:28:32 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 07:28:32 -0400 Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: <7da71e910608250428q32b86632g9a67b1b4efe69830@mail.gmail.com> On 8/25/06, Trent Jarvi wrote: > > On Fri, 25 Aug 2006, Adrian Parker wrote: > > > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > > OpenServer 5.0.7). Its what Sun packages. > > > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > > exception. It seems to throw the exception if no listener was > previously > > declared (although I've not had chance to verify). > > > > Is this desireable behaviour? Sun's original API doesn't mention > anything > > about an exception on this function, > > > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > > > Of course this is an old version of RXTX, so perhaps this has been > changed. > > > > > > > > What exception was thrown? Its weird. I catch an Exception. But when on that exception I call getClass().getName() I end up with a NullPointerException. You can replace 1.4-8 with 2.0 for testing > purposes. They are the same package. > > I doubt Sun shipped or packaged that. Doh! I meant to say SCO sorry. I was surfing Sun's site when I wrote that :) Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/e43aed3a/attachment-0311.html From sjudd at seas.upenn.edu Sat Aug 26 16:42:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Sat, 26 Aug 2006 18:42:09 -0400 Subject: [Rxtx] Mac commapi Message-ID: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? If so, where do I get it? Sun has various versions at http://www.sun.com/download/products.xml?id=43208d3d but they are for SolarisSparc, SolarisX86, Linux, and Generic. Do I use the Generic one? If so, read on; otherwise redirect me. While using the Generic version, my attempt to run the BlackBox sample program elicits a message saying it "can't find javax.comm.properties". I found a note in the rxtx.org HowTo (for Linux) saying to create this thing in /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties but where should it go on the Mac? After reading many versions of documentation around, and updates and revisions and re-authorings, I have worked my way into a state of confusion and high uncertainty. Please release me. sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060826/02d6b163/attachment-0281.html From tod at todbot.com Sat Aug 26 17:08:33 2006 From: tod at todbot.com (Tod E. Kurt) Date: Sat, 26 Aug 2006 16:08:33 -0700 Subject: [Rxtx] Mac commapi In-Reply-To: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Message-ID: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> You don't need Sun's CommAPI. You just need RXTX. Once you download RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and the native library is ("librxtxSerial.jnilib" on Mac OS X) via the standard methods. For instance, if you've placed those two files in a directory called 'rxtxlib' and you want to run a Java class called HelloWorld in the current directory, do the following: % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar HelloWorld On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? > If so, where do I get it? Sun has various versions at > http://www.sun.com/download/products.xml?id=43208d3d > but they are for SolarisSparc, SolarisX86, Linux, and Generic. > Do I use the Generic one? > If so, read on; otherwise redirect me. > > While using the Generic version, my attempt to run the BlackBox > sample program > elicits a message saying it "can't find javax.comm.properties". > I found a note in the rxtx.org HowTo (for Linux) saying to create > this thing in > /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties > but where should it go on the Mac? > > After reading many versions of documentation around, and updates > and revisions > and re-authorings, I have worked my way into a state of confusion > and high > uncertainty. Please release me. > > sj > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From sjudd at seas.upenn.edu Sun Aug 27 22:55:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Mon, 28 Aug 2006 00:55:09 -0400 Subject: [Rxtx] Mac commapi In-Reply-To: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> Message-ID: This was immensely helpful. Thank you, Tod. I wish it had been explicit somewhere in the documentation; it would have saved me 2 days of grief. One hugely valuable thing like this little set of instructions is that it implicitly lists all the hundreds of things you DON"T have to do. I know it seems obvious to those in the know, but every little bit of help on an arcane topic like this opens up the product to an exponentially wider group of dilettantes. I managed to get the SerialDemo program (from Sun) to work too. Hurrah! However, it required changing all the javax.comm references to gnu.io which I had heard of due to all my rambling readings. Is there not a demo program on rxtx.org already available that would not have needed this? BTW, the link on the Projects page for jPIC[Source] sends a *.hex file to a PIC 16F877 or similar chip... takes me to nowhere useful. I do not understand what the name "Toybox" is meant to imply. Thanks, sj On 2006 Aug 26, at 7:08 PM, Tod E. Kurt wrote: > You don't need Sun's CommAPI. You just need RXTX. Once you download > RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and > the native library is ("librxtxSerial.jnilib" on Mac OS X) via the > standard methods. > > For instance, if you've placed those two files in a directory called > 'rxtxlib' and you want to run a Java class called HelloWorld in the > current directory, do the following: > > % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar > HelloWorld > > > On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > >> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? >> If so, where do I get it? Sun has various versions at >> http://www.sun.com/download/products.xml?id=43208d3d >> but they are for SolarisSparc, SolarisX86, Linux, and Generic. >> Do I use the Generic one? >> If so, read on; otherwise redirect me. >> >> While using the Generic version, my attempt to run the BlackBox >> sample program >> elicits a message saying it "can't find javax.comm.properties". >> I found a note in the rxtx.org HowTo (for Linux) saying to create >> this thing in >> /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties >> but where should it go on the Mac? >> >> After reading many versions of documentation around, and updates >> and revisions and re-authorings, I have worked my way into a state >> of confusion and high uncertainty. Please release me. >> >> sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060827/b80d6389/attachment-0281.html From pete.flugstad at gmail.com Mon Aug 28 12:38:27 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 13:38:27 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE Message-ID: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Okay, my understanding is that originally, RTS meant "Request to Send" - the DTE (the PC) would assert this and the DCE (modem) would assert "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send data. This really only provided uni-directional flow control, from the PC to the modem. Now, as I understand it, the more modern usage of RTS is that it is used for the DTE to assert flow control back to the DCE - basically it means "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) raises this, then the DCE(modem) is free to send data to the DTE - this allows the DTE(PC) to exert flow control back towards the DCE(modem). This discussion is based on the Serial HOWTO from: and lots of other reading... Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which is defined as: > Enables RTS flow-control handshaking. The driver raises the RTS line, > enabling the DCE to send, when the input buffer has enough room to > receive data. The driver lowers the RTS line, preventing the DCE to > send, when the input buffer does not have enough room to receive > data. If this value is used, it is an error for the application to adjust > the line with EscapeCommFunction. which clearly reflects the newer usage style - it keeps the RTS line high as long as there is space to _receive_ data. And takes it low when the receive/input buffer is getting full to stop the modem from sending it data. Does this jive with other peoples understanding of RTS usage? Unfortunately, the hardware I'm trying to talk to wants to use the OLD style of RTS line usage. An existing Windows C++ program uses RTS_CONTROL_TOGGLE, which documentation states: > Specifies that the RTS line will be high if bytes are available for transmission. > After all buffered bytes have been sent, the RTS line will be low. If this value is > set, it would be an error for an application to adjust the line with > EscapeCommFunction. This value is ignored in Windows 95; it causes the > driver to act as if RTS_CONTROL_ENABLE were specified. This seems to be the OLD RTS behavior, right? So, what I seem to need is to be able to control the RTS line, either using TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS when getting ready to TX and clear it when the output buffer is empty). Does this make sense, or am I off in the weeds? Thanks, Pete From tjarvi at qbang.org Mon Aug 28 18:21:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 28 Aug 2006 18:21:10 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: On Mon, 28 Aug 2006, Pete Flugstad wrote: > Okay, my understanding is that originally, RTS meant "Request to Send" > - the DTE (the PC) would assert this and the DCE (modem) would assert > "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send > data. This really only provided uni-directional flow control, from the PC to > the modem. > > Now, as I understand it, the more modern usage of RTS is that it is used > for the DTE to assert flow control back to the DCE - basically it means > "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) > raises this, then the DCE(modem) is free to send data to the DTE - this > allows the DTE(PC) to exert flow control back towards the DCE(modem). > > This discussion is based on the Serial HOWTO from: > > > > and lots of other reading... > > Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > is defined as: > >> Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > > which clearly reflects the newer usage style - it keeps the RTS line high > as long as there is space to _receive_ data. And takes it low when the > receive/input buffer is getting full to stop the modem from sending it data. > > Does this jive with other peoples understanding of RTS usage? > > Unfortunately, the hardware I'm trying to talk to wants to use the OLD > style of RTS line usage. An existing Windows C++ program uses > RTS_CONTROL_TOGGLE, which documentation states: > >> Specifies that the RTS line will be high if bytes are available for transmission. >> After all buffered bytes have been sent, the RTS line will be low. If this value is >> set, it would be an error for an application to adjust the line with >> EscapeCommFunction. This value is ignored in Windows 95; it causes the >> driver to act as if RTS_CONTROL_ENABLE were specified. > > This seems to be the OLD RTS behavior, right? > > So, what I seem to need is to be able to control the RTS line, either using > TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS > when getting ready to TX and clear it when the output buffer is empty). > > Does this make sense, or am I off in the weeds? > Hi Pete OK. That sounds right. I do not know how you would communicate the difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through CommAPI as it stands. I take it you did not find anything either? Perhaps the best thing to do for your code is to toggle the RTS yourself. This could be a feature in the future JSR API perhaps. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 28 20:54:34 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 21:54:34 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <44F3AC6A.10908@gmail.com> Trent Jarvi wrote: > OK. That sounds right. I do not know how you would communicate the > difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through > CommAPI as it stands. I take it you did not find anything either? > > Perhaps the best thing to do for your code is to toggle the > RTS yourself. This could be a feature in the future JSR API perhaps. Yeah, this is what I ended up doing. I had to modify the dll in order to be able to set hardware flow control (which I do want), but leave the RTS flow control at RS_CONTROL_ENABLE. After that I just toggle setRTS(true) when I'm ready to send and setRTS(false) when I get a OUTPUT_BUFFER_EMPTY notification. Haven't tested with real hardware yet, but it seems to work OK. Thanks for the feedback! Pete From Bob_Jacobsen at lbl.gov Tue Aug 29 08:49:02 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 29 Aug 2006 07:49:02 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >is defined as: > > > Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > >which clearly reflects the newer usage style - it keeps the RTS line high >as long as there is space to _receive_ data. And takes it low when the >receive/input buffer is getting full to stop the modem from sending it data. > >Does this jive with other peoples understanding of RTS usage? Can you point to any devices that actually implement this "new" understanding? I think the person who wrote that documentation paragraph is just confused. The original "RTS/CTS" handshaking was extended to input (from DCE to DTE) handshaking via the DTR (Data Terminal Ready) line. I think the person who wrote the double-quoted paragraph above was just confused between the directions, and mixed them up. If you change "RTS" to "DTR" in that paragraph, you get: > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > enabling the DCE to send, when the input buffer has enough room to > > receive data. The driver lowers the DTR line, preventing the DCE to > > send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. which describes how dozens of devices actually work for controlling flow into the DTE (computer). This then leaves RTS/CTS (with RTS usually just stuck high) for controlling flow into the DCE (peripheral). Again, lots of hardware devices actually do this. I don't work on Windows, so can't be sure of what happens. But on the MacOS X version of RXTX, CTS low stops transmission, exactly as the "old" style would expect. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From mschned at basis.com Tue Aug 29 12:57:45 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 12:57:45 -0600 Subject: [Rxtx] Porting to AIX Message-ID: <01f201c6cb9d$034d4f20$341416ac@basis.com> Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar From mschned at basis.com Tue Aug 29 13:58:05 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 13:58:05 -0600 Subject: [Rxtx] Porting to AIX References: <01f201c6cb9d$034d4f20$341416ac@basis.com> Message-ID: <024901c6cba5$714c3560$341416ac@basis.com> After looking through the build messages closer, there is an error building SerialImp.c: gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type Looks like B57600 is not defined and there are no definitions for DEVICEDIR and LOCKDIR on AIX. Can I just a the following to SerialImp.h? #if defined(__aix__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __aix__ */ Mark Schnedar ----- Original Message ----- From: "Mark E. Schnedar" To: Sent: Tuesday, August 29, 2006 12:57 PM Subject: [Rxtx] Porting to AIX Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 29 15:25:35 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 29 Aug 2006 16:25:35 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <84d4a6d50608291425i1fb819d3i615cf9b85b1e9617@mail.gmail.com> On 8/29/06, Bob Jacobsen wrote: > Can you point to any devices that actually implement this "new" understanding? > > I think the person who wrote that documentation paragraph is just confused. The paragraph is from the Windows documentation of its DCB structure which is used to configure the Serial Device. This is what RXTX uses internally. My version is from MSDN, and Google finds the same text here: (search for fRtsControl). I have not seen any mention anywhere of it being incorrect (and yes, I did look, because I thought the same thing). My discussion is based on trying to use RXTX to talk to a device that used the old style of one-way flow control (RTS is raised to SEND data from the PC to the device). An existing VC++ app use the old-style RTS_CONTROL_TOGGLE. RXTX did not - it used the newer style RTS_CONTROL_HANDSHAKE, so things didn't work - the device was seeing RTS HIGH all the time, so it was thinking that the PC was ready to TX all the time. When I switch RXTX to using RTS_CONTROL_ENABLED and manually control RTS, then things work correctly. The behavior is consistent with this understanding if I hook two serial ports on Windows XP in lookback (via null modem). I'd be very surprised if this had not been corrected by M$ by this time. The same structure has been around since WinNT (mid 1990's) - their documentation is typically pretty good. > > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > > enabling the DCE to send, when the input buffer has enough room to > > > receive data. The driver lowers the DTR line, preventing the DCE to > > > send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. There is a seperate field, fDtrControl, which you can set to DTR_CONTROL_HANDSHAKE, that appears to do exactly this. > This then leaves RTS/CTS (with RTS usually just stuck high) for > controlling flow into the DCE (peripheral). Again, lots of hardware > devices actually do this. > > I don't work on Windows, so can't be sure of what happens. But on > the MacOS X version of RXTX, CTS low stops transmission, exactly as > the "old" style would expect. Well, the Linux Serial HOWTO is where I got most of my information. And yes, I thought it was wrong as well, but it's apparently how things are implemented: Donno - but it works for me... Pete From tjarvi at qbang.org Tue Aug 29 19:11:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 29 Aug 2006 19:11:40 -0600 (MDT) Subject: [Rxtx] Porting to AIX In-Reply-To: <024901c6cba5$714c3560$341416ac@basis.com> References: <01f201c6cb9d$034d4f20$341416ac@basis.com> <024901c6cba5$714c3560$341416ac@basis.com> Message-ID: Hi Mark That should do it. You can put ifdef around the B57600 as we did with higher baudrates. You may want to use tip, minicom, kermit or some other serial application on the AIX to confirm that the lockfiles created are correct. Neat stuff. On Tue, 29 Aug 2006, Mark E. Schnedar wrote: > After looking through the build messages closer, > there is an error building SerialImp.c: > > gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o > /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type > > Looks like B57600 is not defined and there are no > definitions for DEVICEDIR and LOCKDIR on AIX. > > Can I just a the following to SerialImp.h? > > #if defined(__aix__) > # define DEVICEDIR "/dev/" > # define LOCKDIR "/var/lock" > # define LOCKFILEPREFIX "LCK.." > # define FHS > #endif /* __aix__ */ > > Mark Schnedar > > > ----- Original Message ----- > From: "Mark E. Schnedar" > To: > Sent: Tuesday, August 29, 2006 12:57 PM > Subject: [Rxtx] Porting to AIX > > > Hi, > > I'm new to rxtx. Currently my company has an interpreter product > that uses rxtx on Windows and Linux. I am trying to get rxtx to > build on AIX. I downloaded rxtx, ran ./configure and make. When > I run make I get the following error: > > libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object > make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 > > Do you have any suggestions on how to fix this problem? > > I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error > on both systems). I did have our system administrator load > automake, autoconf, make (gnu), and gcc. Here are the versions: > > AIX 4.3.3 AIX 5.3.0 > rxtx: 2.1-7r2 2.1-7r2 > autoconf: 2.53 2.59 > automake: 1.5 1.8.5 > make: 3.79.1 3.80 > gcc: (used native cc) 4.0.0 > > Any help would be appreciated. > > Mark Schnedar > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From guille at sms.nl Wed Aug 30 01:14:32 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 09:14:32 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <7.0.1.0.0.20060830091204.03652de0@sms.nl> At 16:49 29/08/2006, Bob Jacobsen wrote: >At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > > > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >is defined as: > > > > > Enables RTS flow-control handshaking. The driver raises the RTS line, > >> enabling the DCE to send, when the input buffer has enough room to > >> receive data. The driver lowers the RTS line, preventing the DCE to > >> send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. > > > >which clearly reflects the newer usage style - it keeps the RTS line high > >as long as there is space to _receive_ data. And takes it low when the > >receive/input buffer is getting full to stop the modem from sending it data. > > > >Does this jive with other peoples understanding of RTS usage? > >Can you point to any devices that actually implement this "new" understanding? Many (most) of the embedded devices we work with implement this kind of flow control. The host (DTE) raises RTS when it can receive data, and lowers it when the input buffers are full. In turn it watches the CTS line to see whether it can send data to the DCE. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From tjarvi at qbang.org Wed Aug 30 01:23:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 30 Aug 2006 01:23:46 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830091204.03652de0@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 16:49 29/08/2006, Bob Jacobsen wrote: >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: >>> >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >>> is defined as: >>> >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, >>>> enabling the DCE to send, when the input buffer has enough room to >>>> receive data. The driver lowers the RTS line, preventing the DCE to >>>> send, when the input buffer does not have enough room to receive >>>> data. If this value is used, it is an error for the application to adjust >>>> the line with EscapeCommFunction. >>> >>> which clearly reflects the newer usage style - it keeps the RTS line high >>> as long as there is space to _receive_ data. And takes it low when the >>> receive/input buffer is getting full to stop the modem from sending it data. >>> >>> Does this jive with other peoples understanding of RTS usage? >> >> Can you point to any devices that actually implement this "new" understanding? > > Many (most) of the embedded devices we work with implement this kind of flow > control. The host (DTE) raises RTS when it can receive data, and lowers it > when the input buffers are full. In turn it watches the CTS line to see > whether it can send data to the DCE. > I think this explains some hardware control 'bugs' I've seen. -- Trent Jarvi tjarvi at qbang.org From guille at sms.nl Wed Aug 30 02:01:35 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 10:01:35 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> At 09:23 30/08/2006, Trent Jarvi wrote: >On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > > > At 16:49 29/08/2006, Bob Jacobsen wrote: > >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >>> > >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >>> is defined as: > >>> > >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, > >>>> enabling the DCE to send, when the input buffer has enough room to > >>>> receive data. The driver lowers the RTS line, preventing the DCE to > >>>> send, when the input buffer does not have enough room to receive > >>>> data. If this value is used, it is an error for the > application to adjust > >>>> the line with EscapeCommFunction. > >>> > >>> which clearly reflects the newer usage style - it keeps the RTS line high > >>> as long as there is space to _receive_ data. And takes it low when the > >>> receive/input buffer is getting full to stop the modem from > sending it data. > >>> > >>> Does this jive with other peoples understanding of RTS usage? > >> > >> Can you point to any devices that actually implement this "new" > understanding? > > > > Many (most) of the embedded devices we work with implement this > kind of flow > > control. The host (DTE) raises RTS when it can receive data, and lowers it > > when the input buffers are full. In turn it watches the CTS line to see > > whether it can send data to the DCE. > > > >I think this explains some hardware control 'bugs' I've seen. I think the above is the most widespread use, but that may just mean it is the most widespread use in our specific segment (embedded systems). Some UART chips (e.g. from Exar) implement this kind of flow control directly in hardware. For example the Exar can be configured to suspend transmission when it sees CTS low, and resume transmission when it sees CTS high. This is also consistent with our experience. Maybe this helps clarify: http://www.tldp.org/HOWTO/Text-Terminal-HOWTO-10.html#ss10.7 Note the "Old RTS/CTS handshaking is different" section, which refers to "older terminals" whereas newer equipment would use RTS/CTS flow control (or equivalently DTR/DTS) as described above. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From Bob_Jacobsen at lbl.gov Wed Aug 30 07:55:31 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 30 Aug 2006 06:55:31 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> <7.0.1.0.0.20060830095557.0374ff28@sms.nl> Message-ID: I think we all agree that CTS inactive means "Send no more from DTE to DCE". The question is how to express the other direction, "Send no more from DCE to DTE". There are two parts to this question: What do various DTE-like devices do, and what do various DCE-like devices expect? Electrically, the lines that go that direction are DTR, DCD, and RTS (plus some special-purpose lines that are rarely present). All three devices I work most with respect the DTR lead. On the other hand, the FTDI chips for doing serial over USB provide either (RTS and CTS) or (DTR and DSR) as the two leads. What we're probably seeing is two different approaches, that have propagated separately. That's a problem. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From Pawan.Kharbanda at dot.state.co.us Wed Aug 30 09:07:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 30 Aug 2006 09:07:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0455E5E5@hqexchange3.dot.state.co.us> Trent, Sorry for not responding earlier to your email. I was actually waiting for the release of our software on the new Hardware. As I mentioned in my previous emails, RXTX crashes and locks up serial ports with the older version of Redhat (Linux 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:28:55 EDT 2005 i686 i686 i386 GNU/Linux), it might work ok if you are using one or 2 ports but anything more than that it has issues. I was using JDK1.5.0_06 and older firmwares of Digi boxes. Let me know if you need any more specific information of the older system. Thanks Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Thursday, August 10, 2006 5:40 AM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even > after 10000 operations (now I am trying 100,000 :). This is all with > the original RXTX 2.1.7 (final) api's without any of my fixes that I > have been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying > the RXTX saying the suggested kernel for Redhat Linux is > 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Aug 1 01:11:30 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 1 Aug 2006 09:11:30 +0200 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <34B6BC40-1405-4A13-8054-0FC6CE10466A@buechse.de> This is a problem with lock files. You should find it somewhere in the documentation... On 01.08.2006, at 03:53, Richard P. Welty wrote: > trying to get my app running on a Mac OS X powerbook, when > the following is executed as the first thing inside the > run method of a Thread: > > > try { > port = (SerialPort) selectedPort.open( > this.getClass().getName(), 2000); > } catch ( PortInUseException ex){ > ex.printStackTrace(); > return; > } > > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java: > 354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run > (ScaleWatcher.java:143) > > i've not seen any documentation suggesting that rxtx would be finicky > about application names... > > thanks for any suggestions, > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From rwelty at suespammers.org Tue Aug 1 05:37:53 2006 From: rwelty at suespammers.org (Richard P. Welty) Date: Tue, 01 Aug 2006 07:37:53 -0400 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <44CF3D11.9060108@suespammers.org> Richard P. Welty wrote: > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) Aha, a confusing error message. it's really a lock file problem; the code is trying to fill in the application name but when it's getting "Unknown Application" and filling that in... richard From ajmas at sympatico.ca Tue Aug 1 13:10:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:10:59 -0400 Subject: [Rxtx] Application Name? Message-ID: <20060801191059.HFCD18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> You need the source code in CVS. The forth coming 2.18 will correct this, but currently the only place to find the correction is in CVS. No idea when 2.18 is due. > > From: "Richard P. Welty" > Date: 2006/08/01 Tue AM 07:37:53 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Application Name? > > Richard P. Welty wrote: > > > i get the following: > > > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > at > > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) > > Aha, a confusing error message. it's really a lock file problem; the > code is trying to fill in the application name but when it's getting > "Unknown Application" and filling that in... > > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:15:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:15:57 -0400 Subject: [Rxtx] Do interfaces break backwards compatibility? Message-ID: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> It is the class that decides to add serializable that needs to worry about those issues. For the most part serial ports and their connection states should be considered as transient, since there is no guarantee they will still be present or that their state will be, especially in a USB world. What you can store is the port settings and port id and then simply test for port availability next time. Nothing else should be assumed. > > From: Gregg Wonderly > Date: 2006/07/31 Mon PM 01:21:19 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Do interfaces break backwards compatibility? > > Doug Berkland wrote: > > As far as I can tell, nothing in either RXTX or Sun's JavaCOMM > > implements Serializable. Therefore, there are no worries from that > > either. (I can't think of a reason anything in JavaCOMM should > > implement Serializable either.) > > Any interface in javax.comm can become implemented by a serializable object. > Thus, if someone wants to provide remote access to a serial port, then they > might (and I think this is not wise) choose to subclass and add Serializable to > the interface list. > > It's that kind of Serialization compatibility that I'm talking about. > > Gregg Wonderly > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:18:11 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:18:11 -0400 Subject: [Rxtx] precompiled for Intel Mac? Message-ID: <20060801191811.FLJY27612.tomts16-srv.bellnexxia.net@smtp1.sympatico.ca> > > From: Joachim Buechse > There will be. However not before we have figured out some remaining issues. What issues are remaining? Andre From Pawan.Kharbanda at dot.state.co.us Tue Aug 1 16:55:08 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 1 Aug 2006 16:55:08 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Hi, I am also experiencing occasional JVM crash thru the native code. I am attaching the log from the crash. Any ideas what might be causing it???? Regards Pawan Kharbanda # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # --------------- T H R E A D --------------- Current thread (0x8d000480): JavaThread "Thread-119" [_thread_in_native, id=111 51] siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba Registers: EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 Top of Stack: (sp=0x8d3482b8) 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 0x8d348308: 00000000 00000002 00000000 00000000 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 Instructions: (pc=0xb75e39b2) 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~StubRoutines::call_stub V [libjvm.so+0x2607ec] V [libjvm.so+0x423828] V [libjvm.so+0x260045] V [libjvm.so+0x2600de] V [libjvm.so+0x2d7745] V [libjvm.so+0x4c2ba3] V [libjvm.so+0x424338] C [libpthread.so.0+0x4dd8] 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 ) =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, id=11026] 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, id=11023] From tjarvi at qbang.org Tue Aug 1 18:46:21 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 1 Aug 2006 18:46:21 -0600 (MDT) Subject: [Rxtx] JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Message-ID: On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) > C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] > 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, > id=11034] > 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, > id=11033] > 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, > id=11032] > 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, > id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] > 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, > id=11028] > 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, > id=11027] > 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, > id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] > 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- Index: termios.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/termios.c,v retrieving revision 1.9.2.57 diff -u -r1.9.2.57 termios.c --- termios.c 4 Jun 2006 02:50:01 -0000 1.9.2.57 +++ termios.c 11 Jun 2006 21:51:10 -0000 @@ -1048,26 +1048,29 @@ if ( !first_tl ) { port->prev = NULL; + port->next = NULL; first_tl = port; } else { - while ( index->next ) + while ( ( index->fd < port->fd ) && index->next ) index = index->next; - if ( port == first_tl ) + if ( index->fd > port->fd ) { - port->prev = NULL; - port->next = first_tl; - first_tl->prev = port; - first_tl = port; + /* inserting previously closed fd */ + port->prev = index->prev; + port->next=index + index->prev->next = port; + index->prev = port; } else { + /* adding to end of list */ port->prev = index; + port->next = NULL; index->next = port; } } - port->next = NULL; LEAVE( "add_port" ); return port; From gergg at cox.net Tue Aug 1 23:25:19 2006 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 02 Aug 2006 00:25:19 -0500 Subject: [Rxtx] Do interfaces break backwards compatibility? In-Reply-To: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <44D0373F.7020600@cox.net> Andre-John Mas wrote: > It is the class that decides to add serializable that needs to worry about those issues. > For the most part serial ports and their connection states should be considered as > transient, since there is no guarantee they will still be present or that their state > will be, especially in a USB world. Right, but when you provide an interface as the standard, that opens the doors for a lot more interpretation and variation. An abstract class can indicate a lot more about what the expected implementation is. Gregg Wonderly From lyon at docjava.com Wed Aug 2 06:02:15 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:02:15 -0400 Subject: [Rxtx] jsr spec and license issues Message-ID: Hi All, Trent and I have been discussing the license issues of the JSR spec and code that we develop, as a community. Here is what we have come up with: >During the development, the new JSR spec that we derive >will be >covered under the LGPL license. Since it is >just interfaces, any contributions will come back to me, for inclusion >into the specification. The goal is to provide a detailed set of >interfaces that >document the present state of our reference model. I am using >the RXTX as the reference model. If there is something missing from >the reference model, or if the reference model has something that should >not be there, we will need to discuss it. > >After Sun accepts the JSR, I, as the copyright holder, can issue >a version with a JSR compatible license. > >The goal is to migrate the interfaces into javax.comm. Does this sound like a reasonable plan to everyone? Thanks! - Doug From joachim at buechse.de Wed Aug 2 06:21:03 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 14:21:03 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Good day, quite frankly I think that this is a very bad idea. This specification (!) should be in the public domain and nowhere else. Defining a spec under the (L)GPL makes absolutely no sense. After all it is a specification not an implementation. There is no or only trivial code attached to it. So while nothing can be gained by putting it under the LGPL, a lot can be lost - for example the contribution of companies that do not like to open source their implementations. Furthermore you are plain wrong assuming you will be the copyright holder to additions made by other people. Best regards, Joachim On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for >> inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that >> should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Aug 2 06:39:28 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:39:28 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Hi All, I don't know anything about licensing issues. The below sounds reasonable. If we make this public domain, will that be compatible with Sun's JSR? Thanks! - DL P.S. I really don't care what we do, as long as there is some sort of collective agreement. >Good day, > >quite frankly I think that this is a very bad idea. This specification >(!) should be in the public domain and nowhere else. > >Defining a spec under the (L)GPL makes absolutely no sense. After all? >it is a specification not an implementation. There is no or only? >trivial code attached to it. So while nothing can be gained by? >putting it under the LGPL, a lot can be lost - for example the? >contribution of companies that do not like to open source their? >implementations. > >Furthermore you are plain wrong assuming you will be the copyright? >holder to additions made by other people. > >Best regards, >Joachim > > >On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for? >>> inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that? >>> should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> >> Does this sound like a reasonable plan to everyone? >> >> Thanks! >> - Doug >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 07:50:09 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 10:50:09 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D0AD91.4080103@gmail.com> Hi, I have been searching the web and here it is: http://jcp.org/en/resources/license_reference Here there is a list of the licenses that are compatible with the JCP for JSR submitting. I think that Apache, CDDL, CPL and OSL are the one that are compatible with our needs. But I think that Apache is the best for us, Doug why do not make a votation? Regards, Manuel > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. > >> Good day, >> >> quite frankly I think that this is a very bad idea. This specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From lyon at docjava.com Wed Aug 2 08:10:55 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 10:10:55 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D0AD91.4080103@gmail.com> References: <44D0AD91.4080103@gmail.com> Message-ID: Hi All, I have no objection to an Apache license for the JSR interfaces that we produce. Would anyone care to comment? Joachim: Does this address your public domain concerns? How does this impact the reference implementation (i.e. RXTX)? Thanks! - DL >Hi, >I have been searching the web and here it is: >http://jcp.org/en/resources/license_reference >Here there is a list of the licenses that are compatible with the JCP >for JSR submitting. >I think that Apache, CDDL, CPL and OSL are the one that are compatible >with our needs. >But I think that Apache is the best for us, Doug why do not make a votation? >Regards, >Manuel > >> Hi All, >> I don't know anything about licensing issues. >> The below sounds reasonable. If we make this public domain, >> will that be compatible with Sun's JSR? >> Thanks! >> - DL >> P.S. I really don't care what we do, as long as there is >> some sort of collective agreement. >>?? >>> Good day, >>> >>> quite frankly I think that this is a very bad idea. This specification >>> (!) should be in the public domain and nowhere else. >>> >>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>> it is a specification not an implementation. There is no or only >>> trivial code attached to it. So while nothing can be gained by >>> putting it under the LGPL, a lot can be lost - for example the >>> contribution of companies that do not like to open source their >>> implementations. >>> >>> Furthermore you are plain wrong assuming you will be the copyright >>> holder to additions made by other people. >>> >>> Best regards, > >> Joachim >>> >>> >>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>> >>>???? >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>?????? >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for >>>>> inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that >>>>> should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>>>???????? >>>> Does this sound like a reasonable plan to everyone? >>>> >>>> Thanks! >>>> - Doug >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>?????? >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>???? >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 08:20:29 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 11:20:29 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D0AD91.4080103@gmail.com> Message-ID: <44D0B4AD.2050106@gmail.com> Doug; > How does this impact the reference implementation (i.e. RXTX)? > Fuck I have not thinked about that, we would need that everyone who had colaborated with RXTX and have putted code on it to agree a license chaging. Or start from sractch. I don't know if Trent have the right to do that. Regards, Manuel > > >> Hi, >> I have been searching the web and here it is: >> http://jcp.org/en/resources/license_reference >> Here there is a list of the licenses that are compatible with the JCP >> for JSR submitting. >> I think that Apache, CDDL, CPL and OSL are the one that are compatible >> with our needs. >> But I think that Apache is the best for us, Doug why do not make a votation? >> Regards, >> Manuel >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> >> >> Joachim >> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 08:21:15 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 16:21:15 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Putting something in the public domain means, that it can be used by anyone for whatever (s)he thinks is appropriate. The authors define no restriction regarding it's use. That's how any specification should be. Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From berkland at spamcop.net Wed Aug 2 08:50:50 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 10:50:50 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> You may want to consider making it available under two separate licenses. 1 - LGPL as it is today The LGPL can be used by anyone wanting to extend the current functionality, as long as they provide code for anything they change. 2 - Sun Community Source License (SCSL) http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf The SCSL will allow anyone who wants to do a closed source implementation from the ground up to do so, if I'm reading it correctly, as long as they don't use any of the code from the Reference Implementation. This will satisfy any company that wants to have a closed-source implementation, but not help them out very much. On 8/2/06, Joachim Buechse wrote: > Putting something in the public domain means, that it can be used by > anyone for whatever (s)he thinks is appropriate. The authors define > no restriction regarding it's use. That's how any specification > should be. > > Best regards, > Joachim > > > On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > > > Hi All, > > I don't know anything about licensing issues. > > The below sounds reasonable. If we make this public domain, > > will that be compatible with Sun's JSR? > > Thanks! > > - DL > > P.S. I really don't care what we do, as long as there is > > some sort of collective agreement. > >> Good day, > >> > >> quite frankly I think that this is a very bad idea. This > >> specification > >> (!) should be in the public domain and nowhere else. > >> > >> Defining a spec under the (L)GPL makes absolutely no sense. After all > >> it is a specification not an implementation. There is no or only > >> trivial code attached to it. So while nothing can be gained by > >> putting it under the LGPL, a lot can be lost - for example the > >> contribution of companies that do not like to open source their > >> implementations. > >> > >> Furthermore you are plain wrong assuming you will be the copyright > >> holder to additions made by other people. > >> > >> Best regards, > >> Joachim > >> > >> > >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> > >>> Hi All, > >>> Trent and I have been discussing the license issues of the > >>> JSR spec and code that we develop, as a community. > >>> Here is what we have come up with: > >>> > >>>> During the development, the new JSR spec that we derive > >>>> will be > >>>> covered under the LGPL license. Since it is > >>>> just interfaces, any contributions will come back to me, for > >>>> inclusion > >>>> into the specification. The goal is to provide a detailed set of > >>>> interfaces that > >>>> document the present state of our reference model. I am using > >>>> the RXTX as the reference model. If there is something missing > >>>> from > >>>> the reference model, or if the reference model has something that > >>>> should > >>>> not be there, we will need to discuss it. > >>>> > >>>> After Sun accepts the JSR, I, as the copyright holder, can issue > >>>> a version with a JSR compatible license. > >>>> > >>>> The goal is to migrate the interfaces into javax.comm. > >>> > >>> Does this sound like a reasonable plan to everyone? > >>> > >>> Thanks! > >>> - Doug > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From naranjo.manuel at gmail.com Wed Aug 2 09:03:02 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 12:03:02 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> References: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> Message-ID: <44D0BEA6.2040408@gmail.com> Or even better, you can use Apache v2, which allows both Open Source and Closed Source forms ;-) > You may want to consider making it available under two separate licenses. > > 1 - LGPL as it is today > > The LGPL can be used by anyone wanting to extend the current > functionality, as long as they provide code for anything they change. > > 2 - Sun Community Source License (SCSL) > http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf > > The SCSL will allow anyone who wants to do a closed source > implementation from the ground up to do so, if I'm reading it > correctly, as long as they don't use any of the code from the > Reference Implementation. This will satisfy any company that wants to > have a closed-source implementation, but not help them out very much. > > On 8/2/06, Joachim Buechse wrote: > >> Putting something in the public domain means, that it can be used by >> anyone for whatever (s)he thinks is appropriate. The authors define >> no restriction regarding it's use. That's how any specification >> should be. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This >>>> specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> Joachim >>>> >>>> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing >>>>>> from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 09:46:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 17:46:25 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> I assume that javax.comm/RXTX is to be redefined using Interfaces. In this case we should separate 2 things: 1) The specification and it's incarnation in the form of java classes defining the interfaces. 2) The actual implementation of the functionality. It is possible that 1) may contain some trivial code in abstract or none abstract classes (ie PortFactory, PortRegistry, etc). Doug's original question was regarding 1) - unless I misunderstood. I personally think that 1) should be in the public domain. It should not be covered by any restrictions what-so-ever. Let it be free as in "totally free in any respect". I do not care under which license 2) is released. Why? Because it is in my very interest that all/almost all vendors include implementations with their distributions. Which will only happen if they do not need to respect open source licenses. (javax.comm is not nearly as important as the Apache web server or MySql, so nobody will take licensing risks). Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ssbello at gmail.com Wed Aug 2 10:28:30 2006 From: ssbello at gmail.com (Simone) Date: Wed, 2 Aug 2006 18:28:30 +0200 Subject: [Rxtx] pocketPC 2003 Message-ID: <39ed505d0608020928k6ceb01aen470c2e6a78c5a6b0@mail.gmail.com> Does anyone know if the Rxtx works on PocketPc 2003? If yes, could you, please, give me some suggestion. Thanks, Simone Bell? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/72e0fb87/attachment-0334.html From berkland at spamcop.net Wed Aug 2 13:00:10 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 15:00:10 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> Message-ID: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> How about these for the "Business Terms" of the new JSR: > The specification will be released in accordance with standard terms > as specified by the JCP process. > > The reference implementation (RI) will be delivered in binary form > free of charge from http://rxtx.org. Licensing details are expected to > be under the Binary Code License (BCL). > > The source for the reference implementation is expected to be > delivered via the Limited GNU Public License (LGPL) and available free > of charge. > > The TCK will be made available free of charge to all J2SE and J2EE licensees. > > The TCK will be offered for license at no charge, without support or > any trademark license rights, to qualified not-for-profit entities > (including not-for-profit) academic institutions) and qualified > individuals engaged in efforts to create compatible implementations of > the Specification. From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 13:13:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 13:13:33 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E495@hqexchange3.dot.state.co.us> Trent, I didn't exactly get it. Again I am not a C guy, maybe its very simple for you but I don't see any checks for FD (as written in the patch for termios.c) in the initialise_event_info_struct, I see some checks in the interruptEventLoop call. Second as you explained I open three("/dev/cuf01","/dev/cuf01","/dev/cuf01") ports, I close the 2nd ("/dev/cuf02", the other 2 are still open) , I never try to open the third ("/dev/cuf03") port again if it is already open. Are you planning to have a fix for this in the next release 2.1.8. Its very important for me to have a fix for this, its causing some major headaches for our project. I know you have your regular job too, I will appreciate any help. Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, August 01, 2006 6:46 PM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java > VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic > frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) C [librxtxSerial.so+0x69b2] > initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] > Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" > [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: > /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread > "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 > JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon > [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" > daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread > "AdapterThread" daemon [_thread_blocked, id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, > id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Wed Aug 2 13:14:20 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 16:14:20 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> Message-ID: <44D0F98C.1070600@gmail.com> +1 Agree > How about these for the "Business Terms" of the new JSR: > > >> The specification will be released in accordance with standard terms >> as specified by the JCP process. >> >> The reference implementation (RI) will be delivered in binary form >> free of charge from http://rxtx.org. Licensing details are expected to >> be under the Binary Code License (BCL). >> >> The source for the reference implementation is expected to be >> delivered via the Limited GNU Public License (LGPL) and available free >> of charge. >> >> The TCK will be made available free of charge to all J2SE and J2EE licensees. >> >> The TCK will be offered for license at no charge, without support or >> any trademark license rights, to qualified not-for-profit entities >> (including not-for-profit) academic institutions) and qualified >> individuals engaged in efforts to create compatible implementations of >> the Specification. >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From savagobr at yahoo.com Wed Aug 2 13:40:42 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:40:42 -0700 (PDT) Subject: [Rxtx] jsr spec and license issues Message-ID: <20060802194042.83599.qmail@web53807.mail.yahoo.com> Friends Apache seems ok... if I get it right, does it *almost* equals to BSD? Regarding public domain: I think that the good people that spent so much time on this library will like to keep some rights over its own work, don't you think? Best regards Savago --------------------------------- Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/79abdfd5/attachment-0334.html From savagobr at yahoo.com Wed Aug 2 13:58:04 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:58:04 -0700 (PDT) Subject: [Rxtx] JVM Crashing Message-ID: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago --------------------------------- Groups are talking. We´re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/47d561ae/attachment-0334.html From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 14:09:18 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 14:09:18 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E4AD@hqexchange3.dot.state.co.us> Thank You :) ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adenilson Cavalcanti Sent: Wednesday, August 02, 2006 1:58 PM To: rxtx at qbang.org Subject: Re: [Rxtx] JVM Crashing Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago ________________________________ Groups are talking. We?re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/b4eb22cf/attachment-0334.html From tjarvi at qbang.org Wed Aug 2 20:23:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 20:23:42 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > Hi Doug As mentioned off the list, the important point in my mind is that everyone is on the same base more than what license is decided upon. These things are just best addressed early so there isn't confusion. The Apache license is fairly standard in the Open Source community vs several of the relatively unknown [and obviously redundat even by their descriptions] offerings by Sun. Perhaps one option here that would kill a few birds with one stone is to dual license the interface as Apache and LGPL. This would allow everyone to use the interfaces without needing to do wastefull work for internal license requirements. Projects could choose between the two the license that best suits their needs. If there is a software shop doing Java that isn't familiar with the Apache license, they must be doing some strange Java. I do think it is foolhearty to blindly travel in public domain but nobody is trying to undermine the spec files. The intent is to use the work for a JSR submission that everyone can use without confusion later on down the line. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 21:01:16 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 20:01:16 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D166FC.9090005@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> Does this sound like a reasonable plan to everyone? >> > > Hi Doug > > As mentioned off the list, the important point in my mind is that everyone > is on the same base more than what license is decided upon. These things > are just best addressed early so there isn't confusion. > > The Apache license is fairly standard in the Open Source community vs > several of the relatively unknown [and obviously redundat even by > their descriptions] offerings by Sun. The JCP is a reasonable process for what the RxTx project intends to achieve by evolving the API. There isn't much to lose by going the JSR route. The community will benefit from a fair API like so many other that have undergone the process. Sun isn't going to own the API or manipulate it into anything weird anymore than anyone else is. I think your fears are rather vague and unfounded. Which isn't to say that I am a well-informed representative of the JCP, I've only sat through one JSR process and we ended up with javax.usb, and IBM got what it wanted out of the deal and the community got a very nice standard. Paul > > Perhaps one option here that would kill a few birds with one stone is to > dual license the interface as Apache and LGPL. This would allow everyone > to use the interfaces without needing to do wastefull work for internal > license requirements. Projects could choose between the two the license > that best suits their needs. If there is a software shop doing Java that > isn't familiar with the Apache license, they must be doing some strange > Java. > > I do think it is foolhearty to blindly travel in public domain but nobody > is trying to undermine the spec files. The intent is to use the work for > a JSR submission that everyone can use without confusion later on down the > line. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Aug 2 22:10:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 22:10:48 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D166FC.9090005@sun.com> References: <44D166FC.9090005@sun.com> Message-ID: On Wed, 2 Aug 2006, Paul Klissner wrote: > Trent Jarvi wrote: >> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> Does this sound like a reasonable plan to everyone? >>> >> >> Hi Doug >> >> As mentioned off the list, the important point in my mind is that everyone >> is on the same base more than what license is decided upon. These things >> are just best addressed early so there isn't confusion. >> >> The Apache license is fairly standard in the Open Source community vs >> several of the relatively unknown [and obviously redundat even by >> their descriptions] offerings by Sun. > > The JCP is a reasonable process for what the RxTx project intends > to achieve by evolving the API. > > There isn't much to lose by going the JSR route. The community will > benefit from a fair API like so many other that have undergone > the process. Sun isn't going to own the API or manipulate it > into anything weird anymore than anyone else is. I think your > fears are rather vague and unfounded. > > Which isn't to say that I am a well-informed representative > of the JCP, I've only sat through one JSR process and we ended > up with javax.usb, and IBM got what it wanted out of the deal > and the community got a very nice standard. > Hi Paul The JCP should work fine. As our intentions are in line, licensing so that everyone can use the interface code should not be a problem. Note that the current default right now is that the interfaces are copyrighted and no license for distribution is included. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 22:33:51 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 21:33:51 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D166FC.9090005@sun.com> Message-ID: <44D17CAF.1090802@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Paul Klissner wrote: > >> Trent Jarvi wrote: >>> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>> Does this sound like a reasonable plan to everyone? >>>> >>> Hi Doug >>> >>> As mentioned off the list, the important point in my mind is that everyone >>> is on the same base more than what license is decided upon. These things >>> are just best addressed early so there isn't confusion. >>> >>> The Apache license is fairly standard in the Open Source community vs >>> several of the relatively unknown [and obviously redundat even by >>> their descriptions] offerings by Sun. >> The JCP is a reasonable process for what the RxTx project intends >> to achieve by evolving the API. >> >> There isn't much to lose by going the JSR route. The community will >> benefit from a fair API like so many other that have undergone >> the process. Sun isn't going to own the API or manipulate it >> into anything weird anymore than anyone else is. I think your >> fears are rather vague and unfounded. >> >> Which isn't to say that I am a well-informed representative >> of the JCP, I've only sat through one JSR process and we ended >> up with javax.usb, and IBM got what it wanted out of the deal >> and the community got a very nice standard. >> > > Hi Paul > > The JCP should work fine. As our intentions are in line, licensing so > that everyone can use the interface code should not be a problem. Sorry, looks like my concerns were unfounded. I haven't been following the threads closely this week, as work got busy with an escalated issue and new project. Sorry about that. > > Note that the current default right now is that the interfaces are > copyrighted and no license for distribution is included. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Aug 3 03:45:56 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 03 Aug 2006 05:45:56 -0400 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: Hi All, I have been waiting a day for things to cool down. Licensing appears to be a hot-button topic. I have no objection to dual license the interfaces as both Apache and LGPL. Some thoughts: Goal: developers wish to work together on a common piece of code that the team needs. It makes sense that the code base they work on should be Apache-licensed. That makes it possible for the team to use and develop common code, even if the end result is LGPL'd as a whole. If we combine licenses, we must follow the terms of both licenses when distributing the combined work. Thus, the dual license contains the super set of terms in the licenses of Apached and LGPL. This should address concern about using Apache-licensed code within LGPL projects due to the FSF's claim that they are incompatible. Here is a draft statement for RXSL: The RXTX Specification Library (RXSL) uses a dual license strategy for the source code. These licenses are the GNU Lesser General Public License (LGPL) and the Apache License. I strongly encourage users to use the LGPL license and participate fully in the free software community. Dual licensing of the RXSL source code provides open and free access to the technology both for the GPL community and for other developers or companies that cannot use the GPL. Dual license is common practice in open source projects like OpenOffice, Perl and Mozilla. Through the combined use of LGPL and Apache license, developers will have a high degree of freedom yet compatibility and interoperability will be preserved. You can freely modify, extend, and improve the RXSL source code. The only question is whether or not you must provide the source code and contribute modifications to the community. The GNU and Apache licenses allow different ranges of flexibility in this regard, but in the end, regardless of the license used, any and all incompatible changes must be published openly. Note that there is the RXTX Reference Model that uses the org.rxtx package, which itself is protected by the LGPL. This may be part of the distribution, however, it can not be redistributed using a different license. Is everybody OK with this? Thanks Trent, great idea! - Doug From joachim at buechse.de Thu Aug 3 04:15:44 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 3 Aug 2006 12:15:44 +0200 Subject: [Rxtx] JVM Crashing In-Reply-To: <20060802195804.70935.qmail@web53812.mail.yahoo.com> References: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Message-ID: <6ABA2AB2-CECE-4C4B-A7D6-0CDF8B9C95A8@buechse.de> I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of > rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jvermillard at archean.fr Thu Aug 3 04:26:48 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Thu, 03 Aug 2006 12:26:48 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <1154600808.16732.18.camel@localhost.localdomain> Hi, I'm a developer of the Apache MINA framework. It's a network application framework which helps users develop high performance and high scalability network applications easily. http://directory.apache.org/subprojects/mina/index.html . I would like to integrate serial connection to the framework (actualy supporting TCP, UDP (broadcast) and in VM communications), but LGPL is an issue for me. An Apache License would be pretty usefull for me and integrate rxtx functionnalities easly. Thanks, Julien Le jeudi 03 ao?t 2006 ? 05:45 -0400, Dr. Douglas Lyon a ?crit : > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/755cca7f/smime-0334.bin From pascal at quies.net Thu Aug 3 04:32:35 2006 From: pascal at quies.net (Pascal S. de Kloe) Date: Thu, 3 Aug 2006 12:32:35 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <200608031232.35838.pascal@quies.net> Hi Doug, The Apache license is unnessesary complex. It puts all kinds of limitations on the usage. Is there a particular reason why people chose this or was it just the familiar name? I agree with Joachim (again) that the specification and the interfaces should be public domain. However, if we realy need a license then have a look at the X11 license because that one is compatible with the GPL and suits our needs: http://www.fsf.org/licensing/licenses/index_html http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3 ---- start: implementation Copyright (C) 2006 Sun Microsystems, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Sun Microsystems shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Sun Microsystems. Java is a trademark of Sun Microsystems, Inc. ---- end Op donderdag 3 augustus 2006 11:45, schreef Dr. Douglas Lyon: > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Aug 3 05:17:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 05:17:07 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154600808.16732.18.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: On Thu, 3 Aug 2006, Julien Vermillard wrote: > Hi, > > I'm a developer of the Apache MINA framework. It's a network application > framework which helps users develop high performance and high > scalability network applications easily. > http://directory.apache.org/subprojects/mina/index.html . I would like > to integrate serial connection to the framework (actualy supporting TCP, > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > An Apache License would be pretty usefull for me and integrate rxtx > functionnalities easly. > > Thanks, > > Julien > Hi Julien The rxtx license itself will not change. This is just the interface. You would be free to implement an rxtx replacement if the LGPL low level code is a problem for you. These licensing details would make it possible to take the interface code instead of needing to recode them for a new project. You are probably confusing the license problems with the GPL not the LGPL though you can share links to concerns off the list if you would like to go through them. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 11:59:48 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 11:59:48 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E516@hqexchange3.dot.state.co.us> Joachim, I think my both problems (JVM crashing & Port Locking) are being caused by the corruption of "Event Info Struct / EIS" I have noticed with in EIS my "FD" and "Closing" value being overwritten. The problem is definitely in SerialImp.c file. I am trying to understand what the code does and try to pin point the problem by trying few other options. I will keep everybody posted. Regards Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Joachim Buechse Sent: Thursday, August 03, 2006 4:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Thu Aug 3 13:50:07 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 14:50:07 -0500 Subject: [Rxtx] slow startup Message-ID: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete From brian at mbari.org Thu Aug 3 14:05:57 2006 From: brian at mbari.org (Brian Schlining) Date: Thu, 3 Aug 2006 13:05:57 -0700 Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> References: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Message-ID: Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B > Greetings, > I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/ > qbang.org). > > In testing things out, I ran the list ports example from the Wiki, > and it seems to take quite a while for the library to initialize? > Like on the order of 30+ seconds or so after startup (and the RXTX > banner prints), and before the application starts running. > > Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then > I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ > terminal server) and I'm wondering if they are not responding properly > and this is causing the slow startup? Or is this a known problem of > some kind, or maybe something on my system is screwy? > > Thanks, > Pete > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/6123f730/attachment-0333.html From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 14:13:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 14:13:47 -0600 Subject: [Rxtx] slow startup Message-ID: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Hi Pete, RXTX does open and close the ports in Windows. Try downloading utility like PORTMON(only for windows) and you can see that whenever you load RXTX it tries to register all the available COMM ports in the system. It is a little slow if you have virtual ports, we use digi as a terminal server, Its going to get worst of you have comm ports in 100's Thanks Pawan Kharbanda ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Brian Schlining Sent: Thursday, August 03, 2006 2:06 PM To: RXTX Developers and Users Subject: Re: [Rxtx] slow startup Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/94fd105d/attachment-0333.html From pete.flugstad at gmail.com Thu Aug 3 14:32:04 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 15:32:04 -0500 Subject: [Rxtx] slow startup In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Message-ID: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> On 8/3/06, Kharbanda, Pawan wrote: > RXTX does open and close the ports in Windows. Try downloading utility > like PORTMON(only for windows) and you can see that whenever you load RXTX > it tries to register all the available COMM ports in the system. It is a > little slow if you have virtual ports, we use digi as a terminal server, Its > going to get worst of you have comm ports in 100's Okay, I can understand that, but from the PORTMON output, it looks like it's opening each port TWICE: 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS ... 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS Also, assuming instead of listing the ports I wanted to just open one, I'm still seeing the 30 second delay, so it's scanning at startup regardless of what the Java code is going to do. Probably necessary, but annoying. I know, I know, contribute patches... :-) Thanks, Pete From tjarvi at qbang.org Thu Aug 3 15:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 15:04:42 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: On Thu, 3 Aug 2006, Pete Flugstad wrote: > On 8/3/06, Kharbanda, Pawan wrote: >> RXTX does open and close the ports in Windows. Try downloading utility >> like PORTMON(only for windows) and you can see that whenever you load RXTX >> it tries to register all the available COMM ports in the system. It is a >> little slow if you have virtual ports, we use digi as a terminal server, Its >> going to get worst of you have comm ports in 100's > > Okay, I can understand that, but from the PORTMON output, it looks > like it's opening each port TWICE: > > 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > ... > 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > > Also, assuming instead of listing the ports I wanted to just open one, > I'm still seeing the 30 second delay, so it's scanning at startup > regardless of what the Java code is going to do. Probably necessary, > but annoying. > > I know, I know, contribute patches... :-) > I think this problem is in RXTXCommDriver.java. I've just not tracked it down but it should be in the java code, not the native code so easy enough to track down. -- Trent Jarvi tjarvi at qbang.org From jvermillard at archean.fr Fri Aug 4 03:43:28 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:43:28 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: <1154684608.6181.4.camel@localhost.localdomain> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > Hi, > > > > I'm a developer of the Apache MINA framework. It's a network application > > framework which helps users develop high performance and high > > scalability network applications easily. > > http://directory.apache.org/subprojects/mina/index.html . I would like > > to integrate serial connection to the framework (actualy supporting TCP, > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > An Apache License would be pretty usefull for me and integrate rxtx > > functionnalities easly. > > > > Thanks, > > > > Julien > > > > Hi Julien > > The rxtx license itself will not change. This is just the interface. > You would be free to implement an rxtx replacement if the LGPL low level > code is a problem for you. These licensing details would make it possible > to take the interface code instead of needing to recode them for a new > project. > > You are probably confusing the license problems with the GPL not the LGPL > though you can share links to concerns off the list if you would like to > go through them. > > -- > Trent Jarvi > tjarvi at qbang.org Hi, I'm not a license expert but some guys at ASF said me you can't call LGPLed libs from java. some peoples interprete that as static linking and not dynamic linking (no idea why). So ASF/BSD licensied interface willl solve the license probleme. If you got some questions about the ASL and the way you can dual license LGPL/ASL you can ask it on legal-discuss at apache.org Julien -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/8d46c0aa/smime-0333.bin From jvermillard at archean.fr Fri Aug 4 03:51:30 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:51:30 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <1154685091.6181.6.camel@localhost.localdomain> erm from java -> from ASLed Java code Le vendredi 04 ao?t 2006 ? 11:43 +0200, Julien Vermillard a ?crit : > Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > Hi, > > I'm not a license expert but some guys at ASF said me you can't call > LGPLed libs from java. some peoples interprete that as static linking > and not dynamic linking (no idea why). So ASF/BSD licensied interface > willl solve the license probleme. > > If you got some questions about the ASL and the way you can dual license > LGPL/ASL you can ask it on legal-discuss at apache.org > > Julien > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dcc29d70/smime-0333.bin From guille at sms.nl Fri Aug 4 04:35:24 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Fri, 04 Aug 2006 12:35:24 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <7.0.1.0.0.20060804123322.036dc748@sms.nl> At 11:43 04/08/2006, Julien Vermillard wrote: >Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > >Hi, > >I'm not a license expert but some guys at ASF said me you can't call >LGPLed libs from java. some peoples interprete that as static linking >and not dynamic linking (no idea why). This interpretation is wrong. See the official position of the FSF regarding the LGPL and Java: http://www.gnu.org/licenses/lgpl-java.html http://www.fsf.org/licensing/licenses/lgpl-java.html Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From hambyiii at hotmail.com Fri Aug 4 04:52:47 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 10:52:47 +0000 Subject: [Rxtx] error getting InputStream Message-ID: Hi, I have written a program in Java for Windows xp using RXTX (which is why I am using this mailing list :). However, I am getting a problem. I am connecting to a serial port, like so: private CommPortIdentifier portID; private boolean openPort(String selectedPort) { boolean portFound = false; Enumeration portList; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portID.getName().equals(selectedPort)) { portFound = true; break; } } } return portFound; } and then I try and get the serial port input stream (leaving out the try and catch for the sake of space): SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); InputStream inputStream = serialPort.getInputStream(); but on the getInputStream() I get the following error message: Bad file descriptor in nativeavailable I cannot figure out where it is going wrong...anyone any ideas. A quick answer would be wonderful, as I am kinda under the hammer to get this fixed quickly Thanks in Advance Keith From tjarvi at qbang.org Fri Aug 4 05:13:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 05:13:19 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <7.0.1.0.0.20060804123322.036dc748@sms.nl> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> <7.0.1.0.0.20060804123322.036dc748@sms.nl> Message-ID: On Fri, 4 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 11:43 04/08/2006, Julien Vermillard wrote: >> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : >>> On Thu, 3 Aug 2006, Julien Vermillard wrote: >>> >>>> Hi, >>>> >>>> I'm a developer of the Apache MINA framework. It's a network application >>>> framework which helps users develop high performance and high >>>> scalability network applications easily. >>>> http://directory.apache.org/subprojects/mina/index.html . I would like >>>> to integrate serial connection to the framework (actualy supporting TCP, >>>> UDP (broadcast) and in VM communications), but LGPL is an issue for me. >>>> >>>> An Apache License would be pretty usefull for me and integrate rxtx >>>> functionnalities easly. >>>> >>>> Thanks, >>>> >>>> Julien >>>> >>> >>> Hi Julien >>> >>> The rxtx license itself will not change. This is just the interface. >>> You would be free to implement an rxtx replacement if the LGPL low level >>> code is a problem for you. These licensing details would make it possible >>> to take the interface code instead of needing to recode them for a new >>> project. >>> >>> You are probably confusing the license problems with the GPL not the LGPL >>> though you can share links to concerns off the list if you would like to >>> go through them. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >> >> Hi, >> >> I'm not a license expert but some guys at ASF said me you can't call >> LGPLed libs from java. some peoples interprete that as static linking >> and not dynamic linking (no idea why). > > This interpretation is wrong. See the official position of the FSF regarding > the LGPL and Java: > > http://www.gnu.org/licenses/lgpl-java.html > > http://www.fsf.org/licensing/licenses/lgpl-java.html > What I do with legal groups that go down that rat hole is give them a copy of the rxtx 2.0 license. Since the confused legal folks are going in a direction that does not represent the intent of the license or authors at that point and are confused about basic things in our industry that most consider facts, the discussions are very short. The rxtx 2.0 license just adds the following and has for 6 years or so. Not because the lawyers are right. They get confused about intent and even facts. The following is added to make confused lawyers that cant understand intent go far away and never come back. period. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. From hambyiii at hotmail.com Fri Aug 4 05:42:21 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 11:42:21 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Okay, I made a little mistake in my last message. The error is not occuring where I thought it was. Instead it is occuring when I do the following: byte[] readBuffer = new byte[128]; try { int numBytes = 0; try { Thread.sleep(500); } catch (InterruptedException e) {} while (inputStream.available() > 0) { numBytes = inputStream.read(readBuffer); } processReceivedData(readBuffer, numBytes); } catch (IOException e) { System.out.println(e.getMessage()); } So I guess the error is happening on the inputStream.read(readBuffer) again, any help is appreciated and again, thanks in advance Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 10:52:47 +0000 > >Hi, > >I have written a program in Java for Windows xp using RXTX (which is why I >am using this mailing list :). However, I am getting a problem. I am >connecting to a serial port, like so: > private CommPortIdentifier portID; > > private boolean openPort(String selectedPort) > { > boolean portFound = false; > Enumeration portList; > > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portID.getName().equals(selectedPort)) > { > portFound = true; > break; > } > } > } > > return portFound; > } > >and then I try and get the serial port input stream (leaving out the try >and >catch for the sake of space): > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >InputStream inputStream = serialPort.getInputStream(); > >but on the getInputStream() I get the following error message: > >Bad file descriptor in nativeavailable > >I cannot figure out where it is going wrong...anyone any ideas. A quick >answer would be wonderful, as I am kinda under the hammer to get this fixed >quickly > >Thanks in Advance >Keith > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From hambyiii at hotmail.com Fri Aug 4 07:08:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:08:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Hi, I know I am replying to myself a lot at the moment, but more information has come to light (These errors are actually happening on a client machine, on software that has worked for the past month, and only now has started to fail, which is why I am a little slow finding things out) The errors I have already written about are only symptoms of an orignal error. The original error occurs the first time I try to WRITE thte OutputStream: OutputStream oStream = serialPort.getOutputStream(); serialPort.notifyOnOutputEmpty(true); byte[] bs = encodeMessage(configString.toString()); oStream.write(bs); oStream.flush(); The error occurs on oStream.write(bs); and is: Input/output error in writeArray Now writeArray is native code, so I have no idea what is going on there. Any help would be appreciated Thanks Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 11:42:21 +0000 > >Okay, I made a little mistake in my last message. > >The error is not occuring where I thought it was. Instead it is occuring >when I do the following: > >byte[] readBuffer = new byte[128]; > >try { > > int numBytes = 0; > try { > Thread.sleep(500); > } > catch (InterruptedException e) > {} > > while (inputStream.available() > 0) > { > numBytes = inputStream.read(readBuffer); > } > > processReceivedData(readBuffer, numBytes); >} >catch (IOException e) >{ > System.out.println(e.getMessage()); >} > >So I guess the error is happening on the inputStream.read(readBuffer) > >again, any help is appreciated and again, thanks in advance >Keith > > >From: "Keith Thorne" > >Reply-To: RXTX Developers and Users > >To: rxtx at qbang.org > >Subject: [Rxtx] error getting InputStream > >Date: Fri, 04 Aug 2006 10:52:47 +0000 > > > >Hi, > > > >I have written a program in Java for Windows xp using RXTX (which is why >I > >am using this mailing list :). However, I am getting a problem. I am > >connecting to a serial port, like so: > > private CommPortIdentifier portID; > > > > private boolean openPort(String selectedPort) > > { > > boolean portFound = false; > > Enumeration portList; > > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > > while (portList.hasMoreElements()) > > { > > portID = (CommPortIdentifier) portList.nextElement(); > > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > > { > > if (portID.getName().equals(selectedPort)) > > { > > portFound = true; > > break; > > } > > } > > } > > > > return portFound; > > } > > > >and then I try and get the serial port input stream (leaving out the try > >and > >catch for the sake of space): > > > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); > >InputStream inputStream = serialPort.getInputStream(); > > > >but on the getInputStream() I get the following error message: > > > >Bad file descriptor in nativeavailable > > > >I cannot figure out where it is going wrong...anyone any ideas. A quick > >answer would be wonderful, as I am kinda under the hammer to get this >fixed > >quickly > > > >Thanks in Advance > >Keith > > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Aug 4 07:26:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: Hi Keith Can you tell us more about the physical serial port? Might it be 'vanishing?' On Fri, 4 Aug 2006, Keith Thorne wrote: > Hi, > > I know I am replying to myself a lot at the moment, but more information has > come to light (These errors are actually happening on a client machine, on > software that has worked for the past month, and only now has started to > fail, which is why I am a little slow finding things out) > > The errors I have already written about are only symptoms of an orignal > error. The original error occurs the first time I try to WRITE thte > OutputStream: > > OutputStream oStream = serialPort.getOutputStream(); > serialPort.notifyOnOutputEmpty(true); > > byte[] bs = encodeMessage(configString.toString()); > > oStream.write(bs); > oStream.flush(); > > The error occurs on oStream.write(bs); and is: > > Input/output error in writeArray > > Now writeArray is native code, so I have no idea what is going on there. Any > help would be appreciated > Thanks > Keith > > >> From: "Keith Thorne" >> Reply-To: RXTX Developers and Users >> To: rxtx at qbang.org >> Subject: Re: [Rxtx] error getting InputStream >> Date: Fri, 04 Aug 2006 11:42:21 +0000 >> >> Okay, I made a little mistake in my last message. >> >> The error is not occuring where I thought it was. Instead it is occuring >> when I do the following: >> >> byte[] readBuffer = new byte[128]; >> >> try { >> >> int numBytes = 0; >> try { >> Thread.sleep(500); >> } >> catch (InterruptedException e) >> {} >> >> while (inputStream.available() > 0) >> { >> numBytes = inputStream.read(readBuffer); >> } >> >> processReceivedData(readBuffer, numBytes); >> } >> catch (IOException e) >> { >> System.out.println(e.getMessage()); >> } >> >> So I guess the error is happening on the inputStream.read(readBuffer) >> >> again, any help is appreciated and again, thanks in advance >> Keith >> >>> From: "Keith Thorne" >>> Reply-To: RXTX Developers and Users >>> To: rxtx at qbang.org >>> Subject: [Rxtx] error getting InputStream >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 >>> >>> Hi, >>> >>> I have written a program in Java for Windows xp using RXTX (which is why >> I >>> am using this mailing list :). However, I am getting a problem. I am >>> connecting to a serial port, like so: >>> private CommPortIdentifier portID; >>> >>> private boolean openPort(String selectedPort) >>> { >>> boolean portFound = false; >>> Enumeration portList; >>> >>> portList = CommPortIdentifier.getPortIdentifiers(); >>> >>> while (portList.hasMoreElements()) >>> { >>> portID = (CommPortIdentifier) portList.nextElement(); >>> if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) >>> { >>> if (portID.getName().equals(selectedPort)) >>> { >>> portFound = true; >>> break; >>> } >>> } >>> } >>> >>> return portFound; >>> } >>> >>> and then I try and get the serial port input stream (leaving out the try >>> and >>> catch for the sake of space): >>> >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >>> InputStream inputStream = serialPort.getInputStream(); >>> >>> but on the getInputStream() I get the following error message: >>> >>> Bad file descriptor in nativeavailable >>> >>> I cannot figure out where it is going wrong...anyone any ideas. A quick >>> answer would be wonderful, as I am kinda under the hammer to get this >> fixed >>> quickly >>> >>> Thanks in Advance >>> Keith >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From hambyiii at hotmail.com Fri Aug 4 07:52:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:52:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more information >has > > come to light (These errors are actually happening on a client machine, >on > > software that has worked for the past month, and only now has started to > > fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an orignal > > error. The original error occurs the first time I try to WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); > >> } > >> catch (IOException e) > >> { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance > >> Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I am > >>> connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Fri Aug 4 08:21:07 2006 From: gergg at cox.net (Gregg Wonderly) Date: Fri, 04 Aug 2006 09:21:07 -0500 Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: <44D357D3.40303@cox.net> Keith Thorne wrote: > Okay, I made a little mistake in my last message. > > The error is not occuring where I thought it was. Instead it is occuring > when I do the following: > > byte[] readBuffer = new byte[128]; > > try { > > } > catch (IOException e) > { > System.out.println(e.getMessage()); > } > > So I guess the error is happening on the inputStream.read(readBuffer) This is one of the most frustrating things to see over and over. The exception tells you exactly which line the error is occuring on, if you will use it to see where. In Java, these days, every class should do the following. import java.util.logging.*; public class MyClass { Logger log = Logger.getLogger( getClass().getName() ); ...in some method... { String data = ...; // any extra data like addresses or // ports which might be wrong and // cause an exception. try { ... } catch( SomeException ex ) { log.log( Level.SEVERE, ex.toString()+": "+data, ex ); } } } By default, you will see all of the appropriate details of any exception logged at the WARNING or SEVERE level. You can read the javadocs about logging to get more information too. Once you do this, people can then turn up logging and get more information, or otherwise manage it with a logging configuration file or other tools such as JMX or my http://logman.dev.java.net project. Gregg Wonderly From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 09:15:24 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 09:15:24 -0600 Subject: [Rxtx] error getting InputStream Message-ID: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Keith, Please send the full stack trace of the exception, may be I can help you. On Trent's question regarding physical 'Serial Port', do you mean you have a USB(Connected to Client Machine) to 9 Pin Serial cable(Connected to H/W device)? Also please mention which java version you are using? Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Keith Thorne Sent: Friday, August 04, 2006 7:52 AM To: rxtx at qbang.org Subject: Re: [Rxtx] error getting InputStream The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more > > information >has > > come to light (These errors are actually happening on a client > > machine, >on > > software that has worked for the past month, and only now has > > started to fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an > > orignal error. The original error occurs the first time I try to > > WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); } catch (IOException > >> e) { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the > >> inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which > >>> is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I > >>> am connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out > >>> the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get > >>> this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 14:36:16 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 14:36:16 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Trent, As discussed over the phone yesterday, I am emailing you all the details of the bugs I have been experiencing. We do not use Serial Ports like most of the applications. Our application uses approx 80 -100 serial ports (attached thru Digi boxes) which are opened and closed every 20 sec to 1 minute depending upon the type of device. Some Serial ports are left opened all the time and receive event based serial calls while other devices uses polling (request and reply) to collect data. So the opening and closing of the Serial Ports is not really in a sequential order as you mentioned in our conversation yesterday. Also 2 same serial ports can never be opened at one time we have business locks to prevent that from happening. Our findings so far (of course with the help of RXTX user group): The real culprit is in the SerialImp.c file, somehow the other the Event Info Structure in the Linked List gets damaged and loses references to the original EIS structure. I believe both the problems are caused because of the corruption of EIS packet. I have noticed that the link list traversal of EIS in the following methods under SerialImp.c : 1)initialise_event_info_struct 2)finalize_event_info_struct 3)interruptEventLoop So culprit code might be in one of these methods. I am currently using JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and Fedora Core 5). I am also attaching a Test Class to replicate the problem. You need to modify the class and add your systems Serial ports into the code and execute. java TestOpenClosePort 100 It will open and close all the serial ports 100 times in there own thread. Please let me know, I will be available thru out this weekend and can help you as much as I can with testing. Regards Pawan Kharbanda CDOT-ITS 303-478-2991 (cell) 303-985-4350 (home) -------------- next part -------------- A non-text attachment was scrubbed... Name: TestOpenClosePort.java Type: application/octet-stream Size: 6139 bytes Desc: TestOpenClosePort.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dd3754d9/TestOpenClosePort-0332.obj From tjarvi at qbang.org Fri Aug 4 15:43:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 15:43:09 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: Thanks, I'll look at it tomorrow morning. I don't know when I'll find the solution but you may check email tomorrow afternoon to see if I think I found it. On Fri, 4 Aug 2006, Kharbanda, Pawan wrote: > Trent, > As discussed over the phone yesterday, I am emailing you all the > details of the bugs I have been experiencing. We do not use Serial Ports > like most of the applications. Our application uses approx 80 -100 > serial ports (attached thru Digi boxes) which are opened and closed > every 20 sec to 1 minute depending upon the type of device. Some Serial > ports are left opened all the time and receive event based serial calls > while other devices uses polling (request and reply) to collect data. So > the opening and closing of the Serial Ports is not really in a > sequential order as you mentioned in our conversation yesterday. Also 2 > same serial ports can never be opened at one time we have business locks > to prevent that from happening. > > Our findings so far (of course with the help of RXTX user group): > > The real culprit is in the SerialImp.c file, somehow the other the Event > Info Structure in the Linked List gets damaged and loses references to > the original EIS structure. I believe both the problems are caused > because of the corruption of EIS packet. I have noticed that the link > list traversal of EIS in the following methods under SerialImp.c : > > 1)initialise_event_info_struct > 2)finalize_event_info_struct > 3)interruptEventLoop > > So culprit code might be in one of these methods. I am currently using > JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and > Fedora Core 5). > > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > > Regards > Pawan Kharbanda > CDOT-ITS > 303-478-2991 (cell) > 303-985-4350 (home) > > > > > > > > > > From tjarvi at qbang.org Sat Aug 5 12:32:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:32:40 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:34:27 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:34:27 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> You need to run it few times. More the number of ports, more frequently you can reproduce. With just 2 ports it will be hard to reproduce frequently. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:33 PM To: Kharbanda, Pawan Cc: tjarvi at qbang.org; RXTX Developers and Users Subject: Re: Port Locking / JVM Crashing > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Aug 5 12:52:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:52:26 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> Message-ID: Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more frequently > you can reproduce. With just 2 ports it will be hard to reproduce > frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:57:49 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:57:49 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Trent, I have 5 ports of Digi and I can reproduce almost every time. Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX version -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:52 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more > frequently you can reproduce. With just 2 ports it will be hard to > reproduce frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need >> to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From tjarvi at qbang.org Sat Aug 5 13:06:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:06:07 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Message-ID: You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few thousand > iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:07:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:07:33 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E659@hqexchange3.dot.state.co.us> We use our own locks but I haven't turned off the RXTX locks. I am still using the RXTX locks that might be the difference. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:13:22 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:13:22 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Trent, How can you turn off the lock files? I can try using that. I never tried that, I thought you can't turn off the file locking. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From tjarvi at qbang.org Sat Aug 5 13:18:53 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:18:53 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Message-ID: Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java > -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except lockfiles > are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:31:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:31:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Trent, I am able to constantly replicate almost everytime even when I have locks disabled. Don't know the reason why you are not able to on your environment. Any suggestions??????? Cycle No (Thread ::: /dev/cuf04) ::::::: 7 Cycle No (Thread ::: /dev/cuf01) ::::::: 7 Cycle No (Thread ::: /dev/cuf02) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) Exiting Thread ::: /dev/cuf03 Cycle No (Thread ::: /dev/cuf03) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent Port /dev/cuf01 is Opened 0x01 Sent Port /dev/cub01 is Opened 0x01 Sent Port /dev/cuf01 is Closed Port /dev/cuf02 is Closed Port /dev/cuf03 is Closed Port /dev/cuf04 is Closed Port /dev/cub01 is Closed Exiting Thread ::: /dev/cuf03 Exiting Thread ::: /dev/cuf02 Cycle No (Thread ::: /dev/cuf03) ::::::: 8 Cycle No (Thread ::: /dev/cuf02) ::::::: 8 Exiting Thread ::: /dev/cuf04 Exiting Thread ::: /dev/cuf01 Cycle No (Thread ::: /dev/cuf01) ::::::: 8 Cycle No (Thread ::: /dev/cuf04) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened 0x01 Sent Port /dev/cuf01 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 # # An error report file with more information is saved as hs_err_pid21386.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:19 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) > 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux > java -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except > lockfiles are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code >>>> and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm >>> running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From tjarvi at qbang.org Sat Aug 5 14:14:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 14:14:49 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: I'd stick a couple $15 dual port serial boards in the machine to see if its kernel driver specific. I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more problematic. They do not get the same number of eyes looking for problems. You could try putting #undef TIOCSERGETLSR #undef TIOCGICOUNT in the very top of SerialImp.h or one or the other to flip bits of code off and on. The kernel here is 2.6.11.4-20a-smp from Suse. glibc is 2.3.4-23.4 from Suse the jre is 1.5.0_06-b05 from Sun. The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC ram. You should be able to reproduce what I'm seeing then go from there. I don't think I'm going to see this problem without having the same cornercase hardware you have. Maybe we can work that out off the list but I doubt I'm going to find it in rxtx at this point. I have seen problems in the past were kernel structs don't match user space struct and bad things happen but I was including a kernel struct to get functionality that had not made its way into user space at the time. The only thing I may be missing is that when I write 0x01 out the port, nothing comes back. That was not specified but you could easily disconnect anything connected to the ports to see if that changes anything. rxtx is far from bug free but I do not see anything yet. On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I am able to constantly replicate almost everytime even when I have > locks disabled. Don't know the reason why you are not able to on your > environment. Any suggestions??????? > > > Cycle No (Thread ::: /dev/cuf04) ::::::: 7 > Cycle No (Thread ::: /dev/cuf01) ::::::: 7 > Cycle No (Thread ::: /dev/cuf02) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > Exiting Thread ::: /dev/cuf03 > Cycle No (Thread ::: /dev/cuf03) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > Port /dev/cuf01 is Opened > 0x01 Sent > Port /dev/cub01 is Opened > 0x01 Sent > Port /dev/cuf01 is Closed > Port /dev/cuf02 is Closed > Port /dev/cuf03 is Closed > Port /dev/cuf04 is Closed > Port /dev/cub01 is Closed > Exiting Thread ::: /dev/cuf03 > Exiting Thread ::: /dev/cuf02 > Cycle No (Thread ::: /dev/cuf03) ::::::: 8 > Cycle No (Thread ::: /dev/cuf02) ::::::: 8 > Exiting Thread ::: /dev/cuf04 > Exiting Thread ::: /dev/cuf01 > Cycle No (Thread ::: /dev/cuf01) ::::::: 8 > Cycle No (Thread ::: /dev/cuf04) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > 0x01 Sent > Port /dev/cuf01 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 > # > # An error report file with more information is saved as > hs_err_pid21386.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > Aborted > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:19 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Lockfiles are a compile time option. I've turned them on now, corrected > a mistake resulting in only 3 ports being used and now have it going > through a few hundred iterations again without a crash. > > To disable lockfiles.. > > ./configure --disable-lockfiles && make install > > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > Port /dev/ttyS5 is Closed > Exiting Thread ::: /dev/ttyS1 > Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: > /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting > Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port > /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS1 is Closed > Port /dev/ttyS4 is Closed > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > > > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, How can you turn off the lock files? I can try using that. I >> never tried that, I thought you can't turn off the file locking. >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:06 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> You may try 4 ports instead of 5 to make sure thats not the issue. >> >> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >> 2.6.11.4-20a-smp >> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >> java -version java version "1.5.0_06" >> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >> >> I'm using rxtx 2.1-7 (final) with default configuration except >> lockfiles are disabled. I gathered that you are doing your own > resource locking. >> >> ... >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> ... >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>> version >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:52 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> Whats a few times? I've got 4 ports here and have run it a few >>> thousand iterations. >>> >>> Is that true for you if you run it with just four of your DIGI ports? >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> You need to run it few times. More the number of ports, more >>>> frequently you can reproduce. With just 2 ports it will be hard to >>>> reproduce frequently. >>>> >>>> ~pk >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:33 PM >>>> To: Kharbanda, Pawan >>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>> Subject: Re: Port Locking / JVM Crashing >>>> >>>>> I am also attaching a Test Class to replicate the problem. You need > >>>>> to >>>> >>>>> modify the class and add your systems Serial ports into the code >>>>> and >> >>>>> execute. >>>>> >>>>> java TestOpenClosePort 100 >>>>> >>>>> It will open and close all the serial ports 100 times in there own >>>>> thread. >>>>> >>>>> Please let me know, I will be available thru out this weekend and >>>>> can >>> >>>>> help you as much as I can with testing. >>>>> >>>> >>>> How reproducable is the problem with the above testcase? I'm >>>> running >> >>>> 100's of iterations without reproducing the problem. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> >>> >> > From rtlane01 at comcast.net Tue Aug 1 19:22:03 2006 From: rtlane01 at comcast.net (Randall T. Lane) Date: Tue, 01 Aug 2006 21:22:03 -0400 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] Message-ID: <44CFFE3B.90001@comcast.net> Rxtx Community: Please see my e-mail to Trent. Does anyone have any experience using rxtx to successfully communicate with hardware via USB? Thanks. Randy Lane -------------- next part -------------- An embedded message was scrubbed... From: Trent Jarvi Subject: Re: Help with RxTx for USB Communication Date: Tue, 1 Aug 2006 18:49:13 -0600 (MDT) Size: 3300 Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060801/9bbbc255/HelpwithRxTxforUSBCommunication-0330.mht From naranjo.manuel at gmail.com Sun Aug 6 16:59:28 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Sun, 06 Aug 2006 19:59:28 -0300 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44CFFE3B.90001@comcast.net> References: <44CFFE3B.90001@comcast.net> Message-ID: <44D67450.8010100@gmail.com> Randy: I have been able to communicate to AIRcable USB Bluetooth Dongle, with success. I'm not sure which are the options that you have to send to RXTX library, but you can indeed. Check that you do not have the port avaible for much long. I have heard of a problem with WinXP that it simply turn off virtual ports when they are too much long with out activity. If you want I can send you my code, because it is avaible under GPL, the new release is not avaible at AIRcable web site, but it should in short time. Regards, Manu > Rxtx Community: > > Please see my e-mail to Trent. Does anyone have any experience using > rxtx to successfully communicate with hardware via USB? > > Thanks. > > Randy Lane > > ------------------------------------------------------------------------ > > Asunto: > Re: Help with RxTx for USB Communication > De: > Trent Jarvi > Fecha: > Tue, 1 Aug 2006 18:49:13 -0600 (MDT) > Para: > "Randall T. Lane" > > Para: > "Randall T. Lane" > CC: > taj at www.linux.org.uk > > > On Tue, 1 Aug 2006, Randall T. Lane wrote: > >> Trent, >> >> I am working on a project written in Java (1.5) and need to >> communicate to an external device via a USB port. >> >> I have downloaded rxtx-2.1-7-bins-r2.zip from www.rxtx.org and setup >> a Java test project to learn how to use rxtx. I am able to list the >> serial ports available, however rxtx does not recognize my USB port. >> I am running on Windows XP. Here is some output from my test project >> ... >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> COM1 - Serial >> COM3 - Serial >> LPT1 - Parallel >> >> I would appreciate any help you could provide in getting rxtx to >> allow me to communicate via my USB port. >> >> Here is my code, if that would help. >> >> public static void main(String[] args) { >> listPorts(); >> // The listPorts() and getPortTypeName() methods are used for >> port identification. >> static void listPorts() >> { >> Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); >> while ( portEnum.hasMoreElements() ) >> { >> CommPortIdentifier portIdentifier = (CommPortIdentifier) >> portEnum.nextElement(); >> System.out.println(portIdentifier.getName() + " - " + >> getPortTypeName(portIdentifier.getPortType()) ); >> } } >> static String getPortTypeName ( int portType ) >> { >> switch ( portType ) >> { >> case CommPortIdentifier.PORT_I2C: >> return "I2C"; >> case CommPortIdentifier.PORT_PARALLEL: >> return "Parallel"; >> case CommPortIdentifier.PORT_RAW: >> return "Raw"; >> case CommPortIdentifier.PORT_RS485: >> return "RS485"; >> case CommPortIdentifier.PORT_SERIAL: >> return "Serial"; >> default: >> return "unknown type"; >> } >> } >> >> Thanks. >> >> Randy Lane >> > > Hi Randy > > The rxtx mail list is a better place to ask as there are more eyes. > I'm swamped with work. > > Be sure to look to see that your serial port dongle shows up as a > serial port in device manager and no other applications have it open. > USB serial dongles do work with rxtx. Some are less complete than > others. > > -- > Trent Jarvi > tjarvi at qbang.org > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From eddythejekyll at gmail.com Sun Aug 6 23:31:45 2006 From: eddythejekyll at gmail.com (Ed) Date: Sun, 6 Aug 2006 23:31:45 -0600 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? Message-ID: I have written a simple client server (RMI) application without using RxTx where the server controls a parallel port simply by addressing the port and banging the bits in order to drive a relay. It also reads the port's. I am doing this by making Runtime.exec calls to a binary that actually does the parallel port bit banging and reading. However, I'd like to use RxTx so it is a pure Java application, and I've so far installed and figured out how to discover the ports, but I'm having trouble finding good examples or some howto type documentation for this. I did find the two examples on the Wiki: one for serial IO and the other to discover the ports on a system. As I said, I have so far installed RxTx and gotten it to compile and run and I can identify the ports. When I run the server I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found Ports! Found port COM1 Found port COM3 Found port LPT1 LPT1 Not Currently owned EASSwitch Server starting. EASSwitch is bound. Server Ready. So it looks like thing are installed and working, but I feel all dressed up and no idea how to proceed. Basically, I just want to be able to toggle the data lines on the parallel port and read them. Very simple. No parallel printer type usage. Are there any examples I can work off of? If so, please advise. Thank you. -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060806/c7e39898/attachment-0330.html From hambyiii at hotmail.com Sun Aug 6 23:53:54 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Mon, 07 Aug 2006 05:53:54 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Message-ID: Hi, sorry I took the weekend to reply, but I was away for the last couple of days. Unfortunately I cannot send the full stack trace yet. The problem is not, unfortunately, happening on my computer, but on a clients computer, which I will go and visit today. I will hopefully be able to get a stack trace then. As to the physical connection, tt is indeed a USB from the computer, connected to a 9 pin serial device that connects to the hard-ware. My java version is 1.5.06 >From: "Kharbanda, Pawan" >Reply-To: RXTX Developers and Users >To: "RXTX Developers and Users" >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 09:15:24 -0600 > >Keith, > Please send the full stack trace of the exception, may be I can help >you. On Trent's question regarding physical 'Serial Port', do you mean >you have a USB(Connected to Client Machine) to 9 Pin Serial >cable(Connected to H/W device)? > >Also please mention which java version you are using? > >Thanks >Pawan Kharbanda > > >-----Original Message----- >From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >Of Keith Thorne >Sent: Friday, August 04, 2006 7:52 AM >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream > >The physical serial port is actually a USB connection that is then >changed to a "virtual serial port", so I can use the serial port >protocols to connect to it. The other end of the connection is a >hardware device that is constantly turned on. I am not sure about the >port 'vanishing'...we have another piece of software that came with the >hardware device, which we can test the device (and with it the virtual >serial port) with. This has no problem connecting to the serial port or >writing to/reading from the device. >It is only when my software is run, that the error occurs. Like I have >said, my software (using rxtx) is connecting to the serial port >successfully, but it is when I try and write to the serial port that I >get the error. > >Although to be truthful, I am not absolutely certain if the error is >happening on the oStream.write() or the oStream.flush(). I only think it >is the write(), because that is where the writeArray() function is >called. > >thanks >Keith > > > >From: Trent Jarvi > >Reply-To: RXTX Developers and Users > >To: RXTX Developers and Users > >Subject: Re: [Rxtx] error getting InputStream > >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > > > > >Hi Keith > > > >Can you tell us more about the physical serial port? Might it be > >'vanishing?' > > > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > > > Hi, > > > > > > I know I am replying to myself a lot at the moment, but more > > > information > >has > > > come to light (These errors are actually happening on a client > > > machine, > >on > > > software that has worked for the past month, and only now has > > > started to fail, which is why I am a little slow finding things out) > > > > > > The errors I have already written about are only symptoms of an > > > orignal error. The original error occurs the first time I try to > > > WRITE thte > > > OutputStream: > > > > > > OutputStream oStream = serialPort.getOutputStream(); > > > serialPort.notifyOnOutputEmpty(true); > > > > > > byte[] bs = encodeMessage(configString.toString()); > > > > > > oStream.write(bs); > > > oStream.flush(); > > > > > > The error occurs on oStream.write(bs); and is: > > > > > > Input/output error in writeArray > > > > > > Now writeArray is native code, so I have no idea what is going on >there. > >Any > > > help would be appreciated > > > Thanks > > > Keith > > > > > > > > >> From: "Keith Thorne" > > >> Reply-To: RXTX Developers and Users > > >> To: rxtx at qbang.org > > >> Subject: Re: [Rxtx] error getting InputStream > > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > > >> > > >> Okay, I made a little mistake in my last message. > > >> > > >> The error is not occuring where I thought it was. Instead it is > >occuring > > >> when I do the following: > > >> > > >> byte[] readBuffer = new byte[128]; > > >> > > >> try { > > >> > > >> int numBytes = 0; > > >> try { > > >> Thread.sleep(500); > > >> } > > >> catch (InterruptedException e) > > >> {} > > >> > > >> while (inputStream.available() > 0) > > >> { > > >> numBytes = inputStream.read(readBuffer); > > >> } > > >> > > >> processReceivedData(readBuffer, numBytes); } catch (IOException > > >> e) { > > >> System.out.println(e.getMessage()); > > >> } > > >> > > >> So I guess the error is happening on the > > >> inputStream.read(readBuffer) > > >> > > >> again, any help is appreciated and again, thanks in advance Keith > > >> > > >>> From: "Keith Thorne" > > >>> Reply-To: RXTX Developers and Users > > >>> To: rxtx at qbang.org > > >>> Subject: [Rxtx] error getting InputStream > > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > > >>> > > >>> Hi, > > >>> > > >>> I have written a program in Java for Windows xp using RXTX (which > > >>> is > >why > > >> I > > >>> am using this mailing list :). However, I am getting a problem. I > > >>> am connecting to a serial port, like so: > > >>> private CommPortIdentifier portID; > > >>> > > >>> private boolean openPort(String selectedPort) > > >>> { > > >>> boolean portFound = false; > > >>> Enumeration portList; > > >>> > > >>> portList = CommPortIdentifier.getPortIdentifiers(); > > >>> > > >>> while (portList.hasMoreElements()) > > >>> { > > >>> portID = (CommPortIdentifier) portList.nextElement(); > > >>> if (portID.getPortType() == > >CommPortIdentifier.PORT_SERIAL) > > >>> { > > >>> if (portID.getName().equals(selectedPort)) > > >>> { > > >>> portFound = true; > > >>> break; > > >>> } > > >>> } > > >>> } > > >>> > > >>> return portFound; > > >>> } > > >>> > > >>> and then I try and get the serial port input stream (leaving out > > >>> the > >try > > >>> and > > >>> catch for the sake of space): > > >>> > > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", > >2000); > > >>> InputStream inputStream = serialPort.getInputStream(); > > >>> > > >>> but on the getInputStream() I get the following error message: > > >>> > > >>> Bad file descriptor in nativeavailable > > >>> > > >>> I cannot figure out where it is going wrong...anyone any ideas. A > >quick > > >>> answer would be wonderful, as I am kinda under the hammer to get > > >>> this > > >> fixed > > >>> quickly > > >>> > > >>> Thanks in Advance > > >>> Keith > > >>> > > >>> > > >>> _______________________________________________ > > >>> Rxtx mailing list > > >>> Rxtx at qbang.org > > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > > >> > > >> > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Aug 7 06:22:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:22:03 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: Hmm.. I left the test running went I went home Saturday. It looks like something did show up after ~30k iterations. I'll look at it more in my free time. Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS5 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 29417 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 29417 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 29417 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00002aab14c2ec63, pid=20573, tid=1095125344 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6c63] initialise_event_info_struct+0x63 # [thread 1087756640 also had an error] Port /dev/ttyS5 is Opened 0x01 Sent [thread 1089861984 also had an error] Port /dev/ttyS4 is Opened 0x01 Sent [thread 1090914656 also had an error] # An error report file with more information is saved as [thread 1090914656 also had an error] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted On Sat, 5 Aug 2006, Trent Jarvi wrote: > > I'd stick a couple $15 dual port serial boards in the machine to see if its > kernel driver specific. > > I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more > problematic. They do not get the same number of eyes looking for problems. > > You could try putting > > #undef TIOCSERGETLSR > #undef TIOCGICOUNT > > in the very top of SerialImp.h or one or the other to flip bits of code off > and on. > > The kernel here is 2.6.11.4-20a-smp from Suse. > glibc is 2.3.4-23.4 from Suse > the jre is 1.5.0_06-b05 from Sun. > > The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC > ram. > > You should be able to reproduce what I'm seeing then go from there. I don't > think I'm going to see this problem without having the same cornercase > hardware you have. Maybe we can work that out off the list but I doubt I'm > going to find it in rxtx at this point. > > I have seen problems in the past were kernel structs don't match user space > struct and bad things happen but I was including a kernel struct to get > functionality that had not made its way into user space at the time. > > The only thing I may be missing is that when I write 0x01 out the port, > nothing comes back. That was not specified but you could easily disconnect > anything connected to the ports to see if that changes anything. > > rxtx is far from bug free but I do not see anything yet. > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, >> I am able to constantly replicate almost everytime even when I have >> locks disabled. Don't know the reason why you are not able to on your >> environment. Any suggestions??????? >> >> >> Cycle No (Thread ::: /dev/cuf04) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> Exiting Thread ::: /dev/cuf03 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> Port /dev/cuf01 is Opened >> 0x01 Sent >> Port /dev/cub01 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Closed >> Port /dev/cuf02 is Closed >> Port /dev/cuf03 is Closed >> Port /dev/cuf04 is Closed >> Port /dev/cub01 is Closed >> Exiting Thread ::: /dev/cuf03 >> Exiting Thread ::: /dev/cuf02 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 8 >> Exiting Thread ::: /dev/cuf04 >> Exiting Thread ::: /dev/cuf01 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf04) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 >> # >> # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 >> # >> # An error report file with more information is saved as >> hs_err_pid21386.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> Aborted >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:19 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Lockfiles are a compile time option. I've turned them on now, corrected >> a mistake resulting in only 3 ports being used and now have it going >> through a few hundred iterations again without a crash. >> >> To disable lockfiles.. >> >> ./configure --disable-lockfiles && make install >> >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> Port /dev/ttyS5 is Closed >> Exiting Thread ::: /dev/ttyS1 >> Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: >> /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting >> Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port >> /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> >> >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, How can you turn off the lock files? I can try using that. I >>> never tried that, I thought you can't turn off the file locking. >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 1:06 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> You may try 4 ports instead of 5 to make sure thats not the issue. >>> >>> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >>> 2.6.11.4-20a-smp >>> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >>> java -version java version "1.5.0_06" >>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >>> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >>> >>> I'm using rxtx 2.1-7 (final) with default configuration except >>> lockfiles are disabled. I gathered that you are doing your own >> resource locking. >>> >>> ... >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> Port /dev/ttyS4 is Closed >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> ... >>> >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>>> version >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:52 PM >>>> To: Kharbanda, Pawan >>>> Cc: Trent Jarvi; RXTX Developers and Users >>>> Subject: RE: Port Locking / JVM Crashing >>>> >>>> >>>> Whats a few times? I've got 4 ports here and have run it a few >>>> thousand iterations. >>>> >>>> Is that true for you if you run it with just four of your DIGI ports? >>>> >>>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>>> >>>>> You need to run it few times. More the number of ports, more >>>>> frequently you can reproduce. With just 2 ports it will be hard to >>>>> reproduce frequently. >>>>> >>>>> ~pk >>>>> >>>>> -----Original Message----- >>>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>>> Sent: Saturday, August 05, 2006 12:33 PM >>>>> To: Kharbanda, Pawan >>>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>>> Subject: Re: Port Locking / JVM Crashing >>>>> >>>>>> I am also attaching a Test Class to replicate the problem. You need >> >>>>>> to >>>>> >>>>>> modify the class and add your systems Serial ports into the code >>>>>> and >>> >>>>>> execute. >>>>>> >>>>>> java TestOpenClosePort 100 >>>>>> >>>>>> It will open and close all the serial ports 100 times in there own >>>>>> thread. >>>>>> >>>>>> Please let me know, I will be available thru out this weekend and >>>>>> can >>>> >>>>>> help you as much as I can with testing. >>>>>> >>>>> >>>>> How reproducable is the problem with the above testcase? I'm >>>>> running >>> >>>>> 100's of iterations without reproducing the problem. >>>>> >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> >>>> >>> >> > From iinjlv01 at gmail.com Mon Aug 7 06:22:07 2006 From: iinjlv01 at gmail.com (J LV) Date: Mon, 7 Aug 2006 14:22:07 +0200 Subject: [Rxtx] Data lost or Slow sampling Message-ID: Hello I am using RXTX to comm with a motion controller using Serial Port and i can write the commands using SerialPort or RXTXPort without problems, but when i try write and read at high sampling rate, for example to know the position and speed at every moment of a trajectory, i obtain a very irregular response times. I am using the most simple algorimth: 1-Write the command "is trajectory finished?" and wait for SerialPortEvent.DATA_AVAILABLE 2-Read the InputStreamReader of serial port while not empty 3-If trajectory finished then stop program, else, continue 4-Read actual time using System.currentTimeMillis() (t0) 5-Write the command "give me position" and wait for SerialPortEvent.DATA_AVAILABLE 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) 7-Read the InputStreamReader of serial port while not empty 8-Save position in Vector or ArrayList and repeat from 1 I don't know if the problem is the RXTX, my program or the motion controller hardware but i have response times from 16 millis to 78 millis at 19200 bauds!. I am using SwingWorked to threading SerialPort reading/writing process. Any idea or similar data leak problem? Thanks for RXTX project and sorry for my badde english! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/909a4cb3/attachment-0330.html From tjarvi at qbang.org Mon Aug 7 06:50:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:50:10 -0600 (MDT) Subject: [Rxtx] Data lost or Slow sampling In-Reply-To: References: Message-ID: On Mon, 7 Aug 2006, J LV wrote: > Hello > > I am using RXTX to comm with a motion controller using Serial Port and i can > write the commands using SerialPort or RXTXPort without problems, but when i > try write and read at high sampling rate, for example to know the position > and speed at every moment of a trajectory, i obtain a very irregular > response times. I am using the most simple algorimth: > 1-Write the command "is trajectory finished?" and wait for > SerialPortEvent.DATA_AVAILABLE > 2-Read the InputStreamReader of serial port while not empty > 3-If trajectory finished then stop program, else, continue > 4-Read actual time using System.currentTimeMillis() (t0) > 5-Write the command "give me position" and wait for > SerialPortEvent.DATA_AVAILABLE > 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) > 7-Read the InputStreamReader of serial port while not empty > 8-Save position in Vector or ArrayList and repeat from 1 > > > I don't know if the problem is the RXTX, my program or the motion controller > hardware but i have response times from 16 millis to 78 millis at 19200 > bauds!. I am using SwingWorked to threading SerialPort reading/writing > process. > > Any idea or similar data leak problem? > > Thanks for RXTX project and sorry for my badde english! > This can be platform dependant. What you may do for a starting point is use a loopback connection and time the same thing at 19200. Write the date, wait for data available, read the data. I would expect from write to data available to take around 10 ms from past experiences. You can experiment with turning on and off buffering in the port settings of the OS, if the OS supports more realtime like interrupts, that could help. You have a java schedual and the kernel schedual. Serial interrupts traditionally have very high priority but modern OSs tend to realize thats not good for GUIs, ... and delay responding to the interrupts. You should be able to have usec response times in a realtime OS. Windows and Linux are not typically setup as realtime OSs. For comparison, the last time I looked which was about 5 years ago, windows NT4 came back with data available in 8 ms and Linux came back in 10 ms. I would be interested in seeing what you get today. -- Trent Jarvi tjarvi at qbang.org From gergg at cox.net Mon Aug 7 09:21:56 2006 From: gergg at cox.net (Gregg Wonderly) Date: Mon, 07 Aug 2006 10:21:56 -0500 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? In-Reply-To: References: Message-ID: <44D75A94.9030205@cox.net> Ed wrote: > Are there any examples I can work off of? If so, please advise. Just read the javax.comm javadocs. You need to take the parallel port and write values to it based on which bits of which lines you want on and off. Gregg Wonderly From pete.flugstad at gmail.com Mon Aug 7 09:36:19 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 7 Aug 2006 10:36:19 -0500 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44D67450.8010100@gmail.com> References: <44CFFE3B.90001@comcast.net> <44D67450.8010100@gmail.com> Message-ID: <84d4a6d50608070836v97e9a29q96e98441ea903ac7@mail.gmail.com> FYI, I'm talking to a USB<->Serial dongle just fine under Windows XP Pro. I did have to install a driver for the thing - Windows XP by default, did not recognize it. Once installed, it just showed up as another COM port, and I've been pushing data over it with no problems. Pete From savagobr at yahoo.com Mon Aug 7 10:13:06 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Mon, 7 Aug 2006 09:13:06 -0700 (PDT) Subject: [Rxtx] Port Locking / JVM Crashing: 2 ports (Serial + usb) Message-ID: <20060807161306.9648.qmail@web53803.mail.yahoo.com> Trent This is curious, since I did reproduced the aformentioned bug using only 2 ports: /dev/ttyS0 and /dev/ttyUSB0. It only need to run for 500 times: $ java -cp . TestOpenClosePort 500 500 Port /dev/ttyS0 is Closed Excpetion ::: Thread ::: /dev/ttyUSB0null Exiting Thread ::: /dev/ttyUSB0 Cycle No (Thread ::: /dev/ttyUSB0) ::::::: 227 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 184 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x203d2044, pid=32368, tid=2986859424 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing) # Problematic frame: # C 0x203d2044 # # An error report file with more information is saved as /tmp/hs_err_pid32368.log # # If you would like to submit a bug report, please visit: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Best regards Savago ps: Test environment $ uname -a Linux localhost.localdomain 2.6.15-1.2054_FC5 #1 Tue Mar 14 15:48:33 EST 2006 i686 i686 i386 GNU/Linux $ java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) $gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.1 20060525 (Red Hat 4.1.1-1) --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/c6ca8094/attachment-0329.html From Pawan.Kharbanda at dot.state.co.us Mon Aug 7 17:23:25 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 7 Aug 2006 17:23:25 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Trent, I think I got the problem fixed after some code changes in the C (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the staging environment (with 10 devices) with real time data and haven't seen a JVM lock/ Port locking since last night. I am going to do further stress testing and will send all my code changes and my findings in next few days. I believe the problem was causing due to the digi drivers and how the Linux kernel talked to it, so after making some code changes and synchronization fixes, I got it to work. I am keeping my fingers crossed :) Thanks for all your help. You have been a great help. Will keep you posted. Cheers ~pk PS : We are going to test my new RXTX changes with the 2.6 Red Hat kernel (currently using 2.4.21-37.ELsmp) too. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 5:08 PM To: Kharbanda, Pawan Subject: RE: Port Locking / JVM Crashing Hi Pawan As mentioned I did reproduce the error but after several hours of cycles. I'm looking at RXTXPort.java and thinking about what may be happening. The error is in the C layer but it may be preventable in the java code. lets say two closes are overlapping or an operation is trying to happen while another port is closing. The structure may be out of sync by the time the code using the structure in another thread gets to the event info struct. So I'm wondering if synchronization in RXTXPort() and close() may help you. A second thing that may help is you can put printf("got here\n"); in each of the lines in initialize event info struct to verify that the problem is in walking the linked list. Thats my suspicion. So a properly timed close() while calling the constructor may be catching rxtx off guard. You can synchronize to test that and it may do away with the problem. From tjarvi at qbang.org Mon Aug 7 18:01:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 18:01:54 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Message-ID: Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do further > stress testing and will send all my code changes and my findings in next > few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to happen > while another port is closing. The structure may be out of sync by the > time the code using the structure in another thread gets to the event > info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may do > away with the problem. > From Pawan.Kharbanda at dot.state.co.us Tue Aug 8 13:49:14 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 8 Aug 2006 13:49:14 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Trent, I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and have absolutely no problem with JVM crashing or Port Locking even after 10000 operations (now I am trying 100,000 :). This is all with the original RXTX 2.1.7 (final) api's without any of my fixes that I have been trying for last 2-3 weeks. I will suggest that we update the INSTALL or Readme file accompnying the RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: 82000685_G 02/02/2006). This should helped everybody using the RXTX API's with RedHat Linux atleast. Regards Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 6:02 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do > further stress testing and will send all my code changes and my > findings in next few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers > crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to > happen while another port is closing. The structure may be out of > sync by the time the code using the structure in another thread gets > to the event info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may > do away with the problem. > From jimo at earthlink.net Wed Aug 9 21:21:00 2006 From: jimo at earthlink.net (Jim Owen) Date: Wed, 9 Aug 2006 20:21:00 -0700 Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat Message-ID: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Hi All, I've run into some difficulties with rxtx that have me baffled and need some help. I have an application that has used earlier versions of rxtx successfully and on a variety of platforms. We recently needed to deploy this application into an environment where we could not utilize lock files. I pulled down the 2.0.7 pre1 source distribution and executed configure with --disable-lockfiles. I then executed make and make install. When I execute the program, as root, I get the following error: ************************************************************************ Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) # Problematic frame: # C 0x00001004 # # An error report file with more information is saved as hs_err_pid20151.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # **************************************************************************** If I execute as a normal user, I get no errors, but no ports listed: (Using an earlier version, I get a serial and parallel port listed.) **************************************************************************** [jim at linuxDev ingenicoApp]$ java VerifyCommBuild Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Some ports appear to have been found, let's try to enumerate them. Complete. **************************************************************************** When I built rxtx, there was a warning given of the following: **************************************************************************** conftest.c: In function 'main': conftest.c:6: warning: incompatible implicit declaration of built-in function 'printf' conftest.c:7: warning: incompatible implicit declaration of built-in function 'exit' WARNING: Kernel include files do not match the current kernel **************************************************************************** uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux JAVA_HOME=/usr/java/j2sdk1.4.2_11 javax.comm.properties: Driver=gnu.io.RXTXCommDriver Here's the code for VerifyCommBuild.java that I'm using to test: **************************************************************************** import javax.comm.*; import java.util.Enumeration; /** * A quick app to check that the javax.comm (Serial) Communications extension has been properly * installed and configured on this machine. * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. */ public class VerifyCommBuild { public static void main(String args[]) { Enumeration ports; System.out.println("Verifying Comm Build Environment"); try { ports = CommPortIdentifier.getPortIdentifiers(); if (ports == null) { System.out.println("No comm ports found!"); return; } System.out.println("Some ports appear to have been found, let's try to enumerate them."); while (ports.hasMoreElements()) { System.out.println("Here is a port [" + ((CommPortIdentifier)ports.nextElement()).getName() + "]"); } } catch (Exception e) { System.out.println("Failed to enumerate ports [" + e.getMessage() + "]"); e.printStackTrace(); } System.out.println("Complete."); } } **************************************************************************** Any suggestions as to what I'm missing? Thanks, Jim Owen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060809/92503a81/attachment-0327.html From tjarvi at qbang.org Thu Aug 10 05:39:36 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 05:39:36 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Message-ID: On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even after > 10000 operations (now I am trying 100,000 :). This is all with the > original RXTX 2.1.7 (final) api's without any of my fixes that I have > been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying the > RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp > and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From oliver.archner at bayceer.uni-bayreuth.de Wed Aug 9 06:13:36 2006 From: oliver.archner at bayceer.uni-bayreuth.de (Oliver Archner) Date: Wed, 09 Aug 2006 14:13:36 +0200 Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() Message-ID: <44D9D170.5020806@bayceer.uni-bayreuth.de> Dear Users, i would like to send a byte to a parallel device. The following piece of code works well but throws an IOException in LPRPort$ParallelOutputStream.write() saying that everything is ok ?! Oliver import java.io.*; import gnu.io.*; public class Test { public static void main(String[] args) { RXTXCommDriver TxPort = new RXTXCommDriver(); ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", CommPortIdentifier.PORT_PARALLEL); OutputStream oStream = null; try { oStream = pPort.getOutputStream(); oStream.write((byte)0x51); } catch (IOException e) { e.printStackTrace(); } finally { try { if (oStream != null) oStream.close(); } catch (IOException e) { e.printStackTrace(); } } } } Output: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Der Vorgang wurde erfolgreich beendet. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at Test.main(Test.java:12) From tjarvi at qbang.org Thu Aug 10 18:12:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 18:12:27 -0600 (MDT) Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() In-Reply-To: <44D9D170.5020806@bayceer.uni-bayreuth.de> References: <44D9D170.5020806@bayceer.uni-bayreuth.de> Message-ID: On Wed, 9 Aug 2006, Oliver Archner wrote: > Dear Users, > > i would like to send a byte to a parallel device. > The following piece of code works well but throws an IOException in > LPRPort$ParallelOutputStream.write() saying that everything is ok ?! > > Oliver > > > import java.io.*; > import gnu.io.*; > > public class Test { > > public static void main(String[] args) { > RXTXCommDriver TxPort = new RXTXCommDriver(); > ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", > CommPortIdentifier.PORT_PARALLEL); > OutputStream oStream = null; > try { > oStream = pPort.getOutputStream(); > oStream.write((byte)0x51); > } catch (IOException e) { > e.printStackTrace(); > } finally { > try { > if (oStream != null) oStream.close(); > } catch (IOException e) { > e.printStackTrace(); > > } > } > > } > } > > Output: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Der Vorgang wurde erfolgreich beendet. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at Test.main(Test.java:12) WriteFile is returning a negative value or 0. I do not know what that exception is saying but it should be an IO Exception. The native code in question is line 405 in ParallelImp.c. If you find the documentation pointing out how the code is wrong, we can fix it. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 08:12:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 09:12:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question Message-ID: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Hello, I'm trying to send data over a serial port using the RXTX libraries. I've got the binaries for Windows XP from qbang.org. On the receiving side, I'm using event notification (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial Ports InputStream. Similarly on the transmist side, I use SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. First question: does this make sense? The code was largely adopted from an existing Windows C++ program and that's more or less how it operated (overlapped io using ReadFile, WriteFile, GetOverlappedResult, Events, etc). Second question: in a small standalone test program I wrote, everything seems to work just fine - whenever SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good chunk of data available (I explicitly set the in/out buffers to 1024 bytes) to read. However, when I pull my "library" into a much larger environment (OSGI framework based, but same JVM/OS/etc), whenever SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a byte or two available. Needless to say, this really kills performance. Everything appears to still operate properly, just really, really slowly. So, has anyone seen this problem before? I haven't dived into the details of RXTX library, and I'm wondering what the mechanism is here? How does the RXTX thread determine when to issue the SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to tweak in RXTX or the JVM to get this to operate more like the small test program? Seems like I want RXTX to call me back _less_ often. Thanks, Pete From tjarvi at qbang.org Fri Aug 11 09:55:23 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 09:55:23 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Hello, > > I'm trying to send data over a serial port using the RXTX > libraries. I've got the binaries for Windows XP from qbang.org. > > On the receiving side, I'm using event notification > (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial > Ports InputStream. Similarly on the transmist side, I use > SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. > > First question: does this make sense? The code was largely adopted > from an existing Windows C++ program and that's more or less how it > operated (overlapped io using ReadFile, WriteFile, > GetOverlappedResult, Events, etc). > > Second question: in a small standalone test program I wrote, > everything seems to work just fine - whenever > SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good > chunk of data available (I explicitly set the in/out buffers to 1024 > bytes) to read. > > However, when I pull my "library" into a much larger environment > (OSGI framework based, but same JVM/OS/etc), whenever > SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a > byte or two available. Needless to say, this really kills > performance. Everything appears to still operate properly, just > really, really slowly. > > So, has anyone seen this problem before? I haven't dived into the > details of RXTX library, and I'm wondering what the mechanism is here? > How does the RXTX thread determine when to issue the > SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to > tweak in RXTX or the JVM to get this to operate more like the small > test program? > Seems like I want RXTX to call me back _less_ often. > Hi Pete RXTX is doing overlapped IO in termios.c. In this file we map the windows functionality to termios (mostly POSIX). From there, we just talk termios to all platforms. What I guess is happening is the eventloop is waiting a specified amount of time. As you application uses more cpu cycles, you observe the difference in behavior. You could go into the C code and change this after looking at the eventLoop() code in serialImp.c and following that to the serial_ioctl() and serial_select() in termios.c Another option is to go into RXTXPort.java and put a sleep in the sendEvent() code. This way you would not have to recompile the native code (not very easy at this point). -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 13:27:36 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:27:36 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > Another option is to go into RXTXPort.java and put a sleep in the > sendEvent() code. This way you would not have to recompile the native > code (not very easy at this point). Are the instructions in the INSTALL file still valid? If so, it wasn't very hard to build it (I already had MinGW installed). Everything seemed to build just fine. Haven't tried to install/use it yet, but it wasn't a big deal (assuming those instructions were correct. Thanks, Pete From pete.flugstad at gmail.com Fri Aug 11 13:42:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:42:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, but there doesn't appear to be a way to select that via RXTX (which appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control is selected). Is there a way I'm not seeing? Thanks, Pete From eddythejekyll at gmail.com Fri Aug 11 15:20:44 2006 From: eddythejekyll at gmail.com (Ed) Date: Fri, 11 Aug 2006 15:20:44 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion Message-ID: I'm trying to read and write a parallel port on a standard (Dell) pc running RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. I'm having problems getting rxtx to return a port enumeration from getPortIdentifiers. I'm using a file PortChooser.java as a test file to get things going. This is from the Java CookBook 2nd edition (Chapter 12). The call // get list of ports available on this particular computer, // by calling static method in CommPortIdentifier. Enumeration pList = CommPortIdentifier.getPortIdentifiers(); returns a null pList; I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and compile without --disable-lockfiles I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ... When I compile with --disable-lockfiles the call to getPortIdentifiers simply returns a null Enumeration. I've read the documention and threads about this issue and I feel like I've tried everything, so at the moment I'm stumped. I can supply any further info that may help. Thanks in advance. Ed -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060811/80c4eeec/attachment-0325.html From tjarvi at qbang.org Fri Aug 11 18:29:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:29:48 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > On 8/11/06, Trent Jarvi wrote: >> Another option is to go into RXTXPort.java and put a sleep in the >> sendEvent() code. This way you would not have to recompile the native >> code (not very easy at this point). > > Are the instructions in the INSTALL file still valid? If so, it > wasn't very hard to build it > (I already had MinGW installed). Everything seemed to build just > fine. Haven't tried to install/use it yet, but it wasn't a big deal > (assuming those instructions were correct. > Hi Pete The instructions are correct. You will want to make sure that the exports worked. If the library does not work properly, then the exports failed. The exports are currently generated with nm, sed and grep in the Makefile which is often commented out. If the def file is old, it will cause problems. You should be good to go then. Look at the serial_select and eventLoop code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:33:32 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:33:32 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > but there doesn't appear to be a way to select that via RXTX (which > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > is selected). > > Is there a way I'm not seeing? > Hi Pete I'm guessing I didn't know the difference. At the time, I really didn't have windows API documentation. I just had some pages I found with altivista/google. Later microsoft made their documentation available on msdn or I learned about it. For rxtx, the calls need to be platform neutral. So if you see how to do each in termios, then we can get it going. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:45:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:45:24 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Fri, 11 Aug 2006, Ed wrote: > I'm trying to read and write a parallel port on a standard (Dell) pc running > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. > > I'm having problems getting rxtx to return a port enumeration from > getPortIdentifiers. I'm using a file > PortChooser.java as a test file to get things going. This is from the Java > CookBook 2nd edition (Chapter 12). The call > > // get list of ports available on this particular computer, > // by calling static method in CommPortIdentifier. > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > returns a null pList; > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and > compile without --disable-lockfiles I get: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > ... > > When I compile with --disable-lockfiles the call to getPortIdentifiers > simply returns a null Enumeration. > > I've read the documention and threads about this issue and I feel like I've > tried everything, so at the moment I'm stumped. > > I can supply any further info that may help. > > Thanks in advance. > > Ed > Hi Ed You may want to check the permissions of /dev/lp*. Also make sure lp or your kernel support for lp is loaded. It should show up in dmesg and lsmod. For my laptop with no printer port enabled in BIOS is see: lp: driver loaded but no devices found in desg |grep lp [] $ ls -l /dev/lp* crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 here root and group lp can read and write. Normal users cannot. Try a simple read as a user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: Permission denied Fix as root [] chmod 666 /dev/lp* [] $ ls -l /dev/lp* crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 Now as user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: No such device or address So this is saying there is no lp0 on my laptop. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:58:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:58:31 -0600 (MDT) Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat In-Reply-To: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> References: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Message-ID: On Wed, 9 Aug 2006, Jim Owen wrote: > Hi All, > > I've run into some difficulties with rxtx that have me baffled and need > some help. > > I have an application that has used earlier versions of rxtx > successfully and on a variety of platforms. We recently needed to deploy > this application into an environment where we could not utilize lock files. > > I pulled down the 2.0.7 pre1 source distribution and executed configure > with --disable-lockfiles. I then executed make and make install. > > When I execute the program, as root, I get the following error: > > ************************************************************************ > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) > # Problematic frame: > # C 0x00001004 > # > # An error report file with more information is saved as hs_err_pid20151.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > **************************************************************************** > > If I execute as a normal user, I get no errors, but no ports listed: > (Using an earlier version, I get a serial and parallel port listed.) > > **************************************************************************** > [jim at linuxDev ingenicoApp]$ java VerifyCommBuild > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Some ports appear to have been found, let's try to enumerate them. > Complete. > **************************************************************************** > > When I built rxtx, there was a warning given of the following: > > **************************************************************************** > conftest.c: In function 'main': > conftest.c:6: warning: incompatible implicit declaration of built-in > function 'printf' > conftest.c:7: warning: incompatible implicit declaration of built-in > function 'exit' > > WARNING: Kernel include files do not match the current kernel > **************************************************************************** > > > uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 > Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux > > JAVA_HOME=/usr/java/j2sdk1.4.2_11 > > javax.comm.properties: Driver=gnu.io.RXTXCommDriver > > Here's the code for VerifyCommBuild.java that I'm using to test: > > > **************************************************************************** > import javax.comm.*; > import java.util.Enumeration; > /** > * A quick app to check that the javax.comm (Serial) Communications > extension has been properly > * installed and configured on this machine. > * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. > */ > public class VerifyCommBuild > { > public static void main(String args[]) > { > Enumeration ports; > System.out.println("Verifying Comm Build Environment"); > try > { > ports = CommPortIdentifier.getPortIdentifiers(); > if (ports == null) > { > System.out.println("No comm ports found!"); > return; > } > System.out.println("Some ports appear to have been found, let's > try to enumerate them."); > while (ports.hasMoreElements()) > { > System.out.println("Here is a port [" + > ((CommPortIdentifier)ports.nextElement()).getName() > + "]"); > } > } catch (Exception e) > { > System.out.println("Failed to enumerate ports [" + > e.getMessage() + "]"); > e.printStackTrace(); > } > System.out.println("Complete."); > } > } > Hi Jim This is a new one to me. Have you tried it on another system. Maybe something isnt sane in your toolchain. -- Trent Jarvi tarvi at qbang.org From eddythejekyll at gmail.com Sat Aug 12 11:45:39 2006 From: eddythejekyll at gmail.com (Ed) Date: Sat, 12 Aug 2006 11:45:39 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Trent, Right after I sent the results indicated below I re-ran the app and it apparently found the parallel port. The difference was that I set the permissions to : /dev: wildcard lp* crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 I'm still not sure how to interpret the dmesg and lsmod before. However I'm thinking that since the user now has permission to access the lp* port, a request to access it loaded the lp and parport modules automatically and allowed me access. Here's the output of lsmod now: ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp lp 5540 0 (autoclean) parport 21608 1 (autoclean) [parport_pc lp] and dmesg: ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp On node 0 totalpages: 161776 lp0: using parport0 (polling). So I think I'm good, and ready to move on the next steps. Thanks Trent! Ed On 8/12/06, Ed wrote: > > Thanks for the reply Trent. > > I'm on a different system today but am trying your suggestons. This is a > debian 3.1r2 system and I'm running jdk 1.5.0_04. > > Take a look below, but I think I have no parallel port support on this > kernel, however I never get the "No such device or address" return from the > cat call as you did so I'm not sure how to interpret the results. > > When I run the test program (PortChooser.java), the getPortIdentifiers > call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is > more than I found on the RedHat system. Incidently --disable-lockfiles has > no effect. > > It looks as though there is no parallel support in this kernel: > falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > On node 0 totalpages: 161776 > falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > > I'm a little confused by the results when I cat to the lp0 device. It > seems from the dmesg output that I don't have parallel printer support, but > when I cat to the lp0 device, I get permission denied if I'm non-root user > and input/output error if I'm root. Apparently this means I have the device, > but no support in the kernel? > > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > ed at falcon:~/src/workspace/EASServer/src$ su > Password: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > > Here's my lp* device permissions. > /dev: > wildcard lp* > crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > If I change it to > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I get: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > falcon:/home/ed/src/workspace/EASServer/src# exit > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > cat: /dev/lp0: Input/output error > ed at falcon:~/src/workspace/EASServer/src$ > > What do you think? Should I recompile the kernel or is it something else? > > By the way, I added the user ed to the lp and uucp groups on this system. > > Thanks again, > > Ed > > On 8/11/06, Trent Jarvi wrote: > > > > On Fri, 11 Aug 2006, Ed wrote: > > > > > I'm trying to read and write a parallel port on a standard (Dell) pc > > running > > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > > gates. > > > > > > I'm having problems getting rxtx to return a port enumeration from > > > getPortIdentifiers. I'm using a file > > > PortChooser.java as a test file to get things going. This is from the > > Java > > > CookBook 2nd edition (Chapter 12). The call > > > > > > // get list of ports available on this particular computer, > > > // by calling static method in CommPortIdentifier. > > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > > > > > returns a null pList; > > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure > > and > > > compile without --disable-lockfiles I get: > > > > > > Stable Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7 > > > Java lib Version = RXTX-2.1-7 > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > ... > > > > > > When I compile with --disable-lockfiles the call to getPortIdentifiers > > > > > simply returns a null Enumeration. > > > > > > I've read the documention and threads about this issue and I feel like > > I've > > > tried everything, so at the moment I'm stumped. > > > > > > I can supply any further info that may help. > > > > > > Thanks in advance. > > > > > > Ed > > > > > > > Hi Ed > > > > You may want to check the permissions of /dev/lp*. Also make sure lp or > > your kernel support for lp is loaded. It should show up in dmesg and > > lsmod. > > > > For my laptop with no printer port enabled in BIOS is see: > > > > lp: driver loaded but no devices found > > > > in desg |grep lp > > > > [] $ ls -l /dev/lp* > > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > here root and group lp can read and write. Normal users cannot. > > > > Try a simple read as a user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > > > > Fix as root > > > > [] chmod 666 /dev/lp* > > [] $ ls -l /dev/lp* > > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > Now as user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: No such device or address > > > > So this is saying there is no lp0 on my laptop. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > > > -- > > Ed > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060812/c2afe1f8/attachment-0324.html From tjarvi at qbang.org Sat Aug 12 14:01:52 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 12 Aug 2006 14:01:52 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Remember that the lp code expects a printer - or something like it. There is a line that specifies the printer is online. If you are doing hobby work, you will need to raise that line or loop it back to something that is raised. If you just try reading a port with no device connected and online, there will be an error while trying to read. This should be addressed in the mail-list archives. On Sat, 12 Aug 2006, Ed wrote: > Trent, > Right after I sent the results indicated below I re-ran the app and it > apparently found the parallel port. The difference was that I set the > permissions to : > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I'm still not sure how to interpret the dmesg and lsmod before. However I'm > thinking that since the user now has permission to access the lp* port, a > request to access it loaded the lp and parport modules automatically and > allowed me access. Here's the output of lsmod now: > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > lp 5540 0 (autoclean) > parport 21608 1 (autoclean) [parport_pc lp] > > and dmesg: > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > On node 0 totalpages: 161776 > lp0: using parport0 (polling). > > So I think I'm good, and ready to move on the next steps. > > Thanks Trent! > > Ed > > > On 8/12/06, Ed wrote: >> >> Thanks for the reply Trent. >> >> I'm on a different system today but am trying your suggestons. This is a >> debian 3.1r2 system and I'm running jdk 1.5.0_04. >> >> Take a look below, but I think I have no parallel port support on this >> kernel, however I never get the "No such device or address" return from the >> cat call as you did so I'm not sure how to interpret the results. >> >> When I run the test program (PortChooser.java), the getPortIdentifiers >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is >> more than I found on the RedHat system. Incidently --disable-lockfiles has >> no effect. >> >> It looks as though there is no parallel support in this kernel: >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp >> On node 0 totalpages: 161776 >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp >> >> I'm a little confused by the results when I cat to the lp0 device. It >> seems from the dmesg output that I don't have parallel printer support, but >> when I cat to the lp0 device, I get permission denied if I'm non-root user >> and input/output error if I'm root. Apparently this means I have the >> device, >> but no support in the kernel? >> >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> >> cat: /dev/lp0: Permission denied >> ed at falcon:~/src/workspace/EASServer/src$ su >> Password: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> >> Here's my lp* device permissions. >> /dev: >> wildcard lp* >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> If I change it to >> /dev: >> wildcard lp* >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> I get: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> falcon:/home/ed/src/workspace/EASServer/src# exit >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> ed at falcon:~/src/workspace/EASServer/src$ >> >> What do you think? Should I recompile the kernel or is it something else? >> >> By the way, I added the user ed to the lp and uucp groups on this system. >> >> Thanks again, >> >> Ed >> >> On 8/11/06, Trent Jarvi wrote: >> > >> > On Fri, 11 Aug 2006, Ed wrote: >> > >> > > I'm trying to read and write a parallel port on a standard (Dell) pc >> > running >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the >> > gates. >> > > >> > > I'm having problems getting rxtx to return a port enumeration from >> > > getPortIdentifiers. I'm using a file >> > > PortChooser.java as a test file to get things going. This is from the >> > Java >> > > CookBook 2nd edition (Chapter 12). The call >> > > >> > > // get list of ports available on this particular computer, >> > > // by calling static method in CommPortIdentifier. >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); >> > > >> > > returns a null pList; >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure >> > and >> > > compile without --disable-lockfiles I get: >> > > >> > > Stable Library >> > > ========================================= >> > > Native lib Version = RXTX-2.1-7 >> > > Java lib Version = RXTX-2.1-7 >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > ... >> > > >> > > When I compile with --disable-lockfiles the call to getPortIdentifiers >> > >> > > simply returns a null Enumeration. >> > > >> > > I've read the documention and threads about this issue and I feel like >> > I've >> > > tried everything, so at the moment I'm stumped. >> > > >> > > I can supply any further info that may help. >> > > >> > > Thanks in advance. >> > > >> > > Ed >> > > >> > >> > Hi Ed >> > >> > You may want to check the permissions of /dev/lp*. Also make sure lp or >> > your kernel support for lp is loaded. It should show up in dmesg and >> > lsmod. >> > >> > For my laptop with no printer port enabled in BIOS is see: >> > >> > lp: driver loaded but no devices found >> > >> > in desg |grep lp >> > >> > [] $ ls -l /dev/lp* >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > here root and group lp can read and write. Normal users cannot. >> > >> > Try a simple read as a user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: Permission denied >> > >> > Fix as root >> > >> > [] chmod 666 /dev/lp* >> > [] $ ls -l /dev/lp* >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > Now as user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: No such device or address >> > >> > So this is saying there is no lp0 on my laptop. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > >> >> >> >> -- >> >> Ed >> > > > > From pete.flugstad at gmail.com Mon Aug 14 07:51:41 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 08:51:41 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: <84d4a6d50608140651h3cb2266ap90c47780abace00@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > On Fri, 11 Aug 2006, Pete Flugstad wrote: > > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > > but there doesn't appear to be a way to select that via RXTX (which > > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > > is selected). > > I'm guessing I didn't know the difference. At the time, I really didn't > have windows API documentation. I just had some pages I found with > altivista/google. Later microsoft made their documentation available on > msdn or I learned about it. > > For rxtx, the calls need to be platform neutral. So if you see how to do > each in termios, then we can get it going. so, RTSCTS_IN/OUT at the COMM API is mapped to HARDWARE_FLOW_CONTROL in the POSIX layer. Which termios.c maps to RTS_CONTROL_HANDSHAKE and fOutxCtsFlow = true. Since termios.c is Windows only anway... Would it work to change the mapping in termios.c to map hardware flow control to RTS_CONTROL_TOGGLE? I just wondering (I'm going to go look, but there's a lot of code in there) if the code does anything special playing with flow control signals? Thanks, Pete From pete.flugstad at gmail.com Mon Aug 14 09:42:48 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 10:42:48 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> On 8/3/06, Trent Jarvi wrote: > On Thu, 3 Aug 2006, Pete Flugstad wrote: > > Okay, I can understand that, but from the PORTMON output, it looks > > like it's opening each port TWICE: > > I think this problem is in RXTXCommDriver.java. I've just not tracked it > down but it should be in the java code, not the native code so easy > enough to track down. Okay, I'm trying to track this down... Looks like the CommPortIdentifier static initializer loads RXTXCommDriver, and then calls RXTXDriver.initialize. But then CommPortIdentifier.getPortIdentifiers does the exact same thing. So that's where the two scans are coming from. I would guess that one or the other can be removed? Probably the one in the CommPortIdentifier.getPortIdentifiers? Doing so removes the 2nd scan. Pete PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) val = System.getProperty("gnu.io.SerialPorts"); Shouldn't the comparison be != null? getProperty returns null if the variable is NOT found, and you only want to assign to val if it IS found, right? Same thing for the parallel port case. End result is the same I guess, since you check for null later, but probably should be fixed. From eddythejekyll at gmail.com Mon Aug 14 11:55:17 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 11:55:17 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: When I try to get the mode with int mode = pPort.getMode(); it returns 0 which isn't any of the valid modes. I tried setting it explicitely with pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced the requested mode in nativeSetSerialPortParams at gnu.io.LPRPort.setLPRMode(Native Method) at gnu.io.LPRPort.setMode(LPRPort.java:87) Except for LPT_MODE_ANY, but the getMode call still failed out with an invalid state. I'm wondering if it's because I don't have the line pulled high like you said. This isn't a printer connected. It's a relay board with pins 2-9 tied to data, and 18-25 to gnd. The rest are open. I looked at a DB25 pinout diagram and I'm not sure which pin I need to tie high, and I looked through the archives, but didn't find a reference to something definitive. Can someone help me with which pin is the "online" pin as Trent mentioned? DB25 spec has ( I hope this formats correctly in this email) BUSY (11), SEL (13) or INIT (16) are candidates, but I'm guessing. Any clues? *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Thanks, Ed On 8/12/06, Trent Jarvi wrote: > > > Remember that the lp code expects a printer - or something like it. There > is a line that specifies the printer is online. If you are doing hobby > work, you will need to raise that line or loop it back to something that > is raised. > > If you just try reading a port with no device connected and online, there > will be an error while trying to read. This should be addressed in the > mail-list archives. > > On Sat, 12 Aug 2006, Ed wrote: > > > Trent, > > Right after I sent the results indicated below I re-ran the app and it > > apparently found the parallel port. The difference was that I set the > > permissions to : > > /dev: > > wildcard lp* > > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > > > I'm still not sure how to interpret the dmesg and lsmod before. However > I'm > > thinking that since the user now has permission to access the lp* port, > a > > request to access it loaded the lp and parport modules automatically and > > allowed me access. Here's the output of lsmod now: > > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > > lp 5540 0 (autoclean) > > parport 21608 1 (autoclean) [parport_pc lp] > > > > and dmesg: > > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > > On node 0 totalpages: 161776 > > lp0: using parport0 (polling). > > > > So I think I'm good, and ready to move on the next steps. > > > > Thanks Trent! > > > > Ed > > > > > > On 8/12/06, Ed wrote: > >> > >> Thanks for the reply Trent. > >> > >> I'm on a different system today but am trying your suggestons. This is > a > >> debian 3.1r2 system and I'm running jdk 1.5.0_04. > >> > >> Take a look below, but I think I have no parallel port support on this > >> kernel, however I never get the "No such device or address" return from > the > >> cat call as you did so I'm not sure how to interpret the results. > >> > >> When I run the test program (PortChooser.java), the getPortIdentifiers > >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this > is > >> more than I found on the RedHat system. Incidently --disable-lockfiles > has > >> no effect. > >> > >> It looks as though there is no parallel support in this kernel: > >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > >> On node 0 totalpages: 161776 > >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > >> > >> I'm a little confused by the results when I cat to the lp0 device. It > >> seems from the dmesg output that I don't have parallel printer support, > but > >> when I cat to the lp0 device, I get permission denied if I'm non-root > user > >> and input/output error if I'm root. Apparently this means I have the > >> device, > >> but no support in the kernel? > >> > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> > >> cat: /dev/lp0: Permission denied > >> ed at falcon:~/src/workspace/EASServer/src$ su > >> Password: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> > >> Here's my lp* device permissions. > >> /dev: > >> wildcard lp* > >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> If I change it to > >> /dev: > >> wildcard lp* > >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> I get: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> falcon:/home/ed/src/workspace/EASServer/src# exit > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> ed at falcon:~/src/workspace/EASServer/src$ > >> > >> What do you think? Should I recompile the kernel or is it something > else? > >> > >> By the way, I added the user ed to the lp and uucp groups on this > system. > >> > >> Thanks again, > >> > >> Ed > >> > >> On 8/11/06, Trent Jarvi wrote: > >> > > >> > On Fri, 11 Aug 2006, Ed wrote: > >> > > >> > > I'm trying to read and write a parallel port on a standard (Dell) > pc > >> > running > >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > >> > gates. > >> > > > >> > > I'm having problems getting rxtx to return a port enumeration from > >> > > getPortIdentifiers. I'm using a file > >> > > PortChooser.java as a test file to get things going. This is from > the > >> > Java > >> > > CookBook 2nd edition (Chapter 12). The call > >> > > > >> > > // get list of ports available on this particular computer, > >> > > // by calling static method in CommPortIdentifier. > >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > >> > > > >> > > returns a null pList; > >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I > configure > >> > and > >> > > compile without --disable-lockfiles I get: > >> > > > >> > > Stable Library > >> > > ========================================= > >> > > Native lib Version = RXTX-2.1-7 > >> > > Java lib Version = RXTX-2.1-7 > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > ... > >> > > > >> > > When I compile with --disable-lockfiles the call to > getPortIdentifiers > >> > > >> > > simply returns a null Enumeration. > >> > > > >> > > I've read the documention and threads about this issue and I feel > like > >> > I've > >> > > tried everything, so at the moment I'm stumped. > >> > > > >> > > I can supply any further info that may help. > >> > > > >> > > Thanks in advance. > >> > > > >> > > Ed > >> > > > >> > > >> > Hi Ed > >> > > >> > You may want to check the permissions of /dev/lp*. Also make sure lp > or > >> > your kernel support for lp is loaded. It should show up in dmesg and > >> > lsmod. > >> > > >> > For my laptop with no printer port enabled in BIOS is see: > >> > > >> > lp: driver loaded but no devices found > >> > > >> > in desg |grep lp > >> > > >> > [] $ ls -l /dev/lp* > >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > here root and group lp can read and write. Normal users cannot. > >> > > >> > Try a simple read as a user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: Permission denied > >> > > >> > Fix as root > >> > > >> > [] chmod 666 /dev/lp* > >> > [] $ ls -l /dev/lp* > >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > Now as user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: No such device or address > >> > > >> > So this is saying there is no lp0 on my laptop. > >> > > >> > -- > >> > Trent Jarvi > >> > tjarvi at qbang.org > >> > > >> > >> > >> > >> -- > >> > >> Ed > >> > > > > > > > > > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/59164078/attachment-0322.html From eddythejekyll at gmail.com Mon Aug 14 14:19:58 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 14:19:58 -0600 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? Message-ID: I'm using the ParallelPort class to drive a relay board. According to Mr. Jarvi, since this board isn't a printer, there will be a read error unless I hold the "printer online" line high in order to make the API think I'm talking to a printer. The problem is, I can't figure out which line is the "printer online". My DB25 spec lists the following: *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Anyone know which one I should tie high? I tried the busy line and it still errored out on the read. Thanks in advance, -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/66cf3c3e/attachment-0322.html From tjarvi at qbang.org Mon Aug 14 18:06:29 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:06:29 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Mon, 14 Aug 2006, Ed wrote: > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > which isn't any of the valid modes. I tried setting it explicitely with > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced > the requested mode in nativeSetSerialPortParams > at gnu.io.LPRPort.setLPRMode(Native Method) > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > invalid state. This is because rxtx only supports the basics. JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } One could program in more support. When I did that I just had a daisy wheel printer to test with and doing any more would have been blind. So that behavior is expected. I'll look to see if the Parallel Complete book mentions which pins you need to raise. If you look in the source code [ParallelImp.c] you can see this code isn't well tested. It has worked for hobby use in the past as I'd guess you are trying to do. But my experience with the code is as is mentioned in the top of the source: /* fear he who enter here. It appears that things have changed. An attempt has been made to put things the way the should be. It compiles and ParallelBlackBox runs. No further guarantees. Well... One.. it will print "Hello World!" on an epson DX 10 printer. you know.. the 10 character per second daisy wheel printer ;) - Trent Jarvi */ That comment is from 1997 or so. Since then some windows support was contributed but it is still very green code. We get about four requests for parallel support a year so its just not a well traveled area. It would be nice to have some documentation for the people trying to hook parallel ports to electronic projects. That appears to be the exclusive use of the Parallel support. The wiki pages are intended to let people share information like this to help each other in their projects as they figure out the details. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Aug 14 18:40:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:40:40 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: > PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): > > if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) > val = System.getProperty("gnu.io.SerialPorts"); > > Shouldn't the comparison be != null? getProperty returns null if the > variable is NOT found, and you only want to assign to val if it IS > found, right? Same thing for the > parallel port case. End result is the same I guess, since you check > for null later, > but probably should be fixed. I think this is just a fallback to the second property. gnu.io.SerialPorts isn't documented but perhaps it is used. It should behave properly as documented in INSTALL. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 14 18:56:55 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 19:56:55 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: <44E11BD7.5030102@gmail.com> Trent Jarvi wrote: >> PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): >> >> if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) >> val = System.getProperty("gnu.io.SerialPorts"); >> > > I think this is just a fallback to the second property. > gnu.io.SerialPorts isn't documented but perhaps it is used. It should > behave properly as documented in INSTALL. Doh - yup, I missed the fact that the property names were different... Pete From berkland at spamcop.net Mon Aug 14 19:58:21 2006 From: berkland at spamcop.net (Doug Berkland) Date: Mon, 14 Aug 2006 21:58:21 -0400 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? In-Reply-To: References: Message-ID: <269e40090608141858g698c2579v8d962deca3f4df53@mail.gmail.com> Based on memory and this page as confirmation, I would say pin 13 is the "Online" pin for SPP (standard parallel port). http://www.quatech.com/support/comm-over-parallel.php On 8/14/06, Ed wrote: > > I'm using the ParallelPort class to drive a relay board. According to Mr. > Jarvi, since this board isn't a printer, there will be a read error unless I > hold the "printer online" line high in order to make the API think I'm > talking to a printer. The problem is, I can't figure out which line is the > "printer online". My DB25 spec lists the following: > > *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and > Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data > Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 > D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select > 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select > In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit > 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 > Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and > Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground > > Anyone know which one I should tie high? I tried the busy line and it > still errored out on the read. > > Thanks in advance, > > -- > Ed > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/842bb770/attachment-0322.html From eddythejekyll at gmail.com Mon Aug 14 20:25:42 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 20:25:42 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Ah, I see. I've seen the caveats about limited Parallel support, but I thought it was mainly about the javax.comm package. The gnu.io is derived from javax.comm package right? That is, is the parallel support in rxtx is a superset of what's in javax.comm? I'm using this not for hobby usage, but for some simple instrumenation and control. If the project mandates it, I'll gladly work on extending the support. In the meantime, I need to get some sanity checks working, and repair my relay board (I smoked the ULN2803 chip, apparently by tying the BUSY (pin 11) to vcc). I guess I'll try the SEL pin next (and a supply of 2803s) with a ~1K pullup. The caveat in the comment block isn't very encouraging (!), but I borrowed an old Epson Stylus Color 600 printer to see what I can do. If I can write out characters to it I'll be happy. Parallel printers aren't easy to find these days. I haven't yet looked at the native source, yet, but I've just imported it into eclipse and I'll surf around a bit. Ed On 8/14/06, Trent Jarvi wrote: > > On Mon, 14 Aug 2006, Ed wrote: > > > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > > which isn't any of the valid modes. I tried setting it explicitely with > > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to > proced > > the requested mode in nativeSetSerialPortParams > > at gnu.io.LPRPort.setLPRMode(Native Method) > > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > > invalid state. > > This is because rxtx only supports the basics. > > JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > jclass jclazz, jint mode) > { > switch(mode) > { > case LPT_MODE_ANY: > break; > case LPT_MODE_SPP: > case LPT_MODE_PS2: > case LPT_MODE_EPP: > case LPT_MODE_ECP: > case LPT_MODE_NIBBLE: > default: > throw_java_exception( env, > UNSUPPORTED_COMM_OPERATION, > "nativeSetSerialPortParams", > "setLPRMode was unable to proced the > requested \ > mode" > ); > } > return(JNI_TRUE); > } > > One could program in more support. When I did that I just had a daisy > wheel printer to test with and doing any more would have been blind. > > So that behavior is expected. I'll look to see if the Parallel Complete > book mentions which pins you need to raise. If you look in the source > code [ParallelImp.c] you can see this code isn't well tested. It has > worked for hobby use in the past as I'd guess you are trying to do. But > my experience with the code is as is mentioned in the top of the source: > > /* > fear he who enter here. It appears that things have changed. An > attempt > has been made to put things the way the should be. > > It compiles and ParallelBlackBox runs. No further guarantees. > > Well... One.. it will print "Hello World!" on an epson DX 10 > printer. > you know.. the 10 character per second daisy wheel printer ;) > > - Trent Jarvi > */ > > That comment is from 1997 or so. > > Since then some windows support was contributed but it is still very green > code. We get about four requests for parallel support a year so its just > not a well traveled area. > > It would be nice to have some documentation for the people trying to hook > parallel ports to electronic projects. That appears to be the exclusive > use of the Parallel support. The wiki pages are intended to let people > share information like this to help each other in their projects as they > figure out the details. > > -- > Trent Jarvi > tjarvi at qbang.org > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/fbb5ddb4/attachment-0322.html From lyon at docjava.com Tue Aug 15 06:06:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 15 Aug 2006 08:06:27 -0400 Subject: [Rxtx] smoking is bad for your health In-Reply-To: References: Message-ID: Hi All, If you are connecting to the parallel port and smoking chips, it is time for extra stuff to buffer the parallel port. You may be want more current, in which case driver transistors are needed, or, if you are using the port as an output only device, you may like to add your own bus transceiver (e.g., 74245), set for output. Do be careful to design this properly; http://www.beyondlogic.org/spp/parallel.htm Some people like to use Octal D-type F.F's with OC outputs, like a 74374, http://upgrade.cntc.ac.kr/data/ttl/74374.html I like this one, as it has the D FF's and can latch the outputs for presentation to slower electronics (like relays). But careful! A relay that needs more current than the family of the device you have selected will look like a short to ground, and you will smoke your bug! And MOBO's do NOT come with the ability to drive any load you like. Check the power specs on your relay and be sure to protect the chip against back EMF with a diode. It is best to smoke test this on a bread board BEFORE hooking it to the computer. And be sure you smoke test the corner points in the ckt for a while, lest it fail in the field. - Doug >Ah, I see. I've seen the caveats about limited >Parallel support, but I thought it was mainly >about the javax.comm package. The >gnu.io is derived from javax.comm >package right? That is, is the parallel support >in rxtx is a superset of what's in javax.comm? > >I'm using this not for hobby usage, but for some >simple instrumenation and control. If the >project mandates it, I'll gladly work on >extending the support. In the meantime, I need >to get some sanity checks working, and repair my >relay board (I smoked the ULN2803 chip, >apparently by tying the BUSY (pin 11) to vcc). I >guess I'll try the SEL pin next (and a supply of >2803s) with a ~1K pullup. > >The caveat in the comment block isn't very >encouraging (!), ?but?I borrowed an old Epson >Stylus Color 600 printer to see what I can do. >?If I can write out characters to it I'll be >happy. Parallel printers aren't easy to find >these days. > > I haven't yet looked at the native source, yet, >but I've just imported it into eclipse and I'll >surf around a bit. > >Ed > >On 8/14/06, Trent Jarvi <tjarvi at qbang.org> wrote: > >On Mon, 14 Aug 2006, Ed wrote: > >> When I try to get the mode with int mode = pPort.getMode(); it returns 0 >> which isn't any of the valid modes. I tried setting it explicitely with >> pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with >> >> gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced >> the requested mode in nativeSetSerialPortParams >> at gnu.io.LPRPort.setLPRMode(Native Method) >> at gnu.io.LPRPort.setMode(LPRPort.java:87) >> >> Except for LPT_MODE_ANY, but the getMode call still failed out with an >> invalid state. > >This is because rxtx only supports the basics. > >JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > ???????jclass jclazz, jint mode) >{ > ???????switch(mode) > ???????{ > ???????????????case LPT_MODE_ANY: > ???????????????????????break; > ???????????????case LPT_MODE_SPP: > ???????????????case LPT_MODE_PS2: > ???????????????case LPT_MODE_EPP: > ???????????????case LPT_MODE_ECP: > ???????????????case LPT_MODE_NIBBLE: > ???????????????default: > ???????????????????????throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, > ???????????????????????????????"nativeSetSerialPortParams", > ???????????????????????????????"setLPRMode was >unable to proced the requested \ > ???????????????????????????????mode" > ???????????????????????); > ???????} > ???????return(JNI_TRUE); >} > >One could program in more support.??When I did that I just had a daisy >wheel printer to test with and doing any more would have been blind. > >So that behavior is expected.??I'll look to see if the Parallel Complete >book mentions which pins you need to raise.??If you look in the source >code [ParallelImp.c] you can see this code isn't well tested.??It has >worked for hobby use in the past as I'd guess you are trying to do.??But >my experience with the code is as is mentioned in the top of the source: > >/* > fear he who enter here.??It appears that things have changed.??An attempt > has been made to put things the way the should be. > > ???????It compiles and ParallelBlackBox runs.??No further guarantees. > > ???????Well... One.. it will print "Hello World!" on an epson DX 10 printer. > ???????you know.. the 10 character per second daisy wheel printer ;) > > ???????- Trent Jarvi >*/ > >That comment is from 1997 or so. > >Since then some windows support was contributed but it is still very green >code.??We get about four requests for parallel support a year so its just >not a well traveled area. > >It would be nice to have some documentation for the people trying to hook >parallel ports to electronic projects.??That appears to be the exclusive >use of the Parallel support.??The wiki pages are intended to let people >share information like this to help each other in their projects as they >figure out the details. > >-- >Trent Jarvi >tjarvi at qbang.org > > > > >-- >Ed > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 15 13:26:16 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 15 Aug 2006 14:26:16 -0500 Subject: [Rxtx] crash with too much memory Message-ID: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded from qbang.org. I'm exercising the RXTX COMM serial interface, both in a small standalone test and with the same code pulled into a large OSGI framework setup. If I use the stock .jar/.dll's, then everything works correctly in both situations. I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 (mingw-special)). If I use my locally built version, then my small test case works just fine, both when run inside Eclipse and when run standalone on the command line. However, when I try and use my locally built .jar/.dll's in the large framework environment, then I get a JVM crash with the attached log. Normally this would lead me to think that I was running out of memory or something in the large environment, and when I try and play with the JVM memory args, some interesting things show up. In our large environment, we have -Xms32M/-Xmx1024M - this appears to be the problem. If I set max to something like 64M, then things work. The cross over point from working to failing seems to be around 32M/110M (works) and 32M/111M (fails). But 128M/128M works while 128M/129M fails. So it seems to have to do with how much memory is actually available, or something like that. The thing that occurs to me is if my GCC is somehow generating something like "near" calls. But when the JVM has a lot of RAM available, it puts the DLL up somehwere in the address space and then the near calls fail - far calls are needed. So, I'm thinking this is probably a difference in the MinGW GCC I'm using and the one that was used to build the stock binaries from qbang, or maybe some command line args were changed? So, I'm hoping someone will have an idea of what's going on here... Thanks, Pete From tjarvi at qbang.org Tue Aug 15 18:54:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 15 Aug 2006 18:54:04 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: On Tue, 15 Aug 2006, Pete Flugstad wrote: > I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded > from qbang.org. > > I'm exercising the RXTX COMM serial interface, both in a small > standalone test and with the same code pulled into a large OSGI > framework setup. > > If I use the stock .jar/.dll's, then everything works correctly in > both situations. > > I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 > (mingw-special)). > > If I use my locally built version, then my small test case works just > fine, both when run inside Eclipse and when run standalone on the > command line. However, when I try and use my locally built > .jar/.dll's in the large framework environment, then I get a JVM crash > with the attached log. > > Normally this would lead me to think that I was running out of memory > or something in the large environment, and when I try and play with > the JVM memory args, some interesting things show up. > > In our large environment, we have -Xms32M/-Xmx1024M - this appears to > be the problem. If I set max to something like 64M, then things work. > The cross over point from working to failing seems to be around > 32M/110M (works) and 32M/111M (fails). > But 128M/128M works while 128M/129M fails. So it seems to have to do > with how much memory is actually available, or something like that. > > The thing that occurs to me is if my GCC is somehow generating > something like "near" calls. But when the JVM has a lot of RAM > available, it puts the DLL up somehwere in the address space and then > the near calls fail - far calls are needed. > > So, I'm thinking this is probably a difference in the MinGW GCC I'm > using and the one that was used to build the stock binaries from > qbang, or maybe some command line args were changed? > > So, I'm hoping someone will have an idea of what's going on here... > Hi Pete The binaries are from the src. They should be reproducable. I did extensive testing of rxtx several years ago using mingw as the compiler. The version was 2.95. I have not changed versions since. There are way too many variables as it is. I have a linux->mingw cross compiler rpm I use for all windows use. If you want a copy of it you can have it. It isn't anything 'special' :) -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Thu Aug 17 11:49:24 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 17 Aug 2006 12:49:24 -0500 Subject: [Rxtx] crash with too much memory In-Reply-To: References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> On 8/15/06, Trent Jarvi wrote: > I did extensive testing of rxtx several years ago using mingw as the > compiler. The version was 2.95. I have not changed versions since. > There are way too many variables as it is. FYI, I believe I've solved this problem by changing how the dll's were built. The original mingw makefile was generating Serial.def, then performing various operations with dlltool and ld. I modified the makefile to create the dll using this page: as a guide. With that, there's no longer any need to deal with Serial.def and the makefile becomes _much_ simpler. This appears to have addressed my problems with crashing. FWIW, GCC 2.95 is _really_ old - you should consider investigating upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is supposed to generate a native binary (i.e. just like MinGW). Thanks, Pete From claretlc at yahoo.com Thu Aug 17 12:34:48 2006 From: claretlc at yahoo.com (Clare Cooley) Date: Thu, 17 Aug 2006 11:34:48 -0700 (PDT) Subject: [Rxtx] parallel port communication Message-ID: <20060817183448.76911.qmail@web53908.mail.yahoo.com> Hi, I'm trying to write a 1 to a bit 15 on a parallel port cable that isn't attached to a printer.(It's a control box for eye-tracking equipment.)I need to do this in Java. I looked at the javax.comm documentation, and it said, "Application programs should not directly create ParallelPortEvent objects." So is there a way to do this with your package? If not, do you have any suggestions of where to look? It really needs to be done in Java. Thanks, Clare Cooley __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From pat at xvalheru.org Thu Aug 17 13:13:52 2006 From: pat at xvalheru.org (pat) Date: Thu, 17 Aug 2006 21:13:52 +0200 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060817190751.M5586@xvalheru.org> Hi there, I've question(s) for you. I need to communicate with scale, I've used the Sun's direver. Now I've switched to Rxtx and the speed of the communication is perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, but the difference between the crash time is 5 second ... . My question is: Is there a stable driver ??? Or what I have to do to have stable enough serial port driver ??? OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. Thanks to all for the help. Pat From tjarvi at qbang.org Fri Aug 18 05:13:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 05:13:42 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> Message-ID: On Thu, 17 Aug 2006, Pete Flugstad wrote: > On 8/15/06, Trent Jarvi wrote: >> I did extensive testing of rxtx several years ago using mingw as the >> compiler. The version was 2.95. I have not changed versions since. >> There are way too many variables as it is. > > FWIW, GCC 2.95 is _really_ old - you should consider investigating > upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is > supposed to generate a native binary (i.e. just like MinGW). > It is really old but also well known like C itself. I have considered upgrading. The ToyBox builds should be gcc 3* cross-compiled. I'm not going to be validating gcc 3* w32 binaries though. It's looking like we will need to focus support on MSFT's toolchain for 64 bit windows support until it is possible for gcc to support w64. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Aug 18 05:32:10 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 07:32:10 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: Hi All, Does anyone know how to produce mac intel binaries on a Fedora Linux box? Thanks! - Doug From tjarvi at qbang.org Fri Aug 18 06:42:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 06:42:05 -0600 (MDT) Subject: [Rxtx] cross compilation for the mac In-Reply-To: References: Message-ID: On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Does anyone know how to produce > mac intel binaries on a Fedora Linux > box? > > Thanks! > - Doug Hi Doug You need to build the cross toolchain which means copying the Darwin/Mac binaries over to fedora. It would be nontrivial but possible. Do the Darwin libraries work with Mac in general? I'm not aware of the licensing issues associated with grabbing Mac binaries. Same with OpenSolaris/Solaris. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Aug 18 08:15:26 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 10:15:26 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> In theory building against Darwin would be sufficient to getting things working on MacOS X. You need to remember that Darwin is the low-level OS, while MacOS X adds the everything else on top. IOKit, which is the I/O API, is available as part of Darwin. The only thing you will need extra are the Java libraries. One thing is that I would recommend that when producing binaries for the Mac, is to ensure they are Universal binaries (PPC+Intel). Andre > > From: Trent Jarvi > Date: 2006/08/18 Fri AM 08:42:05 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] cross compilation for the mac > > On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > > > Hi All, > > Does anyone know how to produce > > mac intel binaries on a Fedora Linux > > box? > > > > Thanks! > > - Doug > > Hi Doug > > You need to build the cross toolchain which means copying the Darwin/Mac > binaries over to fedora. It would be nontrivial but possible. > > Do the Darwin libraries work with Mac in general? I'm not aware of the > licensing issues associated with grabbing Mac binaries. > > Same with OpenSolaris/Solaris. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Aug 18 13:43:16 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 15:43:16 -0400 Subject: [Rxtx] cross compilation for the mac In-Reply-To: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: >In theory building against Darwin would be sufficient to getting >things working on MacOS X. You need to remember that Darwin is the >low-level OS, while MacOS X adds the everything else on top. IOKit, >which is the I/O API, is available as part of Darwin. The only thing >you will need extra are the Java libraries. > >One thing is that I would recommend that when producing binaries for >the Mac, is to ensure they are Universal binaries (PPC+Intel). > >Andre I find the xcode ide for generating a mix of universal binaries and java very difficult to make work. Is there a way to do this with make files? Thanks! - Doug From ajmas at sympatico.ca Fri Aug 18 13:54:55 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 15:54:55 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818195455.PGAP29052.tomts13-srv.bellnexxia.net@smtp1.sympatico.ca> It should be doable. XCode hands off the compilation process to gcc et al, for the compilation of C/C++ code and to javac et al. for the Java side. While ant is the favoured tool for 'automated' Java compilation, make can easily be used. All is needed is someone to volounteer to do the work. Andre "Dr. Douglas Lyon" wrote > > >In theory building against Darwin would be sufficient to getting > >things working on MacOS X. You need to remember that Darwin is the > >low-level OS, while MacOS X adds the everything else on top. IOKit, > >which is the I/O API, is available as part of Darwin. The only thing > >you will need extra are the Java libraries. > > > >One thing is that I would recommend that when producing binaries for > >the Mac, is to ensure they are Universal binaries (PPC+Intel). > > > >Andre > > I find the xcode ide for generating a mix of universal binaries > and java very difficult to make work. Is there a way to do this > with make files? > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Fri Aug 18 16:34:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 16:34:46 -0600 (MDT) Subject: [Rxtx] serial driver newbe question and problem In-Reply-To: <20060817190751.M5586@xvalheru.org> References: <20060817190751.M5586@xvalheru.org> Message-ID: On Thu, 17 Aug 2006, pat wrote: > Hi there, > > I've question(s) for you. I need to communicate with scale, I've used the > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > but the difference between the crash time is 5 second ... . > > My question is: Is there a stable driver ??? Or what I have to do to have > stable enough serial port driver ??? > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > Thanks to all for the help. > > Pat > Could you describe the hardware you have, the version of rxtx and provide the log of the crash? Did you download binaries? I've not been seeing a jvm crash with rxtx -- Trent Jarvi tjarvi at qbang.org From lunareclipse03 at web.de Sat Aug 19 12:11:48 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 19 Aug 2006 20:11:48 +0200 Subject: [Rxtx] Problem solved! Message-ID: <920065539@web.de> Hi everybody, I posted some months ago and asked about some help on my very special problem concerning my win32 port of a communications library. Now I just want to inform you that no further "mindstorming" is needed because I solved the problem by completely rewriting the win32 port of the library. Now everything works fine. Thank you all for your time and patience. --Sven Ahlemann __________________________________________________________________________ Erweitern Sie FreeMail zu einem noch leistungsst?rkeren E-Mail-Postfach! Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131 From ajmas at sympatico.ca Mon Aug 21 09:58:23 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 21 Aug 2006 11:58:23 -0400 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060821155823.TLSM18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Next time that happens, including a copy of the crash log, produced by Windows could probably help too. Andre Trent Jarvi wrote: > > On Thu, 17 Aug 2006, pat wrote: > > > Hi there, > > > > I've question(s) for you. I need to communicate with scale, I've used the > > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > > but the difference between the crash time is 5 second ... . > > > > My question is: Is there a stable driver ??? Or what I have to do to have > > stable enough serial port driver ??? > > > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > > > Thanks to all for the help. > > > > Pat > > > > Could you describe the hardware you have, the version of rxtx and > provide the log of the crash? Did you download binaries? > > I've not been seeing a jvm crash with rxtx > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From adrian.l.parker at gmail.com Thu Aug 24 09:10:39 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Thu, 24 Aug 2006 11:10:39 -0400 Subject: [Rxtx] Portability issues Message-ID: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use RXTX 2.0? Does it provide system librairies that javax.comm does not? I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, or 2000, or server 2003). Can this be done with a single implementation of RXTX? I don't want to have different versions of Java code that have different package names. References: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Message-ID: On Thu, 24 Aug 2006, Adrian Parker wrote: > Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use > RXTX 2.0? Does it provide system librairies that javax.comm does not? > > I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's > OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, > or 2000, or server 2003). Can this be done with a single implementation of > RXTX? I don't want to have different versions of Java code that have > different package names. > Hi Adrian. The native code can support all of the platforms you mention. I've never compiled for unixware or openunix but the patches are in the code. So you would need to compile for that target. >From there you would probably be best off going with rxtx 2.1 so you have all the classes in one package. You can opt to use rxtx 2.0 with Sun's commapi for Solaris v 2. The main differences are rxtx 2.1 comes with all the source/classes and is in package gnu.io while Sun's requires rxtx for some platforms but is in package javax.comm. The low level code is the same in either case as far as rxtx is concerned. -- Trent Jarvi tarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 04:12:52 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 06:12:52 -0400 Subject: [Rxtx] Serial.addEventListener bug? Message-ID: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on OpenServer 5.0.7). Its what Sun packages. I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an exception. It seems to throw the exception if no listener was previously declared (although I've not had chance to verify). Is this desireable behaviour? Sun's original API doesn't mention anything about an exception on this function, http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) Of course this is an old version of RXTX, so perhaps this has been changed. -- Adrian Parker Simulation Software Developer DLCSPM 4-4-3 (c) Building A31, CFB Kingston Tel: (613) 541-5010 x3020 CSN: 271-3020 Email: parker at lsec.dnd.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/22e2ea57/attachment-0312.html From tjarvi at qbang.org Fri Aug 25 05:15:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 25 Aug 2006 05:15:44 -0600 (MDT) Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: On Fri, 25 Aug 2006, Adrian Parker wrote: > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > OpenServer 5.0.7). Its what Sun packages. > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > exception. It seems to throw the exception if no listener was previously > declared (although I've not had chance to verify). > > Is this desireable behaviour? Sun's original API doesn't mention anything > about an exception on this function, > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > Of course this is an old version of RXTX, so perhaps this has been changed. > > > What exception was thrown? You can replace 1.4-8 with 2.0 for testing purposes. They are the same package. I doubt Sun shipped or packaged that. I think Caldera/SCOx/... did at one point. There may still be updates on their pages. I recall them sending patches here which are in current rxtx. -- Trent Jarvi tjarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 05:28:32 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 07:28:32 -0400 Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: <7da71e910608250428q32b86632g9a67b1b4efe69830@mail.gmail.com> On 8/25/06, Trent Jarvi wrote: > > On Fri, 25 Aug 2006, Adrian Parker wrote: > > > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > > OpenServer 5.0.7). Its what Sun packages. > > > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > > exception. It seems to throw the exception if no listener was > previously > > declared (although I've not had chance to verify). > > > > Is this desireable behaviour? Sun's original API doesn't mention > anything > > about an exception on this function, > > > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > > > Of course this is an old version of RXTX, so perhaps this has been > changed. > > > > > > > > What exception was thrown? Its weird. I catch an Exception. But when on that exception I call getClass().getName() I end up with a NullPointerException. You can replace 1.4-8 with 2.0 for testing > purposes. They are the same package. > > I doubt Sun shipped or packaged that. Doh! I meant to say SCO sorry. I was surfing Sun's site when I wrote that :) Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/e43aed3a/attachment-0312.html From sjudd at seas.upenn.edu Sat Aug 26 16:42:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Sat, 26 Aug 2006 18:42:09 -0400 Subject: [Rxtx] Mac commapi Message-ID: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? If so, where do I get it? Sun has various versions at http://www.sun.com/download/products.xml?id=43208d3d but they are for SolarisSparc, SolarisX86, Linux, and Generic. Do I use the Generic one? If so, read on; otherwise redirect me. While using the Generic version, my attempt to run the BlackBox sample program elicits a message saying it "can't find javax.comm.properties". I found a note in the rxtx.org HowTo (for Linux) saying to create this thing in /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties but where should it go on the Mac? After reading many versions of documentation around, and updates and revisions and re-authorings, I have worked my way into a state of confusion and high uncertainty. Please release me. sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060826/02d6b163/attachment-0282.html From tod at todbot.com Sat Aug 26 17:08:33 2006 From: tod at todbot.com (Tod E. Kurt) Date: Sat, 26 Aug 2006 16:08:33 -0700 Subject: [Rxtx] Mac commapi In-Reply-To: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Message-ID: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> You don't need Sun's CommAPI. You just need RXTX. Once you download RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and the native library is ("librxtxSerial.jnilib" on Mac OS X) via the standard methods. For instance, if you've placed those two files in a directory called 'rxtxlib' and you want to run a Java class called HelloWorld in the current directory, do the following: % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar HelloWorld On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? > If so, where do I get it? Sun has various versions at > http://www.sun.com/download/products.xml?id=43208d3d > but they are for SolarisSparc, SolarisX86, Linux, and Generic. > Do I use the Generic one? > If so, read on; otherwise redirect me. > > While using the Generic version, my attempt to run the BlackBox > sample program > elicits a message saying it "can't find javax.comm.properties". > I found a note in the rxtx.org HowTo (for Linux) saying to create > this thing in > /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties > but where should it go on the Mac? > > After reading many versions of documentation around, and updates > and revisions > and re-authorings, I have worked my way into a state of confusion > and high > uncertainty. Please release me. > > sj > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From sjudd at seas.upenn.edu Sun Aug 27 22:55:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Mon, 28 Aug 2006 00:55:09 -0400 Subject: [Rxtx] Mac commapi In-Reply-To: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> Message-ID: This was immensely helpful. Thank you, Tod. I wish it had been explicit somewhere in the documentation; it would have saved me 2 days of grief. One hugely valuable thing like this little set of instructions is that it implicitly lists all the hundreds of things you DON"T have to do. I know it seems obvious to those in the know, but every little bit of help on an arcane topic like this opens up the product to an exponentially wider group of dilettantes. I managed to get the SerialDemo program (from Sun) to work too. Hurrah! However, it required changing all the javax.comm references to gnu.io which I had heard of due to all my rambling readings. Is there not a demo program on rxtx.org already available that would not have needed this? BTW, the link on the Projects page for jPIC[Source] sends a *.hex file to a PIC 16F877 or similar chip... takes me to nowhere useful. I do not understand what the name "Toybox" is meant to imply. Thanks, sj On 2006 Aug 26, at 7:08 PM, Tod E. Kurt wrote: > You don't need Sun's CommAPI. You just need RXTX. Once you download > RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and > the native library is ("librxtxSerial.jnilib" on Mac OS X) via the > standard methods. > > For instance, if you've placed those two files in a directory called > 'rxtxlib' and you want to run a Java class called HelloWorld in the > current directory, do the following: > > % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar > HelloWorld > > > On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > >> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? >> If so, where do I get it? Sun has various versions at >> http://www.sun.com/download/products.xml?id=43208d3d >> but they are for SolarisSparc, SolarisX86, Linux, and Generic. >> Do I use the Generic one? >> If so, read on; otherwise redirect me. >> >> While using the Generic version, my attempt to run the BlackBox >> sample program >> elicits a message saying it "can't find javax.comm.properties". >> I found a note in the rxtx.org HowTo (for Linux) saying to create >> this thing in >> /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties >> but where should it go on the Mac? >> >> After reading many versions of documentation around, and updates >> and revisions and re-authorings, I have worked my way into a state >> of confusion and high uncertainty. Please release me. >> >> sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060827/b80d6389/attachment-0282.html From pete.flugstad at gmail.com Mon Aug 28 12:38:27 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 13:38:27 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE Message-ID: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Okay, my understanding is that originally, RTS meant "Request to Send" - the DTE (the PC) would assert this and the DCE (modem) would assert "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send data. This really only provided uni-directional flow control, from the PC to the modem. Now, as I understand it, the more modern usage of RTS is that it is used for the DTE to assert flow control back to the DCE - basically it means "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) raises this, then the DCE(modem) is free to send data to the DTE - this allows the DTE(PC) to exert flow control back towards the DCE(modem). This discussion is based on the Serial HOWTO from: and lots of other reading... Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which is defined as: > Enables RTS flow-control handshaking. The driver raises the RTS line, > enabling the DCE to send, when the input buffer has enough room to > receive data. The driver lowers the RTS line, preventing the DCE to > send, when the input buffer does not have enough room to receive > data. If this value is used, it is an error for the application to adjust > the line with EscapeCommFunction. which clearly reflects the newer usage style - it keeps the RTS line high as long as there is space to _receive_ data. And takes it low when the receive/input buffer is getting full to stop the modem from sending it data. Does this jive with other peoples understanding of RTS usage? Unfortunately, the hardware I'm trying to talk to wants to use the OLD style of RTS line usage. An existing Windows C++ program uses RTS_CONTROL_TOGGLE, which documentation states: > Specifies that the RTS line will be high if bytes are available for transmission. > After all buffered bytes have been sent, the RTS line will be low. If this value is > set, it would be an error for an application to adjust the line with > EscapeCommFunction. This value is ignored in Windows 95; it causes the > driver to act as if RTS_CONTROL_ENABLE were specified. This seems to be the OLD RTS behavior, right? So, what I seem to need is to be able to control the RTS line, either using TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS when getting ready to TX and clear it when the output buffer is empty). Does this make sense, or am I off in the weeds? Thanks, Pete From tjarvi at qbang.org Mon Aug 28 18:21:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 28 Aug 2006 18:21:10 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: On Mon, 28 Aug 2006, Pete Flugstad wrote: > Okay, my understanding is that originally, RTS meant "Request to Send" > - the DTE (the PC) would assert this and the DCE (modem) would assert > "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send > data. This really only provided uni-directional flow control, from the PC to > the modem. > > Now, as I understand it, the more modern usage of RTS is that it is used > for the DTE to assert flow control back to the DCE - basically it means > "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) > raises this, then the DCE(modem) is free to send data to the DTE - this > allows the DTE(PC) to exert flow control back towards the DCE(modem). > > This discussion is based on the Serial HOWTO from: > > > > and lots of other reading... > > Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > is defined as: > >> Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > > which clearly reflects the newer usage style - it keeps the RTS line high > as long as there is space to _receive_ data. And takes it low when the > receive/input buffer is getting full to stop the modem from sending it data. > > Does this jive with other peoples understanding of RTS usage? > > Unfortunately, the hardware I'm trying to talk to wants to use the OLD > style of RTS line usage. An existing Windows C++ program uses > RTS_CONTROL_TOGGLE, which documentation states: > >> Specifies that the RTS line will be high if bytes are available for transmission. >> After all buffered bytes have been sent, the RTS line will be low. If this value is >> set, it would be an error for an application to adjust the line with >> EscapeCommFunction. This value is ignored in Windows 95; it causes the >> driver to act as if RTS_CONTROL_ENABLE were specified. > > This seems to be the OLD RTS behavior, right? > > So, what I seem to need is to be able to control the RTS line, either using > TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS > when getting ready to TX and clear it when the output buffer is empty). > > Does this make sense, or am I off in the weeds? > Hi Pete OK. That sounds right. I do not know how you would communicate the difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through CommAPI as it stands. I take it you did not find anything either? Perhaps the best thing to do for your code is to toggle the RTS yourself. This could be a feature in the future JSR API perhaps. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 28 20:54:34 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 21:54:34 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <44F3AC6A.10908@gmail.com> Trent Jarvi wrote: > OK. That sounds right. I do not know how you would communicate the > difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through > CommAPI as it stands. I take it you did not find anything either? > > Perhaps the best thing to do for your code is to toggle the > RTS yourself. This could be a feature in the future JSR API perhaps. Yeah, this is what I ended up doing. I had to modify the dll in order to be able to set hardware flow control (which I do want), but leave the RTS flow control at RS_CONTROL_ENABLE. After that I just toggle setRTS(true) when I'm ready to send and setRTS(false) when I get a OUTPUT_BUFFER_EMPTY notification. Haven't tested with real hardware yet, but it seems to work OK. Thanks for the feedback! Pete From Bob_Jacobsen at lbl.gov Tue Aug 29 08:49:02 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 29 Aug 2006 07:49:02 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >is defined as: > > > Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > >which clearly reflects the newer usage style - it keeps the RTS line high >as long as there is space to _receive_ data. And takes it low when the >receive/input buffer is getting full to stop the modem from sending it data. > >Does this jive with other peoples understanding of RTS usage? Can you point to any devices that actually implement this "new" understanding? I think the person who wrote that documentation paragraph is just confused. The original "RTS/CTS" handshaking was extended to input (from DCE to DTE) handshaking via the DTR (Data Terminal Ready) line. I think the person who wrote the double-quoted paragraph above was just confused between the directions, and mixed them up. If you change "RTS" to "DTR" in that paragraph, you get: > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > enabling the DCE to send, when the input buffer has enough room to > > receive data. The driver lowers the DTR line, preventing the DCE to > > send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. which describes how dozens of devices actually work for controlling flow into the DTE (computer). This then leaves RTS/CTS (with RTS usually just stuck high) for controlling flow into the DCE (peripheral). Again, lots of hardware devices actually do this. I don't work on Windows, so can't be sure of what happens. But on the MacOS X version of RXTX, CTS low stops transmission, exactly as the "old" style would expect. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From mschned at basis.com Tue Aug 29 12:57:45 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 12:57:45 -0600 Subject: [Rxtx] Porting to AIX Message-ID: <01f201c6cb9d$034d4f20$341416ac@basis.com> Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar From mschned at basis.com Tue Aug 29 13:58:05 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 13:58:05 -0600 Subject: [Rxtx] Porting to AIX References: <01f201c6cb9d$034d4f20$341416ac@basis.com> Message-ID: <024901c6cba5$714c3560$341416ac@basis.com> After looking through the build messages closer, there is an error building SerialImp.c: gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type Looks like B57600 is not defined and there are no definitions for DEVICEDIR and LOCKDIR on AIX. Can I just a the following to SerialImp.h? #if defined(__aix__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __aix__ */ Mark Schnedar ----- Original Message ----- From: "Mark E. Schnedar" To: Sent: Tuesday, August 29, 2006 12:57 PM Subject: [Rxtx] Porting to AIX Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 29 15:25:35 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 29 Aug 2006 16:25:35 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <84d4a6d50608291425i1fb819d3i615cf9b85b1e9617@mail.gmail.com> On 8/29/06, Bob Jacobsen wrote: > Can you point to any devices that actually implement this "new" understanding? > > I think the person who wrote that documentation paragraph is just confused. The paragraph is from the Windows documentation of its DCB structure which is used to configure the Serial Device. This is what RXTX uses internally. My version is from MSDN, and Google finds the same text here: (search for fRtsControl). I have not seen any mention anywhere of it being incorrect (and yes, I did look, because I thought the same thing). My discussion is based on trying to use RXTX to talk to a device that used the old style of one-way flow control (RTS is raised to SEND data from the PC to the device). An existing VC++ app use the old-style RTS_CONTROL_TOGGLE. RXTX did not - it used the newer style RTS_CONTROL_HANDSHAKE, so things didn't work - the device was seeing RTS HIGH all the time, so it was thinking that the PC was ready to TX all the time. When I switch RXTX to using RTS_CONTROL_ENABLED and manually control RTS, then things work correctly. The behavior is consistent with this understanding if I hook two serial ports on Windows XP in lookback (via null modem). I'd be very surprised if this had not been corrected by M$ by this time. The same structure has been around since WinNT (mid 1990's) - their documentation is typically pretty good. > > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > > enabling the DCE to send, when the input buffer has enough room to > > > receive data. The driver lowers the DTR line, preventing the DCE to > > > send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. There is a seperate field, fDtrControl, which you can set to DTR_CONTROL_HANDSHAKE, that appears to do exactly this. > This then leaves RTS/CTS (with RTS usually just stuck high) for > controlling flow into the DCE (peripheral). Again, lots of hardware > devices actually do this. > > I don't work on Windows, so can't be sure of what happens. But on > the MacOS X version of RXTX, CTS low stops transmission, exactly as > the "old" style would expect. Well, the Linux Serial HOWTO is where I got most of my information. And yes, I thought it was wrong as well, but it's apparently how things are implemented: Donno - but it works for me... Pete From tjarvi at qbang.org Tue Aug 29 19:11:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 29 Aug 2006 19:11:40 -0600 (MDT) Subject: [Rxtx] Porting to AIX In-Reply-To: <024901c6cba5$714c3560$341416ac@basis.com> References: <01f201c6cb9d$034d4f20$341416ac@basis.com> <024901c6cba5$714c3560$341416ac@basis.com> Message-ID: Hi Mark That should do it. You can put ifdef around the B57600 as we did with higher baudrates. You may want to use tip, minicom, kermit or some other serial application on the AIX to confirm that the lockfiles created are correct. Neat stuff. On Tue, 29 Aug 2006, Mark E. Schnedar wrote: > After looking through the build messages closer, > there is an error building SerialImp.c: > > gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o > /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type > > Looks like B57600 is not defined and there are no > definitions for DEVICEDIR and LOCKDIR on AIX. > > Can I just a the following to SerialImp.h? > > #if defined(__aix__) > # define DEVICEDIR "/dev/" > # define LOCKDIR "/var/lock" > # define LOCKFILEPREFIX "LCK.." > # define FHS > #endif /* __aix__ */ > > Mark Schnedar > > > ----- Original Message ----- > From: "Mark E. Schnedar" > To: > Sent: Tuesday, August 29, 2006 12:57 PM > Subject: [Rxtx] Porting to AIX > > > Hi, > > I'm new to rxtx. Currently my company has an interpreter product > that uses rxtx on Windows and Linux. I am trying to get rxtx to > build on AIX. I downloaded rxtx, ran ./configure and make. When > I run make I get the following error: > > libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object > make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 > > Do you have any suggestions on how to fix this problem? > > I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error > on both systems). I did have our system administrator load > automake, autoconf, make (gnu), and gcc. Here are the versions: > > AIX 4.3.3 AIX 5.3.0 > rxtx: 2.1-7r2 2.1-7r2 > autoconf: 2.53 2.59 > automake: 1.5 1.8.5 > make: 3.79.1 3.80 > gcc: (used native cc) 4.0.0 > > Any help would be appreciated. > > Mark Schnedar > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From guille at sms.nl Wed Aug 30 01:14:32 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 09:14:32 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <7.0.1.0.0.20060830091204.03652de0@sms.nl> At 16:49 29/08/2006, Bob Jacobsen wrote: >At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > > > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >is defined as: > > > > > Enables RTS flow-control handshaking. The driver raises the RTS line, > >> enabling the DCE to send, when the input buffer has enough room to > >> receive data. The driver lowers the RTS line, preventing the DCE to > >> send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. > > > >which clearly reflects the newer usage style - it keeps the RTS line high > >as long as there is space to _receive_ data. And takes it low when the > >receive/input buffer is getting full to stop the modem from sending it data. > > > >Does this jive with other peoples understanding of RTS usage? > >Can you point to any devices that actually implement this "new" understanding? Many (most) of the embedded devices we work with implement this kind of flow control. The host (DTE) raises RTS when it can receive data, and lowers it when the input buffers are full. In turn it watches the CTS line to see whether it can send data to the DCE. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From tjarvi at qbang.org Wed Aug 30 01:23:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 30 Aug 2006 01:23:46 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830091204.03652de0@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 16:49 29/08/2006, Bob Jacobsen wrote: >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: >>> >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >>> is defined as: >>> >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, >>>> enabling the DCE to send, when the input buffer has enough room to >>>> receive data. The driver lowers the RTS line, preventing the DCE to >>>> send, when the input buffer does not have enough room to receive >>>> data. If this value is used, it is an error for the application to adjust >>>> the line with EscapeCommFunction. >>> >>> which clearly reflects the newer usage style - it keeps the RTS line high >>> as long as there is space to _receive_ data. And takes it low when the >>> receive/input buffer is getting full to stop the modem from sending it data. >>> >>> Does this jive with other peoples understanding of RTS usage? >> >> Can you point to any devices that actually implement this "new" understanding? > > Many (most) of the embedded devices we work with implement this kind of flow > control. The host (DTE) raises RTS when it can receive data, and lowers it > when the input buffers are full. In turn it watches the CTS line to see > whether it can send data to the DCE. > I think this explains some hardware control 'bugs' I've seen. -- Trent Jarvi tjarvi at qbang.org From guille at sms.nl Wed Aug 30 02:01:35 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 10:01:35 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> At 09:23 30/08/2006, Trent Jarvi wrote: >On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > > > At 16:49 29/08/2006, Bob Jacobsen wrote: > >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >>> > >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >>> is defined as: > >>> > >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, > >>>> enabling the DCE to send, when the input buffer has enough room to > >>>> receive data. The driver lowers the RTS line, preventing the DCE to > >>>> send, when the input buffer does not have enough room to receive > >>>> data. If this value is used, it is an error for the > application to adjust > >>>> the line with EscapeCommFunction. > >>> > >>> which clearly reflects the newer usage style - it keeps the RTS line high > >>> as long as there is space to _receive_ data. And takes it low when the > >>> receive/input buffer is getting full to stop the modem from > sending it data. > >>> > >>> Does this jive with other peoples understanding of RTS usage? > >> > >> Can you point to any devices that actually implement this "new" > understanding? > > > > Many (most) of the embedded devices we work with implement this > kind of flow > > control. The host (DTE) raises RTS when it can receive data, and lowers it > > when the input buffers are full. In turn it watches the CTS line to see > > whether it can send data to the DCE. > > > >I think this explains some hardware control 'bugs' I've seen. I think the above is the most widespread use, but that may just mean it is the most widespread use in our specific segment (embedded systems). Some UART chips (e.g. from Exar) implement this kind of flow control directly in hardware. For example the Exar can be configured to suspend transmission when it sees CTS low, and resume transmission when it sees CTS high. This is also consistent with our experience. Maybe this helps clarify: http://www.tldp.org/HOWTO/Text-Terminal-HOWTO-10.html#ss10.7 Note the "Old RTS/CTS handshaking is different" section, which refers to "older terminals" whereas newer equipment would use RTS/CTS flow control (or equivalently DTR/DTS) as described above. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From Bob_Jacobsen at lbl.gov Wed Aug 30 07:55:31 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 30 Aug 2006 06:55:31 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> <7.0.1.0.0.20060830095557.0374ff28@sms.nl> Message-ID: I think we all agree that CTS inactive means "Send no more from DTE to DCE". The question is how to express the other direction, "Send no more from DCE to DTE". There are two parts to this question: What do various DTE-like devices do, and what do various DCE-like devices expect? Electrically, the lines that go that direction are DTR, DCD, and RTS (plus some special-purpose lines that are rarely present). All three devices I work most with respect the DTR lead. On the other hand, the FTDI chips for doing serial over USB provide either (RTS and CTS) or (DTR and DSR) as the two leads. What we're probably seeing is two different approaches, that have propagated separately. That's a problem. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From Pawan.Kharbanda at dot.state.co.us Wed Aug 30 09:07:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 30 Aug 2006 09:07:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0455E5E5@hqexchange3.dot.state.co.us> Trent, Sorry for not responding earlier to your email. I was actually waiting for the release of our software on the new Hardware. As I mentioned in my previous emails, RXTX crashes and locks up serial ports with the older version of Redhat (Linux 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:28:55 EDT 2005 i686 i686 i386 GNU/Linux), it might work ok if you are using one or 2 ports but anything more than that it has issues. I was using JDK1.5.0_06 and older firmwares of Digi boxes. Let me know if you need any more specific information of the older system. Thanks Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Thursday, August 10, 2006 5:40 AM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even > after 10000 operations (now I am trying 100,000 :). This is all with > the original RXTX 2.1.7 (final) api's without any of my fixes that I > have been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying > the RXTX saying the suggested kernel for Redhat Linux is > 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Aug 1 01:11:30 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 1 Aug 2006 09:11:30 +0200 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <34B6BC40-1405-4A13-8054-0FC6CE10466A@buechse.de> This is a problem with lock files. You should find it somewhere in the documentation... On 01.08.2006, at 03:53, Richard P. Welty wrote: > trying to get my app running on a Mac OS X powerbook, when > the following is executed as the first thing inside the > run method of a Thread: > > > try { > port = (SerialPort) selectedPort.open( > this.getClass().getName(), 2000); > } catch ( PortInUseException ex){ > ex.printStackTrace(); > return; > } > > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java: > 354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run > (ScaleWatcher.java:143) > > i've not seen any documentation suggesting that rxtx would be finicky > about application names... > > thanks for any suggestions, > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From rwelty at suespammers.org Tue Aug 1 05:37:53 2006 From: rwelty at suespammers.org (Richard P. Welty) Date: Tue, 01 Aug 2006 07:37:53 -0400 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <44CF3D11.9060108@suespammers.org> Richard P. Welty wrote: > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) Aha, a confusing error message. it's really a lock file problem; the code is trying to fill in the application name but when it's getting "Unknown Application" and filling that in... richard From ajmas at sympatico.ca Tue Aug 1 13:10:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:10:59 -0400 Subject: [Rxtx] Application Name? Message-ID: <20060801191059.HFCD18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> You need the source code in CVS. The forth coming 2.18 will correct this, but currently the only place to find the correction is in CVS. No idea when 2.18 is due. > > From: "Richard P. Welty" > Date: 2006/08/01 Tue AM 07:37:53 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Application Name? > > Richard P. Welty wrote: > > > i get the following: > > > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > at > > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) > > Aha, a confusing error message. it's really a lock file problem; the > code is trying to fill in the application name but when it's getting > "Unknown Application" and filling that in... > > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:15:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:15:57 -0400 Subject: [Rxtx] Do interfaces break backwards compatibility? Message-ID: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> It is the class that decides to add serializable that needs to worry about those issues. For the most part serial ports and their connection states should be considered as transient, since there is no guarantee they will still be present or that their state will be, especially in a USB world. What you can store is the port settings and port id and then simply test for port availability next time. Nothing else should be assumed. > > From: Gregg Wonderly > Date: 2006/07/31 Mon PM 01:21:19 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Do interfaces break backwards compatibility? > > Doug Berkland wrote: > > As far as I can tell, nothing in either RXTX or Sun's JavaCOMM > > implements Serializable. Therefore, there are no worries from that > > either. (I can't think of a reason anything in JavaCOMM should > > implement Serializable either.) > > Any interface in javax.comm can become implemented by a serializable object. > Thus, if someone wants to provide remote access to a serial port, then they > might (and I think this is not wise) choose to subclass and add Serializable to > the interface list. > > It's that kind of Serialization compatibility that I'm talking about. > > Gregg Wonderly > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:18:11 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:18:11 -0400 Subject: [Rxtx] precompiled for Intel Mac? Message-ID: <20060801191811.FLJY27612.tomts16-srv.bellnexxia.net@smtp1.sympatico.ca> > > From: Joachim Buechse > There will be. However not before we have figured out some remaining issues. What issues are remaining? Andre From Pawan.Kharbanda at dot.state.co.us Tue Aug 1 16:55:08 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 1 Aug 2006 16:55:08 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Hi, I am also experiencing occasional JVM crash thru the native code. I am attaching the log from the crash. Any ideas what might be causing it???? Regards Pawan Kharbanda # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # --------------- T H R E A D --------------- Current thread (0x8d000480): JavaThread "Thread-119" [_thread_in_native, id=111 51] siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba Registers: EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 Top of Stack: (sp=0x8d3482b8) 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 0x8d348308: 00000000 00000002 00000000 00000000 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 Instructions: (pc=0xb75e39b2) 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~StubRoutines::call_stub V [libjvm.so+0x2607ec] V [libjvm.so+0x423828] V [libjvm.so+0x260045] V [libjvm.so+0x2600de] V [libjvm.so+0x2d7745] V [libjvm.so+0x4c2ba3] V [libjvm.so+0x424338] C [libpthread.so.0+0x4dd8] 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 ) =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, id=11026] 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, id=11023] From tjarvi at qbang.org Tue Aug 1 18:46:21 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 1 Aug 2006 18:46:21 -0600 (MDT) Subject: [Rxtx] JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Message-ID: On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) > C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] > 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, > id=11034] > 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, > id=11033] > 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, > id=11032] > 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, > id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] > 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, > id=11028] > 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, > id=11027] > 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, > id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] > 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- Index: termios.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/termios.c,v retrieving revision 1.9.2.57 diff -u -r1.9.2.57 termios.c --- termios.c 4 Jun 2006 02:50:01 -0000 1.9.2.57 +++ termios.c 11 Jun 2006 21:51:10 -0000 @@ -1048,26 +1048,29 @@ if ( !first_tl ) { port->prev = NULL; + port->next = NULL; first_tl = port; } else { - while ( index->next ) + while ( ( index->fd < port->fd ) && index->next ) index = index->next; - if ( port == first_tl ) + if ( index->fd > port->fd ) { - port->prev = NULL; - port->next = first_tl; - first_tl->prev = port; - first_tl = port; + /* inserting previously closed fd */ + port->prev = index->prev; + port->next=index + index->prev->next = port; + index->prev = port; } else { + /* adding to end of list */ port->prev = index; + port->next = NULL; index->next = port; } } - port->next = NULL; LEAVE( "add_port" ); return port; From gergg at cox.net Tue Aug 1 23:25:19 2006 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 02 Aug 2006 00:25:19 -0500 Subject: [Rxtx] Do interfaces break backwards compatibility? In-Reply-To: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <44D0373F.7020600@cox.net> Andre-John Mas wrote: > It is the class that decides to add serializable that needs to worry about those issues. > For the most part serial ports and their connection states should be considered as > transient, since there is no guarantee they will still be present or that their state > will be, especially in a USB world. Right, but when you provide an interface as the standard, that opens the doors for a lot more interpretation and variation. An abstract class can indicate a lot more about what the expected implementation is. Gregg Wonderly From lyon at docjava.com Wed Aug 2 06:02:15 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:02:15 -0400 Subject: [Rxtx] jsr spec and license issues Message-ID: Hi All, Trent and I have been discussing the license issues of the JSR spec and code that we develop, as a community. Here is what we have come up with: >During the development, the new JSR spec that we derive >will be >covered under the LGPL license. Since it is >just interfaces, any contributions will come back to me, for inclusion >into the specification. The goal is to provide a detailed set of >interfaces that >document the present state of our reference model. I am using >the RXTX as the reference model. If there is something missing from >the reference model, or if the reference model has something that should >not be there, we will need to discuss it. > >After Sun accepts the JSR, I, as the copyright holder, can issue >a version with a JSR compatible license. > >The goal is to migrate the interfaces into javax.comm. Does this sound like a reasonable plan to everyone? Thanks! - Doug From joachim at buechse.de Wed Aug 2 06:21:03 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 14:21:03 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Good day, quite frankly I think that this is a very bad idea. This specification (!) should be in the public domain and nowhere else. Defining a spec under the (L)GPL makes absolutely no sense. After all it is a specification not an implementation. There is no or only trivial code attached to it. So while nothing can be gained by putting it under the LGPL, a lot can be lost - for example the contribution of companies that do not like to open source their implementations. Furthermore you are plain wrong assuming you will be the copyright holder to additions made by other people. Best regards, Joachim On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for >> inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that >> should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Aug 2 06:39:28 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:39:28 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Hi All, I don't know anything about licensing issues. The below sounds reasonable. If we make this public domain, will that be compatible with Sun's JSR? Thanks! - DL P.S. I really don't care what we do, as long as there is some sort of collective agreement. >Good day, > >quite frankly I think that this is a very bad idea. This specification >(!) should be in the public domain and nowhere else. > >Defining a spec under the (L)GPL makes absolutely no sense. After all? >it is a specification not an implementation. There is no or only? >trivial code attached to it. So while nothing can be gained by? >putting it under the LGPL, a lot can be lost - for example the? >contribution of companies that do not like to open source their? >implementations. > >Furthermore you are plain wrong assuming you will be the copyright? >holder to additions made by other people. > >Best regards, >Joachim > > >On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for? >>> inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that? >>> should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> >> Does this sound like a reasonable plan to everyone? >> >> Thanks! >> - Doug >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 07:50:09 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 10:50:09 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D0AD91.4080103@gmail.com> Hi, I have been searching the web and here it is: http://jcp.org/en/resources/license_reference Here there is a list of the licenses that are compatible with the JCP for JSR submitting. I think that Apache, CDDL, CPL and OSL are the one that are compatible with our needs. But I think that Apache is the best for us, Doug why do not make a votation? Regards, Manuel > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. > >> Good day, >> >> quite frankly I think that this is a very bad idea. This specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From lyon at docjava.com Wed Aug 2 08:10:55 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 10:10:55 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D0AD91.4080103@gmail.com> References: <44D0AD91.4080103@gmail.com> Message-ID: Hi All, I have no objection to an Apache license for the JSR interfaces that we produce. Would anyone care to comment? Joachim: Does this address your public domain concerns? How does this impact the reference implementation (i.e. RXTX)? Thanks! - DL >Hi, >I have been searching the web and here it is: >http://jcp.org/en/resources/license_reference >Here there is a list of the licenses that are compatible with the JCP >for JSR submitting. >I think that Apache, CDDL, CPL and OSL are the one that are compatible >with our needs. >But I think that Apache is the best for us, Doug why do not make a votation? >Regards, >Manuel > >> Hi All, >> I don't know anything about licensing issues. >> The below sounds reasonable. If we make this public domain, >> will that be compatible with Sun's JSR? >> Thanks! >> - DL >> P.S. I really don't care what we do, as long as there is >> some sort of collective agreement. >>?? >>> Good day, >>> >>> quite frankly I think that this is a very bad idea. This specification >>> (!) should be in the public domain and nowhere else. >>> >>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>> it is a specification not an implementation. There is no or only >>> trivial code attached to it. So while nothing can be gained by >>> putting it under the LGPL, a lot can be lost - for example the >>> contribution of companies that do not like to open source their >>> implementations. >>> >>> Furthermore you are plain wrong assuming you will be the copyright >>> holder to additions made by other people. >>> >>> Best regards, > >> Joachim >>> >>> >>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>> >>>???? >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>?????? >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for >>>>> inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that >>>>> should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>>>???????? >>>> Does this sound like a reasonable plan to everyone? >>>> >>>> Thanks! >>>> - Doug >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>?????? >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>???? >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 08:20:29 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 11:20:29 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D0AD91.4080103@gmail.com> Message-ID: <44D0B4AD.2050106@gmail.com> Doug; > How does this impact the reference implementation (i.e. RXTX)? > Fuck I have not thinked about that, we would need that everyone who had colaborated with RXTX and have putted code on it to agree a license chaging. Or start from sractch. I don't know if Trent have the right to do that. Regards, Manuel > > >> Hi, >> I have been searching the web and here it is: >> http://jcp.org/en/resources/license_reference >> Here there is a list of the licenses that are compatible with the JCP >> for JSR submitting. >> I think that Apache, CDDL, CPL and OSL are the one that are compatible >> with our needs. >> But I think that Apache is the best for us, Doug why do not make a votation? >> Regards, >> Manuel >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> >> >> Joachim >> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 08:21:15 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 16:21:15 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Putting something in the public domain means, that it can be used by anyone for whatever (s)he thinks is appropriate. The authors define no restriction regarding it's use. That's how any specification should be. Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From berkland at spamcop.net Wed Aug 2 08:50:50 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 10:50:50 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> You may want to consider making it available under two separate licenses. 1 - LGPL as it is today The LGPL can be used by anyone wanting to extend the current functionality, as long as they provide code for anything they change. 2 - Sun Community Source License (SCSL) http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf The SCSL will allow anyone who wants to do a closed source implementation from the ground up to do so, if I'm reading it correctly, as long as they don't use any of the code from the Reference Implementation. This will satisfy any company that wants to have a closed-source implementation, but not help them out very much. On 8/2/06, Joachim Buechse wrote: > Putting something in the public domain means, that it can be used by > anyone for whatever (s)he thinks is appropriate. The authors define > no restriction regarding it's use. That's how any specification > should be. > > Best regards, > Joachim > > > On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > > > Hi All, > > I don't know anything about licensing issues. > > The below sounds reasonable. If we make this public domain, > > will that be compatible with Sun's JSR? > > Thanks! > > - DL > > P.S. I really don't care what we do, as long as there is > > some sort of collective agreement. > >> Good day, > >> > >> quite frankly I think that this is a very bad idea. This > >> specification > >> (!) should be in the public domain and nowhere else. > >> > >> Defining a spec under the (L)GPL makes absolutely no sense. After all > >> it is a specification not an implementation. There is no or only > >> trivial code attached to it. So while nothing can be gained by > >> putting it under the LGPL, a lot can be lost - for example the > >> contribution of companies that do not like to open source their > >> implementations. > >> > >> Furthermore you are plain wrong assuming you will be the copyright > >> holder to additions made by other people. > >> > >> Best regards, > >> Joachim > >> > >> > >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> > >>> Hi All, > >>> Trent and I have been discussing the license issues of the > >>> JSR spec and code that we develop, as a community. > >>> Here is what we have come up with: > >>> > >>>> During the development, the new JSR spec that we derive > >>>> will be > >>>> covered under the LGPL license. Since it is > >>>> just interfaces, any contributions will come back to me, for > >>>> inclusion > >>>> into the specification. The goal is to provide a detailed set of > >>>> interfaces that > >>>> document the present state of our reference model. I am using > >>>> the RXTX as the reference model. If there is something missing > >>>> from > >>>> the reference model, or if the reference model has something that > >>>> should > >>>> not be there, we will need to discuss it. > >>>> > >>>> After Sun accepts the JSR, I, as the copyright holder, can issue > >>>> a version with a JSR compatible license. > >>>> > >>>> The goal is to migrate the interfaces into javax.comm. > >>> > >>> Does this sound like a reasonable plan to everyone? > >>> > >>> Thanks! > >>> - Doug > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From naranjo.manuel at gmail.com Wed Aug 2 09:03:02 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 12:03:02 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> References: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> Message-ID: <44D0BEA6.2040408@gmail.com> Or even better, you can use Apache v2, which allows both Open Source and Closed Source forms ;-) > You may want to consider making it available under two separate licenses. > > 1 - LGPL as it is today > > The LGPL can be used by anyone wanting to extend the current > functionality, as long as they provide code for anything they change. > > 2 - Sun Community Source License (SCSL) > http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf > > The SCSL will allow anyone who wants to do a closed source > implementation from the ground up to do so, if I'm reading it > correctly, as long as they don't use any of the code from the > Reference Implementation. This will satisfy any company that wants to > have a closed-source implementation, but not help them out very much. > > On 8/2/06, Joachim Buechse wrote: > >> Putting something in the public domain means, that it can be used by >> anyone for whatever (s)he thinks is appropriate. The authors define >> no restriction regarding it's use. That's how any specification >> should be. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This >>>> specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> Joachim >>>> >>>> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing >>>>>> from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 09:46:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 17:46:25 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> I assume that javax.comm/RXTX is to be redefined using Interfaces. In this case we should separate 2 things: 1) The specification and it's incarnation in the form of java classes defining the interfaces. 2) The actual implementation of the functionality. It is possible that 1) may contain some trivial code in abstract or none abstract classes (ie PortFactory, PortRegistry, etc). Doug's original question was regarding 1) - unless I misunderstood. I personally think that 1) should be in the public domain. It should not be covered by any restrictions what-so-ever. Let it be free as in "totally free in any respect". I do not care under which license 2) is released. Why? Because it is in my very interest that all/almost all vendors include implementations with their distributions. Which will only happen if they do not need to respect open source licenses. (javax.comm is not nearly as important as the Apache web server or MySql, so nobody will take licensing risks). Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ssbello at gmail.com Wed Aug 2 10:28:30 2006 From: ssbello at gmail.com (Simone) Date: Wed, 2 Aug 2006 18:28:30 +0200 Subject: [Rxtx] pocketPC 2003 Message-ID: <39ed505d0608020928k6ceb01aen470c2e6a78c5a6b0@mail.gmail.com> Does anyone know if the Rxtx works on PocketPc 2003? If yes, could you, please, give me some suggestion. Thanks, Simone Bell? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/72e0fb87/attachment-0335.html From berkland at spamcop.net Wed Aug 2 13:00:10 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 15:00:10 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> Message-ID: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> How about these for the "Business Terms" of the new JSR: > The specification will be released in accordance with standard terms > as specified by the JCP process. > > The reference implementation (RI) will be delivered in binary form > free of charge from http://rxtx.org. Licensing details are expected to > be under the Binary Code License (BCL). > > The source for the reference implementation is expected to be > delivered via the Limited GNU Public License (LGPL) and available free > of charge. > > The TCK will be made available free of charge to all J2SE and J2EE licensees. > > The TCK will be offered for license at no charge, without support or > any trademark license rights, to qualified not-for-profit entities > (including not-for-profit) academic institutions) and qualified > individuals engaged in efforts to create compatible implementations of > the Specification. From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 13:13:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 13:13:33 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E495@hqexchange3.dot.state.co.us> Trent, I didn't exactly get it. Again I am not a C guy, maybe its very simple for you but I don't see any checks for FD (as written in the patch for termios.c) in the initialise_event_info_struct, I see some checks in the interruptEventLoop call. Second as you explained I open three("/dev/cuf01","/dev/cuf01","/dev/cuf01") ports, I close the 2nd ("/dev/cuf02", the other 2 are still open) , I never try to open the third ("/dev/cuf03") port again if it is already open. Are you planning to have a fix for this in the next release 2.1.8. Its very important for me to have a fix for this, its causing some major headaches for our project. I know you have your regular job too, I will appreciate any help. Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, August 01, 2006 6:46 PM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java > VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic > frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) C [librxtxSerial.so+0x69b2] > initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] > Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" > [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: > /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread > "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 > JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon > [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" > daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread > "AdapterThread" daemon [_thread_blocked, id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, > id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Wed Aug 2 13:14:20 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 16:14:20 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> Message-ID: <44D0F98C.1070600@gmail.com> +1 Agree > How about these for the "Business Terms" of the new JSR: > > >> The specification will be released in accordance with standard terms >> as specified by the JCP process. >> >> The reference implementation (RI) will be delivered in binary form >> free of charge from http://rxtx.org. Licensing details are expected to >> be under the Binary Code License (BCL). >> >> The source for the reference implementation is expected to be >> delivered via the Limited GNU Public License (LGPL) and available free >> of charge. >> >> The TCK will be made available free of charge to all J2SE and J2EE licensees. >> >> The TCK will be offered for license at no charge, without support or >> any trademark license rights, to qualified not-for-profit entities >> (including not-for-profit) academic institutions) and qualified >> individuals engaged in efforts to create compatible implementations of >> the Specification. >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From savagobr at yahoo.com Wed Aug 2 13:40:42 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:40:42 -0700 (PDT) Subject: [Rxtx] jsr spec and license issues Message-ID: <20060802194042.83599.qmail@web53807.mail.yahoo.com> Friends Apache seems ok... if I get it right, does it *almost* equals to BSD? Regarding public domain: I think that the good people that spent so much time on this library will like to keep some rights over its own work, don't you think? Best regards Savago --------------------------------- Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/79abdfd5/attachment-0335.html From savagobr at yahoo.com Wed Aug 2 13:58:04 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:58:04 -0700 (PDT) Subject: [Rxtx] JVM Crashing Message-ID: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago --------------------------------- Groups are talking. We´re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/47d561ae/attachment-0335.html From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 14:09:18 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 14:09:18 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E4AD@hqexchange3.dot.state.co.us> Thank You :) ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adenilson Cavalcanti Sent: Wednesday, August 02, 2006 1:58 PM To: rxtx at qbang.org Subject: Re: [Rxtx] JVM Crashing Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago ________________________________ Groups are talking. We?re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/b4eb22cf/attachment-0335.html From tjarvi at qbang.org Wed Aug 2 20:23:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 20:23:42 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > Hi Doug As mentioned off the list, the important point in my mind is that everyone is on the same base more than what license is decided upon. These things are just best addressed early so there isn't confusion. The Apache license is fairly standard in the Open Source community vs several of the relatively unknown [and obviously redundat even by their descriptions] offerings by Sun. Perhaps one option here that would kill a few birds with one stone is to dual license the interface as Apache and LGPL. This would allow everyone to use the interfaces without needing to do wastefull work for internal license requirements. Projects could choose between the two the license that best suits their needs. If there is a software shop doing Java that isn't familiar with the Apache license, they must be doing some strange Java. I do think it is foolhearty to blindly travel in public domain but nobody is trying to undermine the spec files. The intent is to use the work for a JSR submission that everyone can use without confusion later on down the line. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 21:01:16 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 20:01:16 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D166FC.9090005@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> Does this sound like a reasonable plan to everyone? >> > > Hi Doug > > As mentioned off the list, the important point in my mind is that everyone > is on the same base more than what license is decided upon. These things > are just best addressed early so there isn't confusion. > > The Apache license is fairly standard in the Open Source community vs > several of the relatively unknown [and obviously redundat even by > their descriptions] offerings by Sun. The JCP is a reasonable process for what the RxTx project intends to achieve by evolving the API. There isn't much to lose by going the JSR route. The community will benefit from a fair API like so many other that have undergone the process. Sun isn't going to own the API or manipulate it into anything weird anymore than anyone else is. I think your fears are rather vague and unfounded. Which isn't to say that I am a well-informed representative of the JCP, I've only sat through one JSR process and we ended up with javax.usb, and IBM got what it wanted out of the deal and the community got a very nice standard. Paul > > Perhaps one option here that would kill a few birds with one stone is to > dual license the interface as Apache and LGPL. This would allow everyone > to use the interfaces without needing to do wastefull work for internal > license requirements. Projects could choose between the two the license > that best suits their needs. If there is a software shop doing Java that > isn't familiar with the Apache license, they must be doing some strange > Java. > > I do think it is foolhearty to blindly travel in public domain but nobody > is trying to undermine the spec files. The intent is to use the work for > a JSR submission that everyone can use without confusion later on down the > line. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Aug 2 22:10:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 22:10:48 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D166FC.9090005@sun.com> References: <44D166FC.9090005@sun.com> Message-ID: On Wed, 2 Aug 2006, Paul Klissner wrote: > Trent Jarvi wrote: >> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> Does this sound like a reasonable plan to everyone? >>> >> >> Hi Doug >> >> As mentioned off the list, the important point in my mind is that everyone >> is on the same base more than what license is decided upon. These things >> are just best addressed early so there isn't confusion. >> >> The Apache license is fairly standard in the Open Source community vs >> several of the relatively unknown [and obviously redundat even by >> their descriptions] offerings by Sun. > > The JCP is a reasonable process for what the RxTx project intends > to achieve by evolving the API. > > There isn't much to lose by going the JSR route. The community will > benefit from a fair API like so many other that have undergone > the process. Sun isn't going to own the API or manipulate it > into anything weird anymore than anyone else is. I think your > fears are rather vague and unfounded. > > Which isn't to say that I am a well-informed representative > of the JCP, I've only sat through one JSR process and we ended > up with javax.usb, and IBM got what it wanted out of the deal > and the community got a very nice standard. > Hi Paul The JCP should work fine. As our intentions are in line, licensing so that everyone can use the interface code should not be a problem. Note that the current default right now is that the interfaces are copyrighted and no license for distribution is included. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 22:33:51 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 21:33:51 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D166FC.9090005@sun.com> Message-ID: <44D17CAF.1090802@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Paul Klissner wrote: > >> Trent Jarvi wrote: >>> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>> Does this sound like a reasonable plan to everyone? >>>> >>> Hi Doug >>> >>> As mentioned off the list, the important point in my mind is that everyone >>> is on the same base more than what license is decided upon. These things >>> are just best addressed early so there isn't confusion. >>> >>> The Apache license is fairly standard in the Open Source community vs >>> several of the relatively unknown [and obviously redundat even by >>> their descriptions] offerings by Sun. >> The JCP is a reasonable process for what the RxTx project intends >> to achieve by evolving the API. >> >> There isn't much to lose by going the JSR route. The community will >> benefit from a fair API like so many other that have undergone >> the process. Sun isn't going to own the API or manipulate it >> into anything weird anymore than anyone else is. I think your >> fears are rather vague and unfounded. >> >> Which isn't to say that I am a well-informed representative >> of the JCP, I've only sat through one JSR process and we ended >> up with javax.usb, and IBM got what it wanted out of the deal >> and the community got a very nice standard. >> > > Hi Paul > > The JCP should work fine. As our intentions are in line, licensing so > that everyone can use the interface code should not be a problem. Sorry, looks like my concerns were unfounded. I haven't been following the threads closely this week, as work got busy with an escalated issue and new project. Sorry about that. > > Note that the current default right now is that the interfaces are > copyrighted and no license for distribution is included. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Aug 3 03:45:56 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 03 Aug 2006 05:45:56 -0400 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: Hi All, I have been waiting a day for things to cool down. Licensing appears to be a hot-button topic. I have no objection to dual license the interfaces as both Apache and LGPL. Some thoughts: Goal: developers wish to work together on a common piece of code that the team needs. It makes sense that the code base they work on should be Apache-licensed. That makes it possible for the team to use and develop common code, even if the end result is LGPL'd as a whole. If we combine licenses, we must follow the terms of both licenses when distributing the combined work. Thus, the dual license contains the super set of terms in the licenses of Apached and LGPL. This should address concern about using Apache-licensed code within LGPL projects due to the FSF's claim that they are incompatible. Here is a draft statement for RXSL: The RXTX Specification Library (RXSL) uses a dual license strategy for the source code. These licenses are the GNU Lesser General Public License (LGPL) and the Apache License. I strongly encourage users to use the LGPL license and participate fully in the free software community. Dual licensing of the RXSL source code provides open and free access to the technology both for the GPL community and for other developers or companies that cannot use the GPL. Dual license is common practice in open source projects like OpenOffice, Perl and Mozilla. Through the combined use of LGPL and Apache license, developers will have a high degree of freedom yet compatibility and interoperability will be preserved. You can freely modify, extend, and improve the RXSL source code. The only question is whether or not you must provide the source code and contribute modifications to the community. The GNU and Apache licenses allow different ranges of flexibility in this regard, but in the end, regardless of the license used, any and all incompatible changes must be published openly. Note that there is the RXTX Reference Model that uses the org.rxtx package, which itself is protected by the LGPL. This may be part of the distribution, however, it can not be redistributed using a different license. Is everybody OK with this? Thanks Trent, great idea! - Doug From joachim at buechse.de Thu Aug 3 04:15:44 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 3 Aug 2006 12:15:44 +0200 Subject: [Rxtx] JVM Crashing In-Reply-To: <20060802195804.70935.qmail@web53812.mail.yahoo.com> References: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Message-ID: <6ABA2AB2-CECE-4C4B-A7D6-0CDF8B9C95A8@buechse.de> I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of > rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jvermillard at archean.fr Thu Aug 3 04:26:48 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Thu, 03 Aug 2006 12:26:48 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <1154600808.16732.18.camel@localhost.localdomain> Hi, I'm a developer of the Apache MINA framework. It's a network application framework which helps users develop high performance and high scalability network applications easily. http://directory.apache.org/subprojects/mina/index.html . I would like to integrate serial connection to the framework (actualy supporting TCP, UDP (broadcast) and in VM communications), but LGPL is an issue for me. An Apache License would be pretty usefull for me and integrate rxtx functionnalities easly. Thanks, Julien Le jeudi 03 ao?t 2006 ? 05:45 -0400, Dr. Douglas Lyon a ?crit : > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/755cca7f/smime-0335.bin From pascal at quies.net Thu Aug 3 04:32:35 2006 From: pascal at quies.net (Pascal S. de Kloe) Date: Thu, 3 Aug 2006 12:32:35 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <200608031232.35838.pascal@quies.net> Hi Doug, The Apache license is unnessesary complex. It puts all kinds of limitations on the usage. Is there a particular reason why people chose this or was it just the familiar name? I agree with Joachim (again) that the specification and the interfaces should be public domain. However, if we realy need a license then have a look at the X11 license because that one is compatible with the GPL and suits our needs: http://www.fsf.org/licensing/licenses/index_html http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3 ---- start: implementation Copyright (C) 2006 Sun Microsystems, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Sun Microsystems shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Sun Microsystems. Java is a trademark of Sun Microsystems, Inc. ---- end Op donderdag 3 augustus 2006 11:45, schreef Dr. Douglas Lyon: > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Aug 3 05:17:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 05:17:07 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154600808.16732.18.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: On Thu, 3 Aug 2006, Julien Vermillard wrote: > Hi, > > I'm a developer of the Apache MINA framework. It's a network application > framework which helps users develop high performance and high > scalability network applications easily. > http://directory.apache.org/subprojects/mina/index.html . I would like > to integrate serial connection to the framework (actualy supporting TCP, > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > An Apache License would be pretty usefull for me and integrate rxtx > functionnalities easly. > > Thanks, > > Julien > Hi Julien The rxtx license itself will not change. This is just the interface. You would be free to implement an rxtx replacement if the LGPL low level code is a problem for you. These licensing details would make it possible to take the interface code instead of needing to recode them for a new project. You are probably confusing the license problems with the GPL not the LGPL though you can share links to concerns off the list if you would like to go through them. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 11:59:48 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 11:59:48 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E516@hqexchange3.dot.state.co.us> Joachim, I think my both problems (JVM crashing & Port Locking) are being caused by the corruption of "Event Info Struct / EIS" I have noticed with in EIS my "FD" and "Closing" value being overwritten. The problem is definitely in SerialImp.c file. I am trying to understand what the code does and try to pin point the problem by trying few other options. I will keep everybody posted. Regards Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Joachim Buechse Sent: Thursday, August 03, 2006 4:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Thu Aug 3 13:50:07 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 14:50:07 -0500 Subject: [Rxtx] slow startup Message-ID: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete From brian at mbari.org Thu Aug 3 14:05:57 2006 From: brian at mbari.org (Brian Schlining) Date: Thu, 3 Aug 2006 13:05:57 -0700 Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> References: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Message-ID: Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B > Greetings, > I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/ > qbang.org). > > In testing things out, I ran the list ports example from the Wiki, > and it seems to take quite a while for the library to initialize? > Like on the order of 30+ seconds or so after startup (and the RXTX > banner prints), and before the application starts running. > > Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then > I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ > terminal server) and I'm wondering if they are not responding properly > and this is causing the slow startup? Or is this a known problem of > some kind, or maybe something on my system is screwy? > > Thanks, > Pete > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/6123f730/attachment-0334.html From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 14:13:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 14:13:47 -0600 Subject: [Rxtx] slow startup Message-ID: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Hi Pete, RXTX does open and close the ports in Windows. Try downloading utility like PORTMON(only for windows) and you can see that whenever you load RXTX it tries to register all the available COMM ports in the system. It is a little slow if you have virtual ports, we use digi as a terminal server, Its going to get worst of you have comm ports in 100's Thanks Pawan Kharbanda ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Brian Schlining Sent: Thursday, August 03, 2006 2:06 PM To: RXTX Developers and Users Subject: Re: [Rxtx] slow startup Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/94fd105d/attachment-0334.html From pete.flugstad at gmail.com Thu Aug 3 14:32:04 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 15:32:04 -0500 Subject: [Rxtx] slow startup In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Message-ID: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> On 8/3/06, Kharbanda, Pawan wrote: > RXTX does open and close the ports in Windows. Try downloading utility > like PORTMON(only for windows) and you can see that whenever you load RXTX > it tries to register all the available COMM ports in the system. It is a > little slow if you have virtual ports, we use digi as a terminal server, Its > going to get worst of you have comm ports in 100's Okay, I can understand that, but from the PORTMON output, it looks like it's opening each port TWICE: 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS ... 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS Also, assuming instead of listing the ports I wanted to just open one, I'm still seeing the 30 second delay, so it's scanning at startup regardless of what the Java code is going to do. Probably necessary, but annoying. I know, I know, contribute patches... :-) Thanks, Pete From tjarvi at qbang.org Thu Aug 3 15:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 15:04:42 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: On Thu, 3 Aug 2006, Pete Flugstad wrote: > On 8/3/06, Kharbanda, Pawan wrote: >> RXTX does open and close the ports in Windows. Try downloading utility >> like PORTMON(only for windows) and you can see that whenever you load RXTX >> it tries to register all the available COMM ports in the system. It is a >> little slow if you have virtual ports, we use digi as a terminal server, Its >> going to get worst of you have comm ports in 100's > > Okay, I can understand that, but from the PORTMON output, it looks > like it's opening each port TWICE: > > 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > ... > 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > > Also, assuming instead of listing the ports I wanted to just open one, > I'm still seeing the 30 second delay, so it's scanning at startup > regardless of what the Java code is going to do. Probably necessary, > but annoying. > > I know, I know, contribute patches... :-) > I think this problem is in RXTXCommDriver.java. I've just not tracked it down but it should be in the java code, not the native code so easy enough to track down. -- Trent Jarvi tjarvi at qbang.org From jvermillard at archean.fr Fri Aug 4 03:43:28 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:43:28 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: <1154684608.6181.4.camel@localhost.localdomain> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > Hi, > > > > I'm a developer of the Apache MINA framework. It's a network application > > framework which helps users develop high performance and high > > scalability network applications easily. > > http://directory.apache.org/subprojects/mina/index.html . I would like > > to integrate serial connection to the framework (actualy supporting TCP, > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > An Apache License would be pretty usefull for me and integrate rxtx > > functionnalities easly. > > > > Thanks, > > > > Julien > > > > Hi Julien > > The rxtx license itself will not change. This is just the interface. > You would be free to implement an rxtx replacement if the LGPL low level > code is a problem for you. These licensing details would make it possible > to take the interface code instead of needing to recode them for a new > project. > > You are probably confusing the license problems with the GPL not the LGPL > though you can share links to concerns off the list if you would like to > go through them. > > -- > Trent Jarvi > tjarvi at qbang.org Hi, I'm not a license expert but some guys at ASF said me you can't call LGPLed libs from java. some peoples interprete that as static linking and not dynamic linking (no idea why). So ASF/BSD licensied interface willl solve the license probleme. If you got some questions about the ASL and the way you can dual license LGPL/ASL you can ask it on legal-discuss at apache.org Julien -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/8d46c0aa/smime-0334.bin From jvermillard at archean.fr Fri Aug 4 03:51:30 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:51:30 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <1154685091.6181.6.camel@localhost.localdomain> erm from java -> from ASLed Java code Le vendredi 04 ao?t 2006 ? 11:43 +0200, Julien Vermillard a ?crit : > Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > Hi, > > I'm not a license expert but some guys at ASF said me you can't call > LGPLed libs from java. some peoples interprete that as static linking > and not dynamic linking (no idea why). So ASF/BSD licensied interface > willl solve the license probleme. > > If you got some questions about the ASL and the way you can dual license > LGPL/ASL you can ask it on legal-discuss at apache.org > > Julien > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dcc29d70/smime-0334.bin From guille at sms.nl Fri Aug 4 04:35:24 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Fri, 04 Aug 2006 12:35:24 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <7.0.1.0.0.20060804123322.036dc748@sms.nl> At 11:43 04/08/2006, Julien Vermillard wrote: >Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > >Hi, > >I'm not a license expert but some guys at ASF said me you can't call >LGPLed libs from java. some peoples interprete that as static linking >and not dynamic linking (no idea why). This interpretation is wrong. See the official position of the FSF regarding the LGPL and Java: http://www.gnu.org/licenses/lgpl-java.html http://www.fsf.org/licensing/licenses/lgpl-java.html Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From hambyiii at hotmail.com Fri Aug 4 04:52:47 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 10:52:47 +0000 Subject: [Rxtx] error getting InputStream Message-ID: Hi, I have written a program in Java for Windows xp using RXTX (which is why I am using this mailing list :). However, I am getting a problem. I am connecting to a serial port, like so: private CommPortIdentifier portID; private boolean openPort(String selectedPort) { boolean portFound = false; Enumeration portList; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portID.getName().equals(selectedPort)) { portFound = true; break; } } } return portFound; } and then I try and get the serial port input stream (leaving out the try and catch for the sake of space): SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); InputStream inputStream = serialPort.getInputStream(); but on the getInputStream() I get the following error message: Bad file descriptor in nativeavailable I cannot figure out where it is going wrong...anyone any ideas. A quick answer would be wonderful, as I am kinda under the hammer to get this fixed quickly Thanks in Advance Keith From tjarvi at qbang.org Fri Aug 4 05:13:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 05:13:19 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <7.0.1.0.0.20060804123322.036dc748@sms.nl> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> <7.0.1.0.0.20060804123322.036dc748@sms.nl> Message-ID: On Fri, 4 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 11:43 04/08/2006, Julien Vermillard wrote: >> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : >>> On Thu, 3 Aug 2006, Julien Vermillard wrote: >>> >>>> Hi, >>>> >>>> I'm a developer of the Apache MINA framework. It's a network application >>>> framework which helps users develop high performance and high >>>> scalability network applications easily. >>>> http://directory.apache.org/subprojects/mina/index.html . I would like >>>> to integrate serial connection to the framework (actualy supporting TCP, >>>> UDP (broadcast) and in VM communications), but LGPL is an issue for me. >>>> >>>> An Apache License would be pretty usefull for me and integrate rxtx >>>> functionnalities easly. >>>> >>>> Thanks, >>>> >>>> Julien >>>> >>> >>> Hi Julien >>> >>> The rxtx license itself will not change. This is just the interface. >>> You would be free to implement an rxtx replacement if the LGPL low level >>> code is a problem for you. These licensing details would make it possible >>> to take the interface code instead of needing to recode them for a new >>> project. >>> >>> You are probably confusing the license problems with the GPL not the LGPL >>> though you can share links to concerns off the list if you would like to >>> go through them. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >> >> Hi, >> >> I'm not a license expert but some guys at ASF said me you can't call >> LGPLed libs from java. some peoples interprete that as static linking >> and not dynamic linking (no idea why). > > This interpretation is wrong. See the official position of the FSF regarding > the LGPL and Java: > > http://www.gnu.org/licenses/lgpl-java.html > > http://www.fsf.org/licensing/licenses/lgpl-java.html > What I do with legal groups that go down that rat hole is give them a copy of the rxtx 2.0 license. Since the confused legal folks are going in a direction that does not represent the intent of the license or authors at that point and are confused about basic things in our industry that most consider facts, the discussions are very short. The rxtx 2.0 license just adds the following and has for 6 years or so. Not because the lawyers are right. They get confused about intent and even facts. The following is added to make confused lawyers that cant understand intent go far away and never come back. period. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. From hambyiii at hotmail.com Fri Aug 4 05:42:21 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 11:42:21 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Okay, I made a little mistake in my last message. The error is not occuring where I thought it was. Instead it is occuring when I do the following: byte[] readBuffer = new byte[128]; try { int numBytes = 0; try { Thread.sleep(500); } catch (InterruptedException e) {} while (inputStream.available() > 0) { numBytes = inputStream.read(readBuffer); } processReceivedData(readBuffer, numBytes); } catch (IOException e) { System.out.println(e.getMessage()); } So I guess the error is happening on the inputStream.read(readBuffer) again, any help is appreciated and again, thanks in advance Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 10:52:47 +0000 > >Hi, > >I have written a program in Java for Windows xp using RXTX (which is why I >am using this mailing list :). However, I am getting a problem. I am >connecting to a serial port, like so: > private CommPortIdentifier portID; > > private boolean openPort(String selectedPort) > { > boolean portFound = false; > Enumeration portList; > > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portID.getName().equals(selectedPort)) > { > portFound = true; > break; > } > } > } > > return portFound; > } > >and then I try and get the serial port input stream (leaving out the try >and >catch for the sake of space): > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >InputStream inputStream = serialPort.getInputStream(); > >but on the getInputStream() I get the following error message: > >Bad file descriptor in nativeavailable > >I cannot figure out where it is going wrong...anyone any ideas. A quick >answer would be wonderful, as I am kinda under the hammer to get this fixed >quickly > >Thanks in Advance >Keith > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From hambyiii at hotmail.com Fri Aug 4 07:08:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:08:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Hi, I know I am replying to myself a lot at the moment, but more information has come to light (These errors are actually happening on a client machine, on software that has worked for the past month, and only now has started to fail, which is why I am a little slow finding things out) The errors I have already written about are only symptoms of an orignal error. The original error occurs the first time I try to WRITE thte OutputStream: OutputStream oStream = serialPort.getOutputStream(); serialPort.notifyOnOutputEmpty(true); byte[] bs = encodeMessage(configString.toString()); oStream.write(bs); oStream.flush(); The error occurs on oStream.write(bs); and is: Input/output error in writeArray Now writeArray is native code, so I have no idea what is going on there. Any help would be appreciated Thanks Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 11:42:21 +0000 > >Okay, I made a little mistake in my last message. > >The error is not occuring where I thought it was. Instead it is occuring >when I do the following: > >byte[] readBuffer = new byte[128]; > >try { > > int numBytes = 0; > try { > Thread.sleep(500); > } > catch (InterruptedException e) > {} > > while (inputStream.available() > 0) > { > numBytes = inputStream.read(readBuffer); > } > > processReceivedData(readBuffer, numBytes); >} >catch (IOException e) >{ > System.out.println(e.getMessage()); >} > >So I guess the error is happening on the inputStream.read(readBuffer) > >again, any help is appreciated and again, thanks in advance >Keith > > >From: "Keith Thorne" > >Reply-To: RXTX Developers and Users > >To: rxtx at qbang.org > >Subject: [Rxtx] error getting InputStream > >Date: Fri, 04 Aug 2006 10:52:47 +0000 > > > >Hi, > > > >I have written a program in Java for Windows xp using RXTX (which is why >I > >am using this mailing list :). However, I am getting a problem. I am > >connecting to a serial port, like so: > > private CommPortIdentifier portID; > > > > private boolean openPort(String selectedPort) > > { > > boolean portFound = false; > > Enumeration portList; > > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > > while (portList.hasMoreElements()) > > { > > portID = (CommPortIdentifier) portList.nextElement(); > > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > > { > > if (portID.getName().equals(selectedPort)) > > { > > portFound = true; > > break; > > } > > } > > } > > > > return portFound; > > } > > > >and then I try and get the serial port input stream (leaving out the try > >and > >catch for the sake of space): > > > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); > >InputStream inputStream = serialPort.getInputStream(); > > > >but on the getInputStream() I get the following error message: > > > >Bad file descriptor in nativeavailable > > > >I cannot figure out where it is going wrong...anyone any ideas. A quick > >answer would be wonderful, as I am kinda under the hammer to get this >fixed > >quickly > > > >Thanks in Advance > >Keith > > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Aug 4 07:26:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: Hi Keith Can you tell us more about the physical serial port? Might it be 'vanishing?' On Fri, 4 Aug 2006, Keith Thorne wrote: > Hi, > > I know I am replying to myself a lot at the moment, but more information has > come to light (These errors are actually happening on a client machine, on > software that has worked for the past month, and only now has started to > fail, which is why I am a little slow finding things out) > > The errors I have already written about are only symptoms of an orignal > error. The original error occurs the first time I try to WRITE thte > OutputStream: > > OutputStream oStream = serialPort.getOutputStream(); > serialPort.notifyOnOutputEmpty(true); > > byte[] bs = encodeMessage(configString.toString()); > > oStream.write(bs); > oStream.flush(); > > The error occurs on oStream.write(bs); and is: > > Input/output error in writeArray > > Now writeArray is native code, so I have no idea what is going on there. Any > help would be appreciated > Thanks > Keith > > >> From: "Keith Thorne" >> Reply-To: RXTX Developers and Users >> To: rxtx at qbang.org >> Subject: Re: [Rxtx] error getting InputStream >> Date: Fri, 04 Aug 2006 11:42:21 +0000 >> >> Okay, I made a little mistake in my last message. >> >> The error is not occuring where I thought it was. Instead it is occuring >> when I do the following: >> >> byte[] readBuffer = new byte[128]; >> >> try { >> >> int numBytes = 0; >> try { >> Thread.sleep(500); >> } >> catch (InterruptedException e) >> {} >> >> while (inputStream.available() > 0) >> { >> numBytes = inputStream.read(readBuffer); >> } >> >> processReceivedData(readBuffer, numBytes); >> } >> catch (IOException e) >> { >> System.out.println(e.getMessage()); >> } >> >> So I guess the error is happening on the inputStream.read(readBuffer) >> >> again, any help is appreciated and again, thanks in advance >> Keith >> >>> From: "Keith Thorne" >>> Reply-To: RXTX Developers and Users >>> To: rxtx at qbang.org >>> Subject: [Rxtx] error getting InputStream >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 >>> >>> Hi, >>> >>> I have written a program in Java for Windows xp using RXTX (which is why >> I >>> am using this mailing list :). However, I am getting a problem. I am >>> connecting to a serial port, like so: >>> private CommPortIdentifier portID; >>> >>> private boolean openPort(String selectedPort) >>> { >>> boolean portFound = false; >>> Enumeration portList; >>> >>> portList = CommPortIdentifier.getPortIdentifiers(); >>> >>> while (portList.hasMoreElements()) >>> { >>> portID = (CommPortIdentifier) portList.nextElement(); >>> if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) >>> { >>> if (portID.getName().equals(selectedPort)) >>> { >>> portFound = true; >>> break; >>> } >>> } >>> } >>> >>> return portFound; >>> } >>> >>> and then I try and get the serial port input stream (leaving out the try >>> and >>> catch for the sake of space): >>> >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >>> InputStream inputStream = serialPort.getInputStream(); >>> >>> but on the getInputStream() I get the following error message: >>> >>> Bad file descriptor in nativeavailable >>> >>> I cannot figure out where it is going wrong...anyone any ideas. A quick >>> answer would be wonderful, as I am kinda under the hammer to get this >> fixed >>> quickly >>> >>> Thanks in Advance >>> Keith >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From hambyiii at hotmail.com Fri Aug 4 07:52:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:52:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more information >has > > come to light (These errors are actually happening on a client machine, >on > > software that has worked for the past month, and only now has started to > > fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an orignal > > error. The original error occurs the first time I try to WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); > >> } > >> catch (IOException e) > >> { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance > >> Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I am > >>> connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Fri Aug 4 08:21:07 2006 From: gergg at cox.net (Gregg Wonderly) Date: Fri, 04 Aug 2006 09:21:07 -0500 Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: <44D357D3.40303@cox.net> Keith Thorne wrote: > Okay, I made a little mistake in my last message. > > The error is not occuring where I thought it was. Instead it is occuring > when I do the following: > > byte[] readBuffer = new byte[128]; > > try { > > } > catch (IOException e) > { > System.out.println(e.getMessage()); > } > > So I guess the error is happening on the inputStream.read(readBuffer) This is one of the most frustrating things to see over and over. The exception tells you exactly which line the error is occuring on, if you will use it to see where. In Java, these days, every class should do the following. import java.util.logging.*; public class MyClass { Logger log = Logger.getLogger( getClass().getName() ); ...in some method... { String data = ...; // any extra data like addresses or // ports which might be wrong and // cause an exception. try { ... } catch( SomeException ex ) { log.log( Level.SEVERE, ex.toString()+": "+data, ex ); } } } By default, you will see all of the appropriate details of any exception logged at the WARNING or SEVERE level. You can read the javadocs about logging to get more information too. Once you do this, people can then turn up logging and get more information, or otherwise manage it with a logging configuration file or other tools such as JMX or my http://logman.dev.java.net project. Gregg Wonderly From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 09:15:24 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 09:15:24 -0600 Subject: [Rxtx] error getting InputStream Message-ID: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Keith, Please send the full stack trace of the exception, may be I can help you. On Trent's question regarding physical 'Serial Port', do you mean you have a USB(Connected to Client Machine) to 9 Pin Serial cable(Connected to H/W device)? Also please mention which java version you are using? Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Keith Thorne Sent: Friday, August 04, 2006 7:52 AM To: rxtx at qbang.org Subject: Re: [Rxtx] error getting InputStream The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more > > information >has > > come to light (These errors are actually happening on a client > > machine, >on > > software that has worked for the past month, and only now has > > started to fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an > > orignal error. The original error occurs the first time I try to > > WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); } catch (IOException > >> e) { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the > >> inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which > >>> is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I > >>> am connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out > >>> the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get > >>> this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 14:36:16 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 14:36:16 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Trent, As discussed over the phone yesterday, I am emailing you all the details of the bugs I have been experiencing. We do not use Serial Ports like most of the applications. Our application uses approx 80 -100 serial ports (attached thru Digi boxes) which are opened and closed every 20 sec to 1 minute depending upon the type of device. Some Serial ports are left opened all the time and receive event based serial calls while other devices uses polling (request and reply) to collect data. So the opening and closing of the Serial Ports is not really in a sequential order as you mentioned in our conversation yesterday. Also 2 same serial ports can never be opened at one time we have business locks to prevent that from happening. Our findings so far (of course with the help of RXTX user group): The real culprit is in the SerialImp.c file, somehow the other the Event Info Structure in the Linked List gets damaged and loses references to the original EIS structure. I believe both the problems are caused because of the corruption of EIS packet. I have noticed that the link list traversal of EIS in the following methods under SerialImp.c : 1)initialise_event_info_struct 2)finalize_event_info_struct 3)interruptEventLoop So culprit code might be in one of these methods. I am currently using JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and Fedora Core 5). I am also attaching a Test Class to replicate the problem. You need to modify the class and add your systems Serial ports into the code and execute. java TestOpenClosePort 100 It will open and close all the serial ports 100 times in there own thread. Please let me know, I will be available thru out this weekend and can help you as much as I can with testing. Regards Pawan Kharbanda CDOT-ITS 303-478-2991 (cell) 303-985-4350 (home) -------------- next part -------------- A non-text attachment was scrubbed... Name: TestOpenClosePort.java Type: application/octet-stream Size: 6139 bytes Desc: TestOpenClosePort.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dd3754d9/TestOpenClosePort-0333.obj From tjarvi at qbang.org Fri Aug 4 15:43:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 15:43:09 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: Thanks, I'll look at it tomorrow morning. I don't know when I'll find the solution but you may check email tomorrow afternoon to see if I think I found it. On Fri, 4 Aug 2006, Kharbanda, Pawan wrote: > Trent, > As discussed over the phone yesterday, I am emailing you all the > details of the bugs I have been experiencing. We do not use Serial Ports > like most of the applications. Our application uses approx 80 -100 > serial ports (attached thru Digi boxes) which are opened and closed > every 20 sec to 1 minute depending upon the type of device. Some Serial > ports are left opened all the time and receive event based serial calls > while other devices uses polling (request and reply) to collect data. So > the opening and closing of the Serial Ports is not really in a > sequential order as you mentioned in our conversation yesterday. Also 2 > same serial ports can never be opened at one time we have business locks > to prevent that from happening. > > Our findings so far (of course with the help of RXTX user group): > > The real culprit is in the SerialImp.c file, somehow the other the Event > Info Structure in the Linked List gets damaged and loses references to > the original EIS structure. I believe both the problems are caused > because of the corruption of EIS packet. I have noticed that the link > list traversal of EIS in the following methods under SerialImp.c : > > 1)initialise_event_info_struct > 2)finalize_event_info_struct > 3)interruptEventLoop > > So culprit code might be in one of these methods. I am currently using > JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and > Fedora Core 5). > > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > > Regards > Pawan Kharbanda > CDOT-ITS > 303-478-2991 (cell) > 303-985-4350 (home) > > > > > > > > > > From tjarvi at qbang.org Sat Aug 5 12:32:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:32:40 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:34:27 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:34:27 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> You need to run it few times. More the number of ports, more frequently you can reproduce. With just 2 ports it will be hard to reproduce frequently. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:33 PM To: Kharbanda, Pawan Cc: tjarvi at qbang.org; RXTX Developers and Users Subject: Re: Port Locking / JVM Crashing > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Aug 5 12:52:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:52:26 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> Message-ID: Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more frequently > you can reproduce. With just 2 ports it will be hard to reproduce > frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:57:49 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:57:49 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Trent, I have 5 ports of Digi and I can reproduce almost every time. Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX version -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:52 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more > frequently you can reproduce. With just 2 ports it will be hard to > reproduce frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need >> to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From tjarvi at qbang.org Sat Aug 5 13:06:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:06:07 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Message-ID: You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few thousand > iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:07:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:07:33 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E659@hqexchange3.dot.state.co.us> We use our own locks but I haven't turned off the RXTX locks. I am still using the RXTX locks that might be the difference. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:13:22 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:13:22 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Trent, How can you turn off the lock files? I can try using that. I never tried that, I thought you can't turn off the file locking. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From tjarvi at qbang.org Sat Aug 5 13:18:53 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:18:53 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Message-ID: Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java > -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except lockfiles > are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:31:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:31:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Trent, I am able to constantly replicate almost everytime even when I have locks disabled. Don't know the reason why you are not able to on your environment. Any suggestions??????? Cycle No (Thread ::: /dev/cuf04) ::::::: 7 Cycle No (Thread ::: /dev/cuf01) ::::::: 7 Cycle No (Thread ::: /dev/cuf02) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) Exiting Thread ::: /dev/cuf03 Cycle No (Thread ::: /dev/cuf03) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent Port /dev/cuf01 is Opened 0x01 Sent Port /dev/cub01 is Opened 0x01 Sent Port /dev/cuf01 is Closed Port /dev/cuf02 is Closed Port /dev/cuf03 is Closed Port /dev/cuf04 is Closed Port /dev/cub01 is Closed Exiting Thread ::: /dev/cuf03 Exiting Thread ::: /dev/cuf02 Cycle No (Thread ::: /dev/cuf03) ::::::: 8 Cycle No (Thread ::: /dev/cuf02) ::::::: 8 Exiting Thread ::: /dev/cuf04 Exiting Thread ::: /dev/cuf01 Cycle No (Thread ::: /dev/cuf01) ::::::: 8 Cycle No (Thread ::: /dev/cuf04) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened 0x01 Sent Port /dev/cuf01 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 # # An error report file with more information is saved as hs_err_pid21386.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:19 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) > 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux > java -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except > lockfiles are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code >>>> and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm >>> running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From tjarvi at qbang.org Sat Aug 5 14:14:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 14:14:49 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: I'd stick a couple $15 dual port serial boards in the machine to see if its kernel driver specific. I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more problematic. They do not get the same number of eyes looking for problems. You could try putting #undef TIOCSERGETLSR #undef TIOCGICOUNT in the very top of SerialImp.h or one or the other to flip bits of code off and on. The kernel here is 2.6.11.4-20a-smp from Suse. glibc is 2.3.4-23.4 from Suse the jre is 1.5.0_06-b05 from Sun. The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC ram. You should be able to reproduce what I'm seeing then go from there. I don't think I'm going to see this problem without having the same cornercase hardware you have. Maybe we can work that out off the list but I doubt I'm going to find it in rxtx at this point. I have seen problems in the past were kernel structs don't match user space struct and bad things happen but I was including a kernel struct to get functionality that had not made its way into user space at the time. The only thing I may be missing is that when I write 0x01 out the port, nothing comes back. That was not specified but you could easily disconnect anything connected to the ports to see if that changes anything. rxtx is far from bug free but I do not see anything yet. On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I am able to constantly replicate almost everytime even when I have > locks disabled. Don't know the reason why you are not able to on your > environment. Any suggestions??????? > > > Cycle No (Thread ::: /dev/cuf04) ::::::: 7 > Cycle No (Thread ::: /dev/cuf01) ::::::: 7 > Cycle No (Thread ::: /dev/cuf02) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > Exiting Thread ::: /dev/cuf03 > Cycle No (Thread ::: /dev/cuf03) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > Port /dev/cuf01 is Opened > 0x01 Sent > Port /dev/cub01 is Opened > 0x01 Sent > Port /dev/cuf01 is Closed > Port /dev/cuf02 is Closed > Port /dev/cuf03 is Closed > Port /dev/cuf04 is Closed > Port /dev/cub01 is Closed > Exiting Thread ::: /dev/cuf03 > Exiting Thread ::: /dev/cuf02 > Cycle No (Thread ::: /dev/cuf03) ::::::: 8 > Cycle No (Thread ::: /dev/cuf02) ::::::: 8 > Exiting Thread ::: /dev/cuf04 > Exiting Thread ::: /dev/cuf01 > Cycle No (Thread ::: /dev/cuf01) ::::::: 8 > Cycle No (Thread ::: /dev/cuf04) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > 0x01 Sent > Port /dev/cuf01 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 > # > # An error report file with more information is saved as > hs_err_pid21386.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > Aborted > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:19 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Lockfiles are a compile time option. I've turned them on now, corrected > a mistake resulting in only 3 ports being used and now have it going > through a few hundred iterations again without a crash. > > To disable lockfiles.. > > ./configure --disable-lockfiles && make install > > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > Port /dev/ttyS5 is Closed > Exiting Thread ::: /dev/ttyS1 > Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: > /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting > Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port > /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS1 is Closed > Port /dev/ttyS4 is Closed > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > > > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, How can you turn off the lock files? I can try using that. I >> never tried that, I thought you can't turn off the file locking. >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:06 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> You may try 4 ports instead of 5 to make sure thats not the issue. >> >> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >> 2.6.11.4-20a-smp >> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >> java -version java version "1.5.0_06" >> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >> >> I'm using rxtx 2.1-7 (final) with default configuration except >> lockfiles are disabled. I gathered that you are doing your own > resource locking. >> >> ... >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> ... >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>> version >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:52 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> Whats a few times? I've got 4 ports here and have run it a few >>> thousand iterations. >>> >>> Is that true for you if you run it with just four of your DIGI ports? >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> You need to run it few times. More the number of ports, more >>>> frequently you can reproduce. With just 2 ports it will be hard to >>>> reproduce frequently. >>>> >>>> ~pk >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:33 PM >>>> To: Kharbanda, Pawan >>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>> Subject: Re: Port Locking / JVM Crashing >>>> >>>>> I am also attaching a Test Class to replicate the problem. You need > >>>>> to >>>> >>>>> modify the class and add your systems Serial ports into the code >>>>> and >> >>>>> execute. >>>>> >>>>> java TestOpenClosePort 100 >>>>> >>>>> It will open and close all the serial ports 100 times in there own >>>>> thread. >>>>> >>>>> Please let me know, I will be available thru out this weekend and >>>>> can >>> >>>>> help you as much as I can with testing. >>>>> >>>> >>>> How reproducable is the problem with the above testcase? I'm >>>> running >> >>>> 100's of iterations without reproducing the problem. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> >>> >> > From rtlane01 at comcast.net Tue Aug 1 19:22:03 2006 From: rtlane01 at comcast.net (Randall T. Lane) Date: Tue, 01 Aug 2006 21:22:03 -0400 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] Message-ID: <44CFFE3B.90001@comcast.net> Rxtx Community: Please see my e-mail to Trent. Does anyone have any experience using rxtx to successfully communicate with hardware via USB? Thanks. Randy Lane -------------- next part -------------- An embedded message was scrubbed... From: Trent Jarvi Subject: Re: Help with RxTx for USB Communication Date: Tue, 1 Aug 2006 18:49:13 -0600 (MDT) Size: 3300 Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060801/9bbbc255/HelpwithRxTxforUSBCommunication-0331.mht From naranjo.manuel at gmail.com Sun Aug 6 16:59:28 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Sun, 06 Aug 2006 19:59:28 -0300 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44CFFE3B.90001@comcast.net> References: <44CFFE3B.90001@comcast.net> Message-ID: <44D67450.8010100@gmail.com> Randy: I have been able to communicate to AIRcable USB Bluetooth Dongle, with success. I'm not sure which are the options that you have to send to RXTX library, but you can indeed. Check that you do not have the port avaible for much long. I have heard of a problem with WinXP that it simply turn off virtual ports when they are too much long with out activity. If you want I can send you my code, because it is avaible under GPL, the new release is not avaible at AIRcable web site, but it should in short time. Regards, Manu > Rxtx Community: > > Please see my e-mail to Trent. Does anyone have any experience using > rxtx to successfully communicate with hardware via USB? > > Thanks. > > Randy Lane > > ------------------------------------------------------------------------ > > Asunto: > Re: Help with RxTx for USB Communication > De: > Trent Jarvi > Fecha: > Tue, 1 Aug 2006 18:49:13 -0600 (MDT) > Para: > "Randall T. Lane" > > Para: > "Randall T. Lane" > CC: > taj at www.linux.org.uk > > > On Tue, 1 Aug 2006, Randall T. Lane wrote: > >> Trent, >> >> I am working on a project written in Java (1.5) and need to >> communicate to an external device via a USB port. >> >> I have downloaded rxtx-2.1-7-bins-r2.zip from www.rxtx.org and setup >> a Java test project to learn how to use rxtx. I am able to list the >> serial ports available, however rxtx does not recognize my USB port. >> I am running on Windows XP. Here is some output from my test project >> ... >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> COM1 - Serial >> COM3 - Serial >> LPT1 - Parallel >> >> I would appreciate any help you could provide in getting rxtx to >> allow me to communicate via my USB port. >> >> Here is my code, if that would help. >> >> public static void main(String[] args) { >> listPorts(); >> // The listPorts() and getPortTypeName() methods are used for >> port identification. >> static void listPorts() >> { >> Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); >> while ( portEnum.hasMoreElements() ) >> { >> CommPortIdentifier portIdentifier = (CommPortIdentifier) >> portEnum.nextElement(); >> System.out.println(portIdentifier.getName() + " - " + >> getPortTypeName(portIdentifier.getPortType()) ); >> } } >> static String getPortTypeName ( int portType ) >> { >> switch ( portType ) >> { >> case CommPortIdentifier.PORT_I2C: >> return "I2C"; >> case CommPortIdentifier.PORT_PARALLEL: >> return "Parallel"; >> case CommPortIdentifier.PORT_RAW: >> return "Raw"; >> case CommPortIdentifier.PORT_RS485: >> return "RS485"; >> case CommPortIdentifier.PORT_SERIAL: >> return "Serial"; >> default: >> return "unknown type"; >> } >> } >> >> Thanks. >> >> Randy Lane >> > > Hi Randy > > The rxtx mail list is a better place to ask as there are more eyes. > I'm swamped with work. > > Be sure to look to see that your serial port dongle shows up as a > serial port in device manager and no other applications have it open. > USB serial dongles do work with rxtx. Some are less complete than > others. > > -- > Trent Jarvi > tjarvi at qbang.org > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From eddythejekyll at gmail.com Sun Aug 6 23:31:45 2006 From: eddythejekyll at gmail.com (Ed) Date: Sun, 6 Aug 2006 23:31:45 -0600 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? Message-ID: I have written a simple client server (RMI) application without using RxTx where the server controls a parallel port simply by addressing the port and banging the bits in order to drive a relay. It also reads the port's. I am doing this by making Runtime.exec calls to a binary that actually does the parallel port bit banging and reading. However, I'd like to use RxTx so it is a pure Java application, and I've so far installed and figured out how to discover the ports, but I'm having trouble finding good examples or some howto type documentation for this. I did find the two examples on the Wiki: one for serial IO and the other to discover the ports on a system. As I said, I have so far installed RxTx and gotten it to compile and run and I can identify the ports. When I run the server I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found Ports! Found port COM1 Found port COM3 Found port LPT1 LPT1 Not Currently owned EASSwitch Server starting. EASSwitch is bound. Server Ready. So it looks like thing are installed and working, but I feel all dressed up and no idea how to proceed. Basically, I just want to be able to toggle the data lines on the parallel port and read them. Very simple. No parallel printer type usage. Are there any examples I can work off of? If so, please advise. Thank you. -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060806/c7e39898/attachment-0331.html From hambyiii at hotmail.com Sun Aug 6 23:53:54 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Mon, 07 Aug 2006 05:53:54 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Message-ID: Hi, sorry I took the weekend to reply, but I was away for the last couple of days. Unfortunately I cannot send the full stack trace yet. The problem is not, unfortunately, happening on my computer, but on a clients computer, which I will go and visit today. I will hopefully be able to get a stack trace then. As to the physical connection, tt is indeed a USB from the computer, connected to a 9 pin serial device that connects to the hard-ware. My java version is 1.5.06 >From: "Kharbanda, Pawan" >Reply-To: RXTX Developers and Users >To: "RXTX Developers and Users" >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 09:15:24 -0600 > >Keith, > Please send the full stack trace of the exception, may be I can help >you. On Trent's question regarding physical 'Serial Port', do you mean >you have a USB(Connected to Client Machine) to 9 Pin Serial >cable(Connected to H/W device)? > >Also please mention which java version you are using? > >Thanks >Pawan Kharbanda > > >-----Original Message----- >From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >Of Keith Thorne >Sent: Friday, August 04, 2006 7:52 AM >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream > >The physical serial port is actually a USB connection that is then >changed to a "virtual serial port", so I can use the serial port >protocols to connect to it. The other end of the connection is a >hardware device that is constantly turned on. I am not sure about the >port 'vanishing'...we have another piece of software that came with the >hardware device, which we can test the device (and with it the virtual >serial port) with. This has no problem connecting to the serial port or >writing to/reading from the device. >It is only when my software is run, that the error occurs. Like I have >said, my software (using rxtx) is connecting to the serial port >successfully, but it is when I try and write to the serial port that I >get the error. > >Although to be truthful, I am not absolutely certain if the error is >happening on the oStream.write() or the oStream.flush(). I only think it >is the write(), because that is where the writeArray() function is >called. > >thanks >Keith > > > >From: Trent Jarvi > >Reply-To: RXTX Developers and Users > >To: RXTX Developers and Users > >Subject: Re: [Rxtx] error getting InputStream > >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > > > > >Hi Keith > > > >Can you tell us more about the physical serial port? Might it be > >'vanishing?' > > > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > > > Hi, > > > > > > I know I am replying to myself a lot at the moment, but more > > > information > >has > > > come to light (These errors are actually happening on a client > > > machine, > >on > > > software that has worked for the past month, and only now has > > > started to fail, which is why I am a little slow finding things out) > > > > > > The errors I have already written about are only symptoms of an > > > orignal error. The original error occurs the first time I try to > > > WRITE thte > > > OutputStream: > > > > > > OutputStream oStream = serialPort.getOutputStream(); > > > serialPort.notifyOnOutputEmpty(true); > > > > > > byte[] bs = encodeMessage(configString.toString()); > > > > > > oStream.write(bs); > > > oStream.flush(); > > > > > > The error occurs on oStream.write(bs); and is: > > > > > > Input/output error in writeArray > > > > > > Now writeArray is native code, so I have no idea what is going on >there. > >Any > > > help would be appreciated > > > Thanks > > > Keith > > > > > > > > >> From: "Keith Thorne" > > >> Reply-To: RXTX Developers and Users > > >> To: rxtx at qbang.org > > >> Subject: Re: [Rxtx] error getting InputStream > > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > > >> > > >> Okay, I made a little mistake in my last message. > > >> > > >> The error is not occuring where I thought it was. Instead it is > >occuring > > >> when I do the following: > > >> > > >> byte[] readBuffer = new byte[128]; > > >> > > >> try { > > >> > > >> int numBytes = 0; > > >> try { > > >> Thread.sleep(500); > > >> } > > >> catch (InterruptedException e) > > >> {} > > >> > > >> while (inputStream.available() > 0) > > >> { > > >> numBytes = inputStream.read(readBuffer); > > >> } > > >> > > >> processReceivedData(readBuffer, numBytes); } catch (IOException > > >> e) { > > >> System.out.println(e.getMessage()); > > >> } > > >> > > >> So I guess the error is happening on the > > >> inputStream.read(readBuffer) > > >> > > >> again, any help is appreciated and again, thanks in advance Keith > > >> > > >>> From: "Keith Thorne" > > >>> Reply-To: RXTX Developers and Users > > >>> To: rxtx at qbang.org > > >>> Subject: [Rxtx] error getting InputStream > > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > > >>> > > >>> Hi, > > >>> > > >>> I have written a program in Java for Windows xp using RXTX (which > > >>> is > >why > > >> I > > >>> am using this mailing list :). However, I am getting a problem. I > > >>> am connecting to a serial port, like so: > > >>> private CommPortIdentifier portID; > > >>> > > >>> private boolean openPort(String selectedPort) > > >>> { > > >>> boolean portFound = false; > > >>> Enumeration portList; > > >>> > > >>> portList = CommPortIdentifier.getPortIdentifiers(); > > >>> > > >>> while (portList.hasMoreElements()) > > >>> { > > >>> portID = (CommPortIdentifier) portList.nextElement(); > > >>> if (portID.getPortType() == > >CommPortIdentifier.PORT_SERIAL) > > >>> { > > >>> if (portID.getName().equals(selectedPort)) > > >>> { > > >>> portFound = true; > > >>> break; > > >>> } > > >>> } > > >>> } > > >>> > > >>> return portFound; > > >>> } > > >>> > > >>> and then I try and get the serial port input stream (leaving out > > >>> the > >try > > >>> and > > >>> catch for the sake of space): > > >>> > > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", > >2000); > > >>> InputStream inputStream = serialPort.getInputStream(); > > >>> > > >>> but on the getInputStream() I get the following error message: > > >>> > > >>> Bad file descriptor in nativeavailable > > >>> > > >>> I cannot figure out where it is going wrong...anyone any ideas. A > >quick > > >>> answer would be wonderful, as I am kinda under the hammer to get > > >>> this > > >> fixed > > >>> quickly > > >>> > > >>> Thanks in Advance > > >>> Keith > > >>> > > >>> > > >>> _______________________________________________ > > >>> Rxtx mailing list > > >>> Rxtx at qbang.org > > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > > >> > > >> > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Aug 7 06:22:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:22:03 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: Hmm.. I left the test running went I went home Saturday. It looks like something did show up after ~30k iterations. I'll look at it more in my free time. Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS5 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 29417 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 29417 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 29417 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00002aab14c2ec63, pid=20573, tid=1095125344 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6c63] initialise_event_info_struct+0x63 # [thread 1087756640 also had an error] Port /dev/ttyS5 is Opened 0x01 Sent [thread 1089861984 also had an error] Port /dev/ttyS4 is Opened 0x01 Sent [thread 1090914656 also had an error] # An error report file with more information is saved as [thread 1090914656 also had an error] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted On Sat, 5 Aug 2006, Trent Jarvi wrote: > > I'd stick a couple $15 dual port serial boards in the machine to see if its > kernel driver specific. > > I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more > problematic. They do not get the same number of eyes looking for problems. > > You could try putting > > #undef TIOCSERGETLSR > #undef TIOCGICOUNT > > in the very top of SerialImp.h or one or the other to flip bits of code off > and on. > > The kernel here is 2.6.11.4-20a-smp from Suse. > glibc is 2.3.4-23.4 from Suse > the jre is 1.5.0_06-b05 from Sun. > > The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC > ram. > > You should be able to reproduce what I'm seeing then go from there. I don't > think I'm going to see this problem without having the same cornercase > hardware you have. Maybe we can work that out off the list but I doubt I'm > going to find it in rxtx at this point. > > I have seen problems in the past were kernel structs don't match user space > struct and bad things happen but I was including a kernel struct to get > functionality that had not made its way into user space at the time. > > The only thing I may be missing is that when I write 0x01 out the port, > nothing comes back. That was not specified but you could easily disconnect > anything connected to the ports to see if that changes anything. > > rxtx is far from bug free but I do not see anything yet. > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, >> I am able to constantly replicate almost everytime even when I have >> locks disabled. Don't know the reason why you are not able to on your >> environment. Any suggestions??????? >> >> >> Cycle No (Thread ::: /dev/cuf04) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> Exiting Thread ::: /dev/cuf03 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> Port /dev/cuf01 is Opened >> 0x01 Sent >> Port /dev/cub01 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Closed >> Port /dev/cuf02 is Closed >> Port /dev/cuf03 is Closed >> Port /dev/cuf04 is Closed >> Port /dev/cub01 is Closed >> Exiting Thread ::: /dev/cuf03 >> Exiting Thread ::: /dev/cuf02 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 8 >> Exiting Thread ::: /dev/cuf04 >> Exiting Thread ::: /dev/cuf01 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf04) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 >> # >> # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 >> # >> # An error report file with more information is saved as >> hs_err_pid21386.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> Aborted >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:19 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Lockfiles are a compile time option. I've turned them on now, corrected >> a mistake resulting in only 3 ports being used and now have it going >> through a few hundred iterations again without a crash. >> >> To disable lockfiles.. >> >> ./configure --disable-lockfiles && make install >> >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> Port /dev/ttyS5 is Closed >> Exiting Thread ::: /dev/ttyS1 >> Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: >> /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting >> Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port >> /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> >> >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, How can you turn off the lock files? I can try using that. I >>> never tried that, I thought you can't turn off the file locking. >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 1:06 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> You may try 4 ports instead of 5 to make sure thats not the issue. >>> >>> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >>> 2.6.11.4-20a-smp >>> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >>> java -version java version "1.5.0_06" >>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >>> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >>> >>> I'm using rxtx 2.1-7 (final) with default configuration except >>> lockfiles are disabled. I gathered that you are doing your own >> resource locking. >>> >>> ... >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> Port /dev/ttyS4 is Closed >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> ... >>> >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>>> version >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:52 PM >>>> To: Kharbanda, Pawan >>>> Cc: Trent Jarvi; RXTX Developers and Users >>>> Subject: RE: Port Locking / JVM Crashing >>>> >>>> >>>> Whats a few times? I've got 4 ports here and have run it a few >>>> thousand iterations. >>>> >>>> Is that true for you if you run it with just four of your DIGI ports? >>>> >>>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>>> >>>>> You need to run it few times. More the number of ports, more >>>>> frequently you can reproduce. With just 2 ports it will be hard to >>>>> reproduce frequently. >>>>> >>>>> ~pk >>>>> >>>>> -----Original Message----- >>>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>>> Sent: Saturday, August 05, 2006 12:33 PM >>>>> To: Kharbanda, Pawan >>>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>>> Subject: Re: Port Locking / JVM Crashing >>>>> >>>>>> I am also attaching a Test Class to replicate the problem. You need >> >>>>>> to >>>>> >>>>>> modify the class and add your systems Serial ports into the code >>>>>> and >>> >>>>>> execute. >>>>>> >>>>>> java TestOpenClosePort 100 >>>>>> >>>>>> It will open and close all the serial ports 100 times in there own >>>>>> thread. >>>>>> >>>>>> Please let me know, I will be available thru out this weekend and >>>>>> can >>>> >>>>>> help you as much as I can with testing. >>>>>> >>>>> >>>>> How reproducable is the problem with the above testcase? I'm >>>>> running >>> >>>>> 100's of iterations without reproducing the problem. >>>>> >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> >>>> >>> >> > From iinjlv01 at gmail.com Mon Aug 7 06:22:07 2006 From: iinjlv01 at gmail.com (J LV) Date: Mon, 7 Aug 2006 14:22:07 +0200 Subject: [Rxtx] Data lost or Slow sampling Message-ID: Hello I am using RXTX to comm with a motion controller using Serial Port and i can write the commands using SerialPort or RXTXPort without problems, but when i try write and read at high sampling rate, for example to know the position and speed at every moment of a trajectory, i obtain a very irregular response times. I am using the most simple algorimth: 1-Write the command "is trajectory finished?" and wait for SerialPortEvent.DATA_AVAILABLE 2-Read the InputStreamReader of serial port while not empty 3-If trajectory finished then stop program, else, continue 4-Read actual time using System.currentTimeMillis() (t0) 5-Write the command "give me position" and wait for SerialPortEvent.DATA_AVAILABLE 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) 7-Read the InputStreamReader of serial port while not empty 8-Save position in Vector or ArrayList and repeat from 1 I don't know if the problem is the RXTX, my program or the motion controller hardware but i have response times from 16 millis to 78 millis at 19200 bauds!. I am using SwingWorked to threading SerialPort reading/writing process. Any idea or similar data leak problem? Thanks for RXTX project and sorry for my badde english! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/909a4cb3/attachment-0331.html From tjarvi at qbang.org Mon Aug 7 06:50:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:50:10 -0600 (MDT) Subject: [Rxtx] Data lost or Slow sampling In-Reply-To: References: Message-ID: On Mon, 7 Aug 2006, J LV wrote: > Hello > > I am using RXTX to comm with a motion controller using Serial Port and i can > write the commands using SerialPort or RXTXPort without problems, but when i > try write and read at high sampling rate, for example to know the position > and speed at every moment of a trajectory, i obtain a very irregular > response times. I am using the most simple algorimth: > 1-Write the command "is trajectory finished?" and wait for > SerialPortEvent.DATA_AVAILABLE > 2-Read the InputStreamReader of serial port while not empty > 3-If trajectory finished then stop program, else, continue > 4-Read actual time using System.currentTimeMillis() (t0) > 5-Write the command "give me position" and wait for > SerialPortEvent.DATA_AVAILABLE > 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) > 7-Read the InputStreamReader of serial port while not empty > 8-Save position in Vector or ArrayList and repeat from 1 > > > I don't know if the problem is the RXTX, my program or the motion controller > hardware but i have response times from 16 millis to 78 millis at 19200 > bauds!. I am using SwingWorked to threading SerialPort reading/writing > process. > > Any idea or similar data leak problem? > > Thanks for RXTX project and sorry for my badde english! > This can be platform dependant. What you may do for a starting point is use a loopback connection and time the same thing at 19200. Write the date, wait for data available, read the data. I would expect from write to data available to take around 10 ms from past experiences. You can experiment with turning on and off buffering in the port settings of the OS, if the OS supports more realtime like interrupts, that could help. You have a java schedual and the kernel schedual. Serial interrupts traditionally have very high priority but modern OSs tend to realize thats not good for GUIs, ... and delay responding to the interrupts. You should be able to have usec response times in a realtime OS. Windows and Linux are not typically setup as realtime OSs. For comparison, the last time I looked which was about 5 years ago, windows NT4 came back with data available in 8 ms and Linux came back in 10 ms. I would be interested in seeing what you get today. -- Trent Jarvi tjarvi at qbang.org From gergg at cox.net Mon Aug 7 09:21:56 2006 From: gergg at cox.net (Gregg Wonderly) Date: Mon, 07 Aug 2006 10:21:56 -0500 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? In-Reply-To: References: Message-ID: <44D75A94.9030205@cox.net> Ed wrote: > Are there any examples I can work off of? If so, please advise. Just read the javax.comm javadocs. You need to take the parallel port and write values to it based on which bits of which lines you want on and off. Gregg Wonderly From pete.flugstad at gmail.com Mon Aug 7 09:36:19 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 7 Aug 2006 10:36:19 -0500 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44D67450.8010100@gmail.com> References: <44CFFE3B.90001@comcast.net> <44D67450.8010100@gmail.com> Message-ID: <84d4a6d50608070836v97e9a29q96e98441ea903ac7@mail.gmail.com> FYI, I'm talking to a USB<->Serial dongle just fine under Windows XP Pro. I did have to install a driver for the thing - Windows XP by default, did not recognize it. Once installed, it just showed up as another COM port, and I've been pushing data over it with no problems. Pete From savagobr at yahoo.com Mon Aug 7 10:13:06 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Mon, 7 Aug 2006 09:13:06 -0700 (PDT) Subject: [Rxtx] Port Locking / JVM Crashing: 2 ports (Serial + usb) Message-ID: <20060807161306.9648.qmail@web53803.mail.yahoo.com> Trent This is curious, since I did reproduced the aformentioned bug using only 2 ports: /dev/ttyS0 and /dev/ttyUSB0. It only need to run for 500 times: $ java -cp . TestOpenClosePort 500 500 Port /dev/ttyS0 is Closed Excpetion ::: Thread ::: /dev/ttyUSB0null Exiting Thread ::: /dev/ttyUSB0 Cycle No (Thread ::: /dev/ttyUSB0) ::::::: 227 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 184 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x203d2044, pid=32368, tid=2986859424 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing) # Problematic frame: # C 0x203d2044 # # An error report file with more information is saved as /tmp/hs_err_pid32368.log # # If you would like to submit a bug report, please visit: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Best regards Savago ps: Test environment $ uname -a Linux localhost.localdomain 2.6.15-1.2054_FC5 #1 Tue Mar 14 15:48:33 EST 2006 i686 i686 i386 GNU/Linux $ java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) $gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.1 20060525 (Red Hat 4.1.1-1) --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/c6ca8094/attachment-0330.html From Pawan.Kharbanda at dot.state.co.us Mon Aug 7 17:23:25 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 7 Aug 2006 17:23:25 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Trent, I think I got the problem fixed after some code changes in the C (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the staging environment (with 10 devices) with real time data and haven't seen a JVM lock/ Port locking since last night. I am going to do further stress testing and will send all my code changes and my findings in next few days. I believe the problem was causing due to the digi drivers and how the Linux kernel talked to it, so after making some code changes and synchronization fixes, I got it to work. I am keeping my fingers crossed :) Thanks for all your help. You have been a great help. Will keep you posted. Cheers ~pk PS : We are going to test my new RXTX changes with the 2.6 Red Hat kernel (currently using 2.4.21-37.ELsmp) too. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 5:08 PM To: Kharbanda, Pawan Subject: RE: Port Locking / JVM Crashing Hi Pawan As mentioned I did reproduce the error but after several hours of cycles. I'm looking at RXTXPort.java and thinking about what may be happening. The error is in the C layer but it may be preventable in the java code. lets say two closes are overlapping or an operation is trying to happen while another port is closing. The structure may be out of sync by the time the code using the structure in another thread gets to the event info struct. So I'm wondering if synchronization in RXTXPort() and close() may help you. A second thing that may help is you can put printf("got here\n"); in each of the lines in initialize event info struct to verify that the problem is in walking the linked list. Thats my suspicion. So a properly timed close() while calling the constructor may be catching rxtx off guard. You can synchronize to test that and it may do away with the problem. From tjarvi at qbang.org Mon Aug 7 18:01:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 18:01:54 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Message-ID: Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do further > stress testing and will send all my code changes and my findings in next > few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to happen > while another port is closing. The structure may be out of sync by the > time the code using the structure in another thread gets to the event > info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may do > away with the problem. > From Pawan.Kharbanda at dot.state.co.us Tue Aug 8 13:49:14 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 8 Aug 2006 13:49:14 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Trent, I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and have absolutely no problem with JVM crashing or Port Locking even after 10000 operations (now I am trying 100,000 :). This is all with the original RXTX 2.1.7 (final) api's without any of my fixes that I have been trying for last 2-3 weeks. I will suggest that we update the INSTALL or Readme file accompnying the RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: 82000685_G 02/02/2006). This should helped everybody using the RXTX API's with RedHat Linux atleast. Regards Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 6:02 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do > further stress testing and will send all my code changes and my > findings in next few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers > crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to > happen while another port is closing. The structure may be out of > sync by the time the code using the structure in another thread gets > to the event info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may > do away with the problem. > From jimo at earthlink.net Wed Aug 9 21:21:00 2006 From: jimo at earthlink.net (Jim Owen) Date: Wed, 9 Aug 2006 20:21:00 -0700 Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat Message-ID: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Hi All, I've run into some difficulties with rxtx that have me baffled and need some help. I have an application that has used earlier versions of rxtx successfully and on a variety of platforms. We recently needed to deploy this application into an environment where we could not utilize lock files. I pulled down the 2.0.7 pre1 source distribution and executed configure with --disable-lockfiles. I then executed make and make install. When I execute the program, as root, I get the following error: ************************************************************************ Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) # Problematic frame: # C 0x00001004 # # An error report file with more information is saved as hs_err_pid20151.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # **************************************************************************** If I execute as a normal user, I get no errors, but no ports listed: (Using an earlier version, I get a serial and parallel port listed.) **************************************************************************** [jim at linuxDev ingenicoApp]$ java VerifyCommBuild Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Some ports appear to have been found, let's try to enumerate them. Complete. **************************************************************************** When I built rxtx, there was a warning given of the following: **************************************************************************** conftest.c: In function 'main': conftest.c:6: warning: incompatible implicit declaration of built-in function 'printf' conftest.c:7: warning: incompatible implicit declaration of built-in function 'exit' WARNING: Kernel include files do not match the current kernel **************************************************************************** uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux JAVA_HOME=/usr/java/j2sdk1.4.2_11 javax.comm.properties: Driver=gnu.io.RXTXCommDriver Here's the code for VerifyCommBuild.java that I'm using to test: **************************************************************************** import javax.comm.*; import java.util.Enumeration; /** * A quick app to check that the javax.comm (Serial) Communications extension has been properly * installed and configured on this machine. * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. */ public class VerifyCommBuild { public static void main(String args[]) { Enumeration ports; System.out.println("Verifying Comm Build Environment"); try { ports = CommPortIdentifier.getPortIdentifiers(); if (ports == null) { System.out.println("No comm ports found!"); return; } System.out.println("Some ports appear to have been found, let's try to enumerate them."); while (ports.hasMoreElements()) { System.out.println("Here is a port [" + ((CommPortIdentifier)ports.nextElement()).getName() + "]"); } } catch (Exception e) { System.out.println("Failed to enumerate ports [" + e.getMessage() + "]"); e.printStackTrace(); } System.out.println("Complete."); } } **************************************************************************** Any suggestions as to what I'm missing? Thanks, Jim Owen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060809/92503a81/attachment-0328.html From tjarvi at qbang.org Thu Aug 10 05:39:36 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 05:39:36 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Message-ID: On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even after > 10000 operations (now I am trying 100,000 :). This is all with the > original RXTX 2.1.7 (final) api's without any of my fixes that I have > been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying the > RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp > and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From oliver.archner at bayceer.uni-bayreuth.de Wed Aug 9 06:13:36 2006 From: oliver.archner at bayceer.uni-bayreuth.de (Oliver Archner) Date: Wed, 09 Aug 2006 14:13:36 +0200 Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() Message-ID: <44D9D170.5020806@bayceer.uni-bayreuth.de> Dear Users, i would like to send a byte to a parallel device. The following piece of code works well but throws an IOException in LPRPort$ParallelOutputStream.write() saying that everything is ok ?! Oliver import java.io.*; import gnu.io.*; public class Test { public static void main(String[] args) { RXTXCommDriver TxPort = new RXTXCommDriver(); ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", CommPortIdentifier.PORT_PARALLEL); OutputStream oStream = null; try { oStream = pPort.getOutputStream(); oStream.write((byte)0x51); } catch (IOException e) { e.printStackTrace(); } finally { try { if (oStream != null) oStream.close(); } catch (IOException e) { e.printStackTrace(); } } } } Output: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Der Vorgang wurde erfolgreich beendet. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at Test.main(Test.java:12) From tjarvi at qbang.org Thu Aug 10 18:12:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 18:12:27 -0600 (MDT) Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() In-Reply-To: <44D9D170.5020806@bayceer.uni-bayreuth.de> References: <44D9D170.5020806@bayceer.uni-bayreuth.de> Message-ID: On Wed, 9 Aug 2006, Oliver Archner wrote: > Dear Users, > > i would like to send a byte to a parallel device. > The following piece of code works well but throws an IOException in > LPRPort$ParallelOutputStream.write() saying that everything is ok ?! > > Oliver > > > import java.io.*; > import gnu.io.*; > > public class Test { > > public static void main(String[] args) { > RXTXCommDriver TxPort = new RXTXCommDriver(); > ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", > CommPortIdentifier.PORT_PARALLEL); > OutputStream oStream = null; > try { > oStream = pPort.getOutputStream(); > oStream.write((byte)0x51); > } catch (IOException e) { > e.printStackTrace(); > } finally { > try { > if (oStream != null) oStream.close(); > } catch (IOException e) { > e.printStackTrace(); > > } > } > > } > } > > Output: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Der Vorgang wurde erfolgreich beendet. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at Test.main(Test.java:12) WriteFile is returning a negative value or 0. I do not know what that exception is saying but it should be an IO Exception. The native code in question is line 405 in ParallelImp.c. If you find the documentation pointing out how the code is wrong, we can fix it. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 08:12:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 09:12:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question Message-ID: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Hello, I'm trying to send data over a serial port using the RXTX libraries. I've got the binaries for Windows XP from qbang.org. On the receiving side, I'm using event notification (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial Ports InputStream. Similarly on the transmist side, I use SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. First question: does this make sense? The code was largely adopted from an existing Windows C++ program and that's more or less how it operated (overlapped io using ReadFile, WriteFile, GetOverlappedResult, Events, etc). Second question: in a small standalone test program I wrote, everything seems to work just fine - whenever SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good chunk of data available (I explicitly set the in/out buffers to 1024 bytes) to read. However, when I pull my "library" into a much larger environment (OSGI framework based, but same JVM/OS/etc), whenever SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a byte or two available. Needless to say, this really kills performance. Everything appears to still operate properly, just really, really slowly. So, has anyone seen this problem before? I haven't dived into the details of RXTX library, and I'm wondering what the mechanism is here? How does the RXTX thread determine when to issue the SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to tweak in RXTX or the JVM to get this to operate more like the small test program? Seems like I want RXTX to call me back _less_ often. Thanks, Pete From tjarvi at qbang.org Fri Aug 11 09:55:23 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 09:55:23 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Hello, > > I'm trying to send data over a serial port using the RXTX > libraries. I've got the binaries for Windows XP from qbang.org. > > On the receiving side, I'm using event notification > (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial > Ports InputStream. Similarly on the transmist side, I use > SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. > > First question: does this make sense? The code was largely adopted > from an existing Windows C++ program and that's more or less how it > operated (overlapped io using ReadFile, WriteFile, > GetOverlappedResult, Events, etc). > > Second question: in a small standalone test program I wrote, > everything seems to work just fine - whenever > SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good > chunk of data available (I explicitly set the in/out buffers to 1024 > bytes) to read. > > However, when I pull my "library" into a much larger environment > (OSGI framework based, but same JVM/OS/etc), whenever > SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a > byte or two available. Needless to say, this really kills > performance. Everything appears to still operate properly, just > really, really slowly. > > So, has anyone seen this problem before? I haven't dived into the > details of RXTX library, and I'm wondering what the mechanism is here? > How does the RXTX thread determine when to issue the > SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to > tweak in RXTX or the JVM to get this to operate more like the small > test program? > Seems like I want RXTX to call me back _less_ often. > Hi Pete RXTX is doing overlapped IO in termios.c. In this file we map the windows functionality to termios (mostly POSIX). From there, we just talk termios to all platforms. What I guess is happening is the eventloop is waiting a specified amount of time. As you application uses more cpu cycles, you observe the difference in behavior. You could go into the C code and change this after looking at the eventLoop() code in serialImp.c and following that to the serial_ioctl() and serial_select() in termios.c Another option is to go into RXTXPort.java and put a sleep in the sendEvent() code. This way you would not have to recompile the native code (not very easy at this point). -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 13:27:36 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:27:36 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > Another option is to go into RXTXPort.java and put a sleep in the > sendEvent() code. This way you would not have to recompile the native > code (not very easy at this point). Are the instructions in the INSTALL file still valid? If so, it wasn't very hard to build it (I already had MinGW installed). Everything seemed to build just fine. Haven't tried to install/use it yet, but it wasn't a big deal (assuming those instructions were correct. Thanks, Pete From pete.flugstad at gmail.com Fri Aug 11 13:42:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:42:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, but there doesn't appear to be a way to select that via RXTX (which appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control is selected). Is there a way I'm not seeing? Thanks, Pete From eddythejekyll at gmail.com Fri Aug 11 15:20:44 2006 From: eddythejekyll at gmail.com (Ed) Date: Fri, 11 Aug 2006 15:20:44 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion Message-ID: I'm trying to read and write a parallel port on a standard (Dell) pc running RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. I'm having problems getting rxtx to return a port enumeration from getPortIdentifiers. I'm using a file PortChooser.java as a test file to get things going. This is from the Java CookBook 2nd edition (Chapter 12). The call // get list of ports available on this particular computer, // by calling static method in CommPortIdentifier. Enumeration pList = CommPortIdentifier.getPortIdentifiers(); returns a null pList; I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and compile without --disable-lockfiles I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ... When I compile with --disable-lockfiles the call to getPortIdentifiers simply returns a null Enumeration. I've read the documention and threads about this issue and I feel like I've tried everything, so at the moment I'm stumped. I can supply any further info that may help. Thanks in advance. Ed -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060811/80c4eeec/attachment-0326.html From tjarvi at qbang.org Fri Aug 11 18:29:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:29:48 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > On 8/11/06, Trent Jarvi wrote: >> Another option is to go into RXTXPort.java and put a sleep in the >> sendEvent() code. This way you would not have to recompile the native >> code (not very easy at this point). > > Are the instructions in the INSTALL file still valid? If so, it > wasn't very hard to build it > (I already had MinGW installed). Everything seemed to build just > fine. Haven't tried to install/use it yet, but it wasn't a big deal > (assuming those instructions were correct. > Hi Pete The instructions are correct. You will want to make sure that the exports worked. If the library does not work properly, then the exports failed. The exports are currently generated with nm, sed and grep in the Makefile which is often commented out. If the def file is old, it will cause problems. You should be good to go then. Look at the serial_select and eventLoop code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:33:32 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:33:32 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > but there doesn't appear to be a way to select that via RXTX (which > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > is selected). > > Is there a way I'm not seeing? > Hi Pete I'm guessing I didn't know the difference. At the time, I really didn't have windows API documentation. I just had some pages I found with altivista/google. Later microsoft made their documentation available on msdn or I learned about it. For rxtx, the calls need to be platform neutral. So if you see how to do each in termios, then we can get it going. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:45:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:45:24 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Fri, 11 Aug 2006, Ed wrote: > I'm trying to read and write a parallel port on a standard (Dell) pc running > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. > > I'm having problems getting rxtx to return a port enumeration from > getPortIdentifiers. I'm using a file > PortChooser.java as a test file to get things going. This is from the Java > CookBook 2nd edition (Chapter 12). The call > > // get list of ports available on this particular computer, > // by calling static method in CommPortIdentifier. > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > returns a null pList; > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and > compile without --disable-lockfiles I get: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > ... > > When I compile with --disable-lockfiles the call to getPortIdentifiers > simply returns a null Enumeration. > > I've read the documention and threads about this issue and I feel like I've > tried everything, so at the moment I'm stumped. > > I can supply any further info that may help. > > Thanks in advance. > > Ed > Hi Ed You may want to check the permissions of /dev/lp*. Also make sure lp or your kernel support for lp is loaded. It should show up in dmesg and lsmod. For my laptop with no printer port enabled in BIOS is see: lp: driver loaded but no devices found in desg |grep lp [] $ ls -l /dev/lp* crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 here root and group lp can read and write. Normal users cannot. Try a simple read as a user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: Permission denied Fix as root [] chmod 666 /dev/lp* [] $ ls -l /dev/lp* crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 Now as user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: No such device or address So this is saying there is no lp0 on my laptop. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:58:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:58:31 -0600 (MDT) Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat In-Reply-To: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> References: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Message-ID: On Wed, 9 Aug 2006, Jim Owen wrote: > Hi All, > > I've run into some difficulties with rxtx that have me baffled and need > some help. > > I have an application that has used earlier versions of rxtx > successfully and on a variety of platforms. We recently needed to deploy > this application into an environment where we could not utilize lock files. > > I pulled down the 2.0.7 pre1 source distribution and executed configure > with --disable-lockfiles. I then executed make and make install. > > When I execute the program, as root, I get the following error: > > ************************************************************************ > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) > # Problematic frame: > # C 0x00001004 > # > # An error report file with more information is saved as hs_err_pid20151.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > **************************************************************************** > > If I execute as a normal user, I get no errors, but no ports listed: > (Using an earlier version, I get a serial and parallel port listed.) > > **************************************************************************** > [jim at linuxDev ingenicoApp]$ java VerifyCommBuild > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Some ports appear to have been found, let's try to enumerate them. > Complete. > **************************************************************************** > > When I built rxtx, there was a warning given of the following: > > **************************************************************************** > conftest.c: In function 'main': > conftest.c:6: warning: incompatible implicit declaration of built-in > function 'printf' > conftest.c:7: warning: incompatible implicit declaration of built-in > function 'exit' > > WARNING: Kernel include files do not match the current kernel > **************************************************************************** > > > uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 > Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux > > JAVA_HOME=/usr/java/j2sdk1.4.2_11 > > javax.comm.properties: Driver=gnu.io.RXTXCommDriver > > Here's the code for VerifyCommBuild.java that I'm using to test: > > > **************************************************************************** > import javax.comm.*; > import java.util.Enumeration; > /** > * A quick app to check that the javax.comm (Serial) Communications > extension has been properly > * installed and configured on this machine. > * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. > */ > public class VerifyCommBuild > { > public static void main(String args[]) > { > Enumeration ports; > System.out.println("Verifying Comm Build Environment"); > try > { > ports = CommPortIdentifier.getPortIdentifiers(); > if (ports == null) > { > System.out.println("No comm ports found!"); > return; > } > System.out.println("Some ports appear to have been found, let's > try to enumerate them."); > while (ports.hasMoreElements()) > { > System.out.println("Here is a port [" + > ((CommPortIdentifier)ports.nextElement()).getName() > + "]"); > } > } catch (Exception e) > { > System.out.println("Failed to enumerate ports [" + > e.getMessage() + "]"); > e.printStackTrace(); > } > System.out.println("Complete."); > } > } > Hi Jim This is a new one to me. Have you tried it on another system. Maybe something isnt sane in your toolchain. -- Trent Jarvi tarvi at qbang.org From eddythejekyll at gmail.com Sat Aug 12 11:45:39 2006 From: eddythejekyll at gmail.com (Ed) Date: Sat, 12 Aug 2006 11:45:39 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Trent, Right after I sent the results indicated below I re-ran the app and it apparently found the parallel port. The difference was that I set the permissions to : /dev: wildcard lp* crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 I'm still not sure how to interpret the dmesg and lsmod before. However I'm thinking that since the user now has permission to access the lp* port, a request to access it loaded the lp and parport modules automatically and allowed me access. Here's the output of lsmod now: ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp lp 5540 0 (autoclean) parport 21608 1 (autoclean) [parport_pc lp] and dmesg: ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp On node 0 totalpages: 161776 lp0: using parport0 (polling). So I think I'm good, and ready to move on the next steps. Thanks Trent! Ed On 8/12/06, Ed wrote: > > Thanks for the reply Trent. > > I'm on a different system today but am trying your suggestons. This is a > debian 3.1r2 system and I'm running jdk 1.5.0_04. > > Take a look below, but I think I have no parallel port support on this > kernel, however I never get the "No such device or address" return from the > cat call as you did so I'm not sure how to interpret the results. > > When I run the test program (PortChooser.java), the getPortIdentifiers > call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is > more than I found on the RedHat system. Incidently --disable-lockfiles has > no effect. > > It looks as though there is no parallel support in this kernel: > falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > On node 0 totalpages: 161776 > falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > > I'm a little confused by the results when I cat to the lp0 device. It > seems from the dmesg output that I don't have parallel printer support, but > when I cat to the lp0 device, I get permission denied if I'm non-root user > and input/output error if I'm root. Apparently this means I have the device, > but no support in the kernel? > > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > ed at falcon:~/src/workspace/EASServer/src$ su > Password: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > > Here's my lp* device permissions. > /dev: > wildcard lp* > crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > If I change it to > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I get: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > falcon:/home/ed/src/workspace/EASServer/src# exit > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > cat: /dev/lp0: Input/output error > ed at falcon:~/src/workspace/EASServer/src$ > > What do you think? Should I recompile the kernel or is it something else? > > By the way, I added the user ed to the lp and uucp groups on this system. > > Thanks again, > > Ed > > On 8/11/06, Trent Jarvi wrote: > > > > On Fri, 11 Aug 2006, Ed wrote: > > > > > I'm trying to read and write a parallel port on a standard (Dell) pc > > running > > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > > gates. > > > > > > I'm having problems getting rxtx to return a port enumeration from > > > getPortIdentifiers. I'm using a file > > > PortChooser.java as a test file to get things going. This is from the > > Java > > > CookBook 2nd edition (Chapter 12). The call > > > > > > // get list of ports available on this particular computer, > > > // by calling static method in CommPortIdentifier. > > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > > > > > returns a null pList; > > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure > > and > > > compile without --disable-lockfiles I get: > > > > > > Stable Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7 > > > Java lib Version = RXTX-2.1-7 > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > ... > > > > > > When I compile with --disable-lockfiles the call to getPortIdentifiers > > > > > simply returns a null Enumeration. > > > > > > I've read the documention and threads about this issue and I feel like > > I've > > > tried everything, so at the moment I'm stumped. > > > > > > I can supply any further info that may help. > > > > > > Thanks in advance. > > > > > > Ed > > > > > > > Hi Ed > > > > You may want to check the permissions of /dev/lp*. Also make sure lp or > > your kernel support for lp is loaded. It should show up in dmesg and > > lsmod. > > > > For my laptop with no printer port enabled in BIOS is see: > > > > lp: driver loaded but no devices found > > > > in desg |grep lp > > > > [] $ ls -l /dev/lp* > > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > here root and group lp can read and write. Normal users cannot. > > > > Try a simple read as a user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > > > > Fix as root > > > > [] chmod 666 /dev/lp* > > [] $ ls -l /dev/lp* > > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > Now as user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: No such device or address > > > > So this is saying there is no lp0 on my laptop. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > > > -- > > Ed > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060812/c2afe1f8/attachment-0325.html From tjarvi at qbang.org Sat Aug 12 14:01:52 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 12 Aug 2006 14:01:52 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Remember that the lp code expects a printer - or something like it. There is a line that specifies the printer is online. If you are doing hobby work, you will need to raise that line or loop it back to something that is raised. If you just try reading a port with no device connected and online, there will be an error while trying to read. This should be addressed in the mail-list archives. On Sat, 12 Aug 2006, Ed wrote: > Trent, > Right after I sent the results indicated below I re-ran the app and it > apparently found the parallel port. The difference was that I set the > permissions to : > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I'm still not sure how to interpret the dmesg and lsmod before. However I'm > thinking that since the user now has permission to access the lp* port, a > request to access it loaded the lp and parport modules automatically and > allowed me access. Here's the output of lsmod now: > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > lp 5540 0 (autoclean) > parport 21608 1 (autoclean) [parport_pc lp] > > and dmesg: > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > On node 0 totalpages: 161776 > lp0: using parport0 (polling). > > So I think I'm good, and ready to move on the next steps. > > Thanks Trent! > > Ed > > > On 8/12/06, Ed wrote: >> >> Thanks for the reply Trent. >> >> I'm on a different system today but am trying your suggestons. This is a >> debian 3.1r2 system and I'm running jdk 1.5.0_04. >> >> Take a look below, but I think I have no parallel port support on this >> kernel, however I never get the "No such device or address" return from the >> cat call as you did so I'm not sure how to interpret the results. >> >> When I run the test program (PortChooser.java), the getPortIdentifiers >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is >> more than I found on the RedHat system. Incidently --disable-lockfiles has >> no effect. >> >> It looks as though there is no parallel support in this kernel: >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp >> On node 0 totalpages: 161776 >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp >> >> I'm a little confused by the results when I cat to the lp0 device. It >> seems from the dmesg output that I don't have parallel printer support, but >> when I cat to the lp0 device, I get permission denied if I'm non-root user >> and input/output error if I'm root. Apparently this means I have the >> device, >> but no support in the kernel? >> >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> >> cat: /dev/lp0: Permission denied >> ed at falcon:~/src/workspace/EASServer/src$ su >> Password: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> >> Here's my lp* device permissions. >> /dev: >> wildcard lp* >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> If I change it to >> /dev: >> wildcard lp* >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> I get: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> falcon:/home/ed/src/workspace/EASServer/src# exit >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> ed at falcon:~/src/workspace/EASServer/src$ >> >> What do you think? Should I recompile the kernel or is it something else? >> >> By the way, I added the user ed to the lp and uucp groups on this system. >> >> Thanks again, >> >> Ed >> >> On 8/11/06, Trent Jarvi wrote: >> > >> > On Fri, 11 Aug 2006, Ed wrote: >> > >> > > I'm trying to read and write a parallel port on a standard (Dell) pc >> > running >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the >> > gates. >> > > >> > > I'm having problems getting rxtx to return a port enumeration from >> > > getPortIdentifiers. I'm using a file >> > > PortChooser.java as a test file to get things going. This is from the >> > Java >> > > CookBook 2nd edition (Chapter 12). The call >> > > >> > > // get list of ports available on this particular computer, >> > > // by calling static method in CommPortIdentifier. >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); >> > > >> > > returns a null pList; >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure >> > and >> > > compile without --disable-lockfiles I get: >> > > >> > > Stable Library >> > > ========================================= >> > > Native lib Version = RXTX-2.1-7 >> > > Java lib Version = RXTX-2.1-7 >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > ... >> > > >> > > When I compile with --disable-lockfiles the call to getPortIdentifiers >> > >> > > simply returns a null Enumeration. >> > > >> > > I've read the documention and threads about this issue and I feel like >> > I've >> > > tried everything, so at the moment I'm stumped. >> > > >> > > I can supply any further info that may help. >> > > >> > > Thanks in advance. >> > > >> > > Ed >> > > >> > >> > Hi Ed >> > >> > You may want to check the permissions of /dev/lp*. Also make sure lp or >> > your kernel support for lp is loaded. It should show up in dmesg and >> > lsmod. >> > >> > For my laptop with no printer port enabled in BIOS is see: >> > >> > lp: driver loaded but no devices found >> > >> > in desg |grep lp >> > >> > [] $ ls -l /dev/lp* >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > here root and group lp can read and write. Normal users cannot. >> > >> > Try a simple read as a user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: Permission denied >> > >> > Fix as root >> > >> > [] chmod 666 /dev/lp* >> > [] $ ls -l /dev/lp* >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > Now as user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: No such device or address >> > >> > So this is saying there is no lp0 on my laptop. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > >> >> >> >> -- >> >> Ed >> > > > > From pete.flugstad at gmail.com Mon Aug 14 07:51:41 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 08:51:41 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: <84d4a6d50608140651h3cb2266ap90c47780abace00@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > On Fri, 11 Aug 2006, Pete Flugstad wrote: > > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > > but there doesn't appear to be a way to select that via RXTX (which > > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > > is selected). > > I'm guessing I didn't know the difference. At the time, I really didn't > have windows API documentation. I just had some pages I found with > altivista/google. Later microsoft made their documentation available on > msdn or I learned about it. > > For rxtx, the calls need to be platform neutral. So if you see how to do > each in termios, then we can get it going. so, RTSCTS_IN/OUT at the COMM API is mapped to HARDWARE_FLOW_CONTROL in the POSIX layer. Which termios.c maps to RTS_CONTROL_HANDSHAKE and fOutxCtsFlow = true. Since termios.c is Windows only anway... Would it work to change the mapping in termios.c to map hardware flow control to RTS_CONTROL_TOGGLE? I just wondering (I'm going to go look, but there's a lot of code in there) if the code does anything special playing with flow control signals? Thanks, Pete From pete.flugstad at gmail.com Mon Aug 14 09:42:48 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 10:42:48 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> On 8/3/06, Trent Jarvi wrote: > On Thu, 3 Aug 2006, Pete Flugstad wrote: > > Okay, I can understand that, but from the PORTMON output, it looks > > like it's opening each port TWICE: > > I think this problem is in RXTXCommDriver.java. I've just not tracked it > down but it should be in the java code, not the native code so easy > enough to track down. Okay, I'm trying to track this down... Looks like the CommPortIdentifier static initializer loads RXTXCommDriver, and then calls RXTXDriver.initialize. But then CommPortIdentifier.getPortIdentifiers does the exact same thing. So that's where the two scans are coming from. I would guess that one or the other can be removed? Probably the one in the CommPortIdentifier.getPortIdentifiers? Doing so removes the 2nd scan. Pete PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) val = System.getProperty("gnu.io.SerialPorts"); Shouldn't the comparison be != null? getProperty returns null if the variable is NOT found, and you only want to assign to val if it IS found, right? Same thing for the parallel port case. End result is the same I guess, since you check for null later, but probably should be fixed. From eddythejekyll at gmail.com Mon Aug 14 11:55:17 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 11:55:17 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: When I try to get the mode with int mode = pPort.getMode(); it returns 0 which isn't any of the valid modes. I tried setting it explicitely with pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced the requested mode in nativeSetSerialPortParams at gnu.io.LPRPort.setLPRMode(Native Method) at gnu.io.LPRPort.setMode(LPRPort.java:87) Except for LPT_MODE_ANY, but the getMode call still failed out with an invalid state. I'm wondering if it's because I don't have the line pulled high like you said. This isn't a printer connected. It's a relay board with pins 2-9 tied to data, and 18-25 to gnd. The rest are open. I looked at a DB25 pinout diagram and I'm not sure which pin I need to tie high, and I looked through the archives, but didn't find a reference to something definitive. Can someone help me with which pin is the "online" pin as Trent mentioned? DB25 spec has ( I hope this formats correctly in this email) BUSY (11), SEL (13) or INIT (16) are candidates, but I'm guessing. Any clues? *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Thanks, Ed On 8/12/06, Trent Jarvi wrote: > > > Remember that the lp code expects a printer - or something like it. There > is a line that specifies the printer is online. If you are doing hobby > work, you will need to raise that line or loop it back to something that > is raised. > > If you just try reading a port with no device connected and online, there > will be an error while trying to read. This should be addressed in the > mail-list archives. > > On Sat, 12 Aug 2006, Ed wrote: > > > Trent, > > Right after I sent the results indicated below I re-ran the app and it > > apparently found the parallel port. The difference was that I set the > > permissions to : > > /dev: > > wildcard lp* > > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > > > I'm still not sure how to interpret the dmesg and lsmod before. However > I'm > > thinking that since the user now has permission to access the lp* port, > a > > request to access it loaded the lp and parport modules automatically and > > allowed me access. Here's the output of lsmod now: > > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > > lp 5540 0 (autoclean) > > parport 21608 1 (autoclean) [parport_pc lp] > > > > and dmesg: > > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > > On node 0 totalpages: 161776 > > lp0: using parport0 (polling). > > > > So I think I'm good, and ready to move on the next steps. > > > > Thanks Trent! > > > > Ed > > > > > > On 8/12/06, Ed wrote: > >> > >> Thanks for the reply Trent. > >> > >> I'm on a different system today but am trying your suggestons. This is > a > >> debian 3.1r2 system and I'm running jdk 1.5.0_04. > >> > >> Take a look below, but I think I have no parallel port support on this > >> kernel, however I never get the "No such device or address" return from > the > >> cat call as you did so I'm not sure how to interpret the results. > >> > >> When I run the test program (PortChooser.java), the getPortIdentifiers > >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this > is > >> more than I found on the RedHat system. Incidently --disable-lockfiles > has > >> no effect. > >> > >> It looks as though there is no parallel support in this kernel: > >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > >> On node 0 totalpages: 161776 > >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > >> > >> I'm a little confused by the results when I cat to the lp0 device. It > >> seems from the dmesg output that I don't have parallel printer support, > but > >> when I cat to the lp0 device, I get permission denied if I'm non-root > user > >> and input/output error if I'm root. Apparently this means I have the > >> device, > >> but no support in the kernel? > >> > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> > >> cat: /dev/lp0: Permission denied > >> ed at falcon:~/src/workspace/EASServer/src$ su > >> Password: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> > >> Here's my lp* device permissions. > >> /dev: > >> wildcard lp* > >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> If I change it to > >> /dev: > >> wildcard lp* > >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> I get: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> falcon:/home/ed/src/workspace/EASServer/src# exit > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> ed at falcon:~/src/workspace/EASServer/src$ > >> > >> What do you think? Should I recompile the kernel or is it something > else? > >> > >> By the way, I added the user ed to the lp and uucp groups on this > system. > >> > >> Thanks again, > >> > >> Ed > >> > >> On 8/11/06, Trent Jarvi wrote: > >> > > >> > On Fri, 11 Aug 2006, Ed wrote: > >> > > >> > > I'm trying to read and write a parallel port on a standard (Dell) > pc > >> > running > >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > >> > gates. > >> > > > >> > > I'm having problems getting rxtx to return a port enumeration from > >> > > getPortIdentifiers. I'm using a file > >> > > PortChooser.java as a test file to get things going. This is from > the > >> > Java > >> > > CookBook 2nd edition (Chapter 12). The call > >> > > > >> > > // get list of ports available on this particular computer, > >> > > // by calling static method in CommPortIdentifier. > >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > >> > > > >> > > returns a null pList; > >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I > configure > >> > and > >> > > compile without --disable-lockfiles I get: > >> > > > >> > > Stable Library > >> > > ========================================= > >> > > Native lib Version = RXTX-2.1-7 > >> > > Java lib Version = RXTX-2.1-7 > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > ... > >> > > > >> > > When I compile with --disable-lockfiles the call to > getPortIdentifiers > >> > > >> > > simply returns a null Enumeration. > >> > > > >> > > I've read the documention and threads about this issue and I feel > like > >> > I've > >> > > tried everything, so at the moment I'm stumped. > >> > > > >> > > I can supply any further info that may help. > >> > > > >> > > Thanks in advance. > >> > > > >> > > Ed > >> > > > >> > > >> > Hi Ed > >> > > >> > You may want to check the permissions of /dev/lp*. Also make sure lp > or > >> > your kernel support for lp is loaded. It should show up in dmesg and > >> > lsmod. > >> > > >> > For my laptop with no printer port enabled in BIOS is see: > >> > > >> > lp: driver loaded but no devices found > >> > > >> > in desg |grep lp > >> > > >> > [] $ ls -l /dev/lp* > >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > here root and group lp can read and write. Normal users cannot. > >> > > >> > Try a simple read as a user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: Permission denied > >> > > >> > Fix as root > >> > > >> > [] chmod 666 /dev/lp* > >> > [] $ ls -l /dev/lp* > >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > Now as user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: No such device or address > >> > > >> > So this is saying there is no lp0 on my laptop. > >> > > >> > -- > >> > Trent Jarvi > >> > tjarvi at qbang.org > >> > > >> > >> > >> > >> -- > >> > >> Ed > >> > > > > > > > > > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/59164078/attachment-0323.html From eddythejekyll at gmail.com Mon Aug 14 14:19:58 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 14:19:58 -0600 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? Message-ID: I'm using the ParallelPort class to drive a relay board. According to Mr. Jarvi, since this board isn't a printer, there will be a read error unless I hold the "printer online" line high in order to make the API think I'm talking to a printer. The problem is, I can't figure out which line is the "printer online". My DB25 spec lists the following: *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Anyone know which one I should tie high? I tried the busy line and it still errored out on the read. Thanks in advance, -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/66cf3c3e/attachment-0323.html From tjarvi at qbang.org Mon Aug 14 18:06:29 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:06:29 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Mon, 14 Aug 2006, Ed wrote: > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > which isn't any of the valid modes. I tried setting it explicitely with > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced > the requested mode in nativeSetSerialPortParams > at gnu.io.LPRPort.setLPRMode(Native Method) > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > invalid state. This is because rxtx only supports the basics. JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } One could program in more support. When I did that I just had a daisy wheel printer to test with and doing any more would have been blind. So that behavior is expected. I'll look to see if the Parallel Complete book mentions which pins you need to raise. If you look in the source code [ParallelImp.c] you can see this code isn't well tested. It has worked for hobby use in the past as I'd guess you are trying to do. But my experience with the code is as is mentioned in the top of the source: /* fear he who enter here. It appears that things have changed. An attempt has been made to put things the way the should be. It compiles and ParallelBlackBox runs. No further guarantees. Well... One.. it will print "Hello World!" on an epson DX 10 printer. you know.. the 10 character per second daisy wheel printer ;) - Trent Jarvi */ That comment is from 1997 or so. Since then some windows support was contributed but it is still very green code. We get about four requests for parallel support a year so its just not a well traveled area. It would be nice to have some documentation for the people trying to hook parallel ports to electronic projects. That appears to be the exclusive use of the Parallel support. The wiki pages are intended to let people share information like this to help each other in their projects as they figure out the details. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Aug 14 18:40:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:40:40 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: > PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): > > if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) > val = System.getProperty("gnu.io.SerialPorts"); > > Shouldn't the comparison be != null? getProperty returns null if the > variable is NOT found, and you only want to assign to val if it IS > found, right? Same thing for the > parallel port case. End result is the same I guess, since you check > for null later, > but probably should be fixed. I think this is just a fallback to the second property. gnu.io.SerialPorts isn't documented but perhaps it is used. It should behave properly as documented in INSTALL. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 14 18:56:55 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 19:56:55 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: <44E11BD7.5030102@gmail.com> Trent Jarvi wrote: >> PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): >> >> if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) >> val = System.getProperty("gnu.io.SerialPorts"); >> > > I think this is just a fallback to the second property. > gnu.io.SerialPorts isn't documented but perhaps it is used. It should > behave properly as documented in INSTALL. Doh - yup, I missed the fact that the property names were different... Pete From berkland at spamcop.net Mon Aug 14 19:58:21 2006 From: berkland at spamcop.net (Doug Berkland) Date: Mon, 14 Aug 2006 21:58:21 -0400 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? In-Reply-To: References: Message-ID: <269e40090608141858g698c2579v8d962deca3f4df53@mail.gmail.com> Based on memory and this page as confirmation, I would say pin 13 is the "Online" pin for SPP (standard parallel port). http://www.quatech.com/support/comm-over-parallel.php On 8/14/06, Ed wrote: > > I'm using the ParallelPort class to drive a relay board. According to Mr. > Jarvi, since this board isn't a printer, there will be a read error unless I > hold the "printer online" line high in order to make the API think I'm > talking to a printer. The problem is, I can't figure out which line is the > "printer online". My DB25 spec lists the following: > > *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and > Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data > Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 > D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select > 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select > In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit > 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 > Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and > Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground > > Anyone know which one I should tie high? I tried the busy line and it > still errored out on the read. > > Thanks in advance, > > -- > Ed > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/842bb770/attachment-0323.html From eddythejekyll at gmail.com Mon Aug 14 20:25:42 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 20:25:42 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Ah, I see. I've seen the caveats about limited Parallel support, but I thought it was mainly about the javax.comm package. The gnu.io is derived from javax.comm package right? That is, is the parallel support in rxtx is a superset of what's in javax.comm? I'm using this not for hobby usage, but for some simple instrumenation and control. If the project mandates it, I'll gladly work on extending the support. In the meantime, I need to get some sanity checks working, and repair my relay board (I smoked the ULN2803 chip, apparently by tying the BUSY (pin 11) to vcc). I guess I'll try the SEL pin next (and a supply of 2803s) with a ~1K pullup. The caveat in the comment block isn't very encouraging (!), but I borrowed an old Epson Stylus Color 600 printer to see what I can do. If I can write out characters to it I'll be happy. Parallel printers aren't easy to find these days. I haven't yet looked at the native source, yet, but I've just imported it into eclipse and I'll surf around a bit. Ed On 8/14/06, Trent Jarvi wrote: > > On Mon, 14 Aug 2006, Ed wrote: > > > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > > which isn't any of the valid modes. I tried setting it explicitely with > > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to > proced > > the requested mode in nativeSetSerialPortParams > > at gnu.io.LPRPort.setLPRMode(Native Method) > > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > > invalid state. > > This is because rxtx only supports the basics. > > JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > jclass jclazz, jint mode) > { > switch(mode) > { > case LPT_MODE_ANY: > break; > case LPT_MODE_SPP: > case LPT_MODE_PS2: > case LPT_MODE_EPP: > case LPT_MODE_ECP: > case LPT_MODE_NIBBLE: > default: > throw_java_exception( env, > UNSUPPORTED_COMM_OPERATION, > "nativeSetSerialPortParams", > "setLPRMode was unable to proced the > requested \ > mode" > ); > } > return(JNI_TRUE); > } > > One could program in more support. When I did that I just had a daisy > wheel printer to test with and doing any more would have been blind. > > So that behavior is expected. I'll look to see if the Parallel Complete > book mentions which pins you need to raise. If you look in the source > code [ParallelImp.c] you can see this code isn't well tested. It has > worked for hobby use in the past as I'd guess you are trying to do. But > my experience with the code is as is mentioned in the top of the source: > > /* > fear he who enter here. It appears that things have changed. An > attempt > has been made to put things the way the should be. > > It compiles and ParallelBlackBox runs. No further guarantees. > > Well... One.. it will print "Hello World!" on an epson DX 10 > printer. > you know.. the 10 character per second daisy wheel printer ;) > > - Trent Jarvi > */ > > That comment is from 1997 or so. > > Since then some windows support was contributed but it is still very green > code. We get about four requests for parallel support a year so its just > not a well traveled area. > > It would be nice to have some documentation for the people trying to hook > parallel ports to electronic projects. That appears to be the exclusive > use of the Parallel support. The wiki pages are intended to let people > share information like this to help each other in their projects as they > figure out the details. > > -- > Trent Jarvi > tjarvi at qbang.org > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/fbb5ddb4/attachment-0323.html From lyon at docjava.com Tue Aug 15 06:06:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 15 Aug 2006 08:06:27 -0400 Subject: [Rxtx] smoking is bad for your health In-Reply-To: References: Message-ID: Hi All, If you are connecting to the parallel port and smoking chips, it is time for extra stuff to buffer the parallel port. You may be want more current, in which case driver transistors are needed, or, if you are using the port as an output only device, you may like to add your own bus transceiver (e.g., 74245), set for output. Do be careful to design this properly; http://www.beyondlogic.org/spp/parallel.htm Some people like to use Octal D-type F.F's with OC outputs, like a 74374, http://upgrade.cntc.ac.kr/data/ttl/74374.html I like this one, as it has the D FF's and can latch the outputs for presentation to slower electronics (like relays). But careful! A relay that needs more current than the family of the device you have selected will look like a short to ground, and you will smoke your bug! And MOBO's do NOT come with the ability to drive any load you like. Check the power specs on your relay and be sure to protect the chip against back EMF with a diode. It is best to smoke test this on a bread board BEFORE hooking it to the computer. And be sure you smoke test the corner points in the ckt for a while, lest it fail in the field. - Doug >Ah, I see. I've seen the caveats about limited >Parallel support, but I thought it was mainly >about the javax.comm package. The >gnu.io is derived from javax.comm >package right? That is, is the parallel support >in rxtx is a superset of what's in javax.comm? > >I'm using this not for hobby usage, but for some >simple instrumenation and control. If the >project mandates it, I'll gladly work on >extending the support. In the meantime, I need >to get some sanity checks working, and repair my >relay board (I smoked the ULN2803 chip, >apparently by tying the BUSY (pin 11) to vcc). I >guess I'll try the SEL pin next (and a supply of >2803s) with a ~1K pullup. > >The caveat in the comment block isn't very >encouraging (!), ?but?I borrowed an old Epson >Stylus Color 600 printer to see what I can do. >?If I can write out characters to it I'll be >happy. Parallel printers aren't easy to find >these days. > > I haven't yet looked at the native source, yet, >but I've just imported it into eclipse and I'll >surf around a bit. > >Ed > >On 8/14/06, Trent Jarvi <tjarvi at qbang.org> wrote: > >On Mon, 14 Aug 2006, Ed wrote: > >> When I try to get the mode with int mode = pPort.getMode(); it returns 0 >> which isn't any of the valid modes. I tried setting it explicitely with >> pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with >> >> gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced >> the requested mode in nativeSetSerialPortParams >> at gnu.io.LPRPort.setLPRMode(Native Method) >> at gnu.io.LPRPort.setMode(LPRPort.java:87) >> >> Except for LPT_MODE_ANY, but the getMode call still failed out with an >> invalid state. > >This is because rxtx only supports the basics. > >JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > ???????jclass jclazz, jint mode) >{ > ???????switch(mode) > ???????{ > ???????????????case LPT_MODE_ANY: > ???????????????????????break; > ???????????????case LPT_MODE_SPP: > ???????????????case LPT_MODE_PS2: > ???????????????case LPT_MODE_EPP: > ???????????????case LPT_MODE_ECP: > ???????????????case LPT_MODE_NIBBLE: > ???????????????default: > ???????????????????????throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, > ???????????????????????????????"nativeSetSerialPortParams", > ???????????????????????????????"setLPRMode was >unable to proced the requested \ > ???????????????????????????????mode" > ???????????????????????); > ???????} > ???????return(JNI_TRUE); >} > >One could program in more support.??When I did that I just had a daisy >wheel printer to test with and doing any more would have been blind. > >So that behavior is expected.??I'll look to see if the Parallel Complete >book mentions which pins you need to raise.??If you look in the source >code [ParallelImp.c] you can see this code isn't well tested.??It has >worked for hobby use in the past as I'd guess you are trying to do.??But >my experience with the code is as is mentioned in the top of the source: > >/* > fear he who enter here.??It appears that things have changed.??An attempt > has been made to put things the way the should be. > > ???????It compiles and ParallelBlackBox runs.??No further guarantees. > > ???????Well... One.. it will print "Hello World!" on an epson DX 10 printer. > ???????you know.. the 10 character per second daisy wheel printer ;) > > ???????- Trent Jarvi >*/ > >That comment is from 1997 or so. > >Since then some windows support was contributed but it is still very green >code.??We get about four requests for parallel support a year so its just >not a well traveled area. > >It would be nice to have some documentation for the people trying to hook >parallel ports to electronic projects.??That appears to be the exclusive >use of the Parallel support.??The wiki pages are intended to let people >share information like this to help each other in their projects as they >figure out the details. > >-- >Trent Jarvi >tjarvi at qbang.org > > > > >-- >Ed > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 15 13:26:16 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 15 Aug 2006 14:26:16 -0500 Subject: [Rxtx] crash with too much memory Message-ID: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded from qbang.org. I'm exercising the RXTX COMM serial interface, both in a small standalone test and with the same code pulled into a large OSGI framework setup. If I use the stock .jar/.dll's, then everything works correctly in both situations. I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 (mingw-special)). If I use my locally built version, then my small test case works just fine, both when run inside Eclipse and when run standalone on the command line. However, when I try and use my locally built .jar/.dll's in the large framework environment, then I get a JVM crash with the attached log. Normally this would lead me to think that I was running out of memory or something in the large environment, and when I try and play with the JVM memory args, some interesting things show up. In our large environment, we have -Xms32M/-Xmx1024M - this appears to be the problem. If I set max to something like 64M, then things work. The cross over point from working to failing seems to be around 32M/110M (works) and 32M/111M (fails). But 128M/128M works while 128M/129M fails. So it seems to have to do with how much memory is actually available, or something like that. The thing that occurs to me is if my GCC is somehow generating something like "near" calls. But when the JVM has a lot of RAM available, it puts the DLL up somehwere in the address space and then the near calls fail - far calls are needed. So, I'm thinking this is probably a difference in the MinGW GCC I'm using and the one that was used to build the stock binaries from qbang, or maybe some command line args were changed? So, I'm hoping someone will have an idea of what's going on here... Thanks, Pete From tjarvi at qbang.org Tue Aug 15 18:54:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 15 Aug 2006 18:54:04 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: On Tue, 15 Aug 2006, Pete Flugstad wrote: > I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded > from qbang.org. > > I'm exercising the RXTX COMM serial interface, both in a small > standalone test and with the same code pulled into a large OSGI > framework setup. > > If I use the stock .jar/.dll's, then everything works correctly in > both situations. > > I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 > (mingw-special)). > > If I use my locally built version, then my small test case works just > fine, both when run inside Eclipse and when run standalone on the > command line. However, when I try and use my locally built > .jar/.dll's in the large framework environment, then I get a JVM crash > with the attached log. > > Normally this would lead me to think that I was running out of memory > or something in the large environment, and when I try and play with > the JVM memory args, some interesting things show up. > > In our large environment, we have -Xms32M/-Xmx1024M - this appears to > be the problem. If I set max to something like 64M, then things work. > The cross over point from working to failing seems to be around > 32M/110M (works) and 32M/111M (fails). > But 128M/128M works while 128M/129M fails. So it seems to have to do > with how much memory is actually available, or something like that. > > The thing that occurs to me is if my GCC is somehow generating > something like "near" calls. But when the JVM has a lot of RAM > available, it puts the DLL up somehwere in the address space and then > the near calls fail - far calls are needed. > > So, I'm thinking this is probably a difference in the MinGW GCC I'm > using and the one that was used to build the stock binaries from > qbang, or maybe some command line args were changed? > > So, I'm hoping someone will have an idea of what's going on here... > Hi Pete The binaries are from the src. They should be reproducable. I did extensive testing of rxtx several years ago using mingw as the compiler. The version was 2.95. I have not changed versions since. There are way too many variables as it is. I have a linux->mingw cross compiler rpm I use for all windows use. If you want a copy of it you can have it. It isn't anything 'special' :) -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Thu Aug 17 11:49:24 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 17 Aug 2006 12:49:24 -0500 Subject: [Rxtx] crash with too much memory In-Reply-To: References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> On 8/15/06, Trent Jarvi wrote: > I did extensive testing of rxtx several years ago using mingw as the > compiler. The version was 2.95. I have not changed versions since. > There are way too many variables as it is. FYI, I believe I've solved this problem by changing how the dll's were built. The original mingw makefile was generating Serial.def, then performing various operations with dlltool and ld. I modified the makefile to create the dll using this page: as a guide. With that, there's no longer any need to deal with Serial.def and the makefile becomes _much_ simpler. This appears to have addressed my problems with crashing. FWIW, GCC 2.95 is _really_ old - you should consider investigating upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is supposed to generate a native binary (i.e. just like MinGW). Thanks, Pete From claretlc at yahoo.com Thu Aug 17 12:34:48 2006 From: claretlc at yahoo.com (Clare Cooley) Date: Thu, 17 Aug 2006 11:34:48 -0700 (PDT) Subject: [Rxtx] parallel port communication Message-ID: <20060817183448.76911.qmail@web53908.mail.yahoo.com> Hi, I'm trying to write a 1 to a bit 15 on a parallel port cable that isn't attached to a printer.(It's a control box for eye-tracking equipment.)I need to do this in Java. I looked at the javax.comm documentation, and it said, "Application programs should not directly create ParallelPortEvent objects." So is there a way to do this with your package? If not, do you have any suggestions of where to look? It really needs to be done in Java. Thanks, Clare Cooley __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From pat at xvalheru.org Thu Aug 17 13:13:52 2006 From: pat at xvalheru.org (pat) Date: Thu, 17 Aug 2006 21:13:52 +0200 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060817190751.M5586@xvalheru.org> Hi there, I've question(s) for you. I need to communicate with scale, I've used the Sun's direver. Now I've switched to Rxtx and the speed of the communication is perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, but the difference between the crash time is 5 second ... . My question is: Is there a stable driver ??? Or what I have to do to have stable enough serial port driver ??? OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. Thanks to all for the help. Pat From tjarvi at qbang.org Fri Aug 18 05:13:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 05:13:42 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> Message-ID: On Thu, 17 Aug 2006, Pete Flugstad wrote: > On 8/15/06, Trent Jarvi wrote: >> I did extensive testing of rxtx several years ago using mingw as the >> compiler. The version was 2.95. I have not changed versions since. >> There are way too many variables as it is. > > FWIW, GCC 2.95 is _really_ old - you should consider investigating > upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is > supposed to generate a native binary (i.e. just like MinGW). > It is really old but also well known like C itself. I have considered upgrading. The ToyBox builds should be gcc 3* cross-compiled. I'm not going to be validating gcc 3* w32 binaries though. It's looking like we will need to focus support on MSFT's toolchain for 64 bit windows support until it is possible for gcc to support w64. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Aug 18 05:32:10 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 07:32:10 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: Hi All, Does anyone know how to produce mac intel binaries on a Fedora Linux box? Thanks! - Doug From tjarvi at qbang.org Fri Aug 18 06:42:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 06:42:05 -0600 (MDT) Subject: [Rxtx] cross compilation for the mac In-Reply-To: References: Message-ID: On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Does anyone know how to produce > mac intel binaries on a Fedora Linux > box? > > Thanks! > - Doug Hi Doug You need to build the cross toolchain which means copying the Darwin/Mac binaries over to fedora. It would be nontrivial but possible. Do the Darwin libraries work with Mac in general? I'm not aware of the licensing issues associated with grabbing Mac binaries. Same with OpenSolaris/Solaris. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Aug 18 08:15:26 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 10:15:26 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> In theory building against Darwin would be sufficient to getting things working on MacOS X. You need to remember that Darwin is the low-level OS, while MacOS X adds the everything else on top. IOKit, which is the I/O API, is available as part of Darwin. The only thing you will need extra are the Java libraries. One thing is that I would recommend that when producing binaries for the Mac, is to ensure they are Universal binaries (PPC+Intel). Andre > > From: Trent Jarvi > Date: 2006/08/18 Fri AM 08:42:05 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] cross compilation for the mac > > On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > > > Hi All, > > Does anyone know how to produce > > mac intel binaries on a Fedora Linux > > box? > > > > Thanks! > > - Doug > > Hi Doug > > You need to build the cross toolchain which means copying the Darwin/Mac > binaries over to fedora. It would be nontrivial but possible. > > Do the Darwin libraries work with Mac in general? I'm not aware of the > licensing issues associated with grabbing Mac binaries. > > Same with OpenSolaris/Solaris. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Aug 18 13:43:16 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 15:43:16 -0400 Subject: [Rxtx] cross compilation for the mac In-Reply-To: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: >In theory building against Darwin would be sufficient to getting >things working on MacOS X. You need to remember that Darwin is the >low-level OS, while MacOS X adds the everything else on top. IOKit, >which is the I/O API, is available as part of Darwin. The only thing >you will need extra are the Java libraries. > >One thing is that I would recommend that when producing binaries for >the Mac, is to ensure they are Universal binaries (PPC+Intel). > >Andre I find the xcode ide for generating a mix of universal binaries and java very difficult to make work. Is there a way to do this with make files? Thanks! - Doug From ajmas at sympatico.ca Fri Aug 18 13:54:55 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 15:54:55 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818195455.PGAP29052.tomts13-srv.bellnexxia.net@smtp1.sympatico.ca> It should be doable. XCode hands off the compilation process to gcc et al, for the compilation of C/C++ code and to javac et al. for the Java side. While ant is the favoured tool for 'automated' Java compilation, make can easily be used. All is needed is someone to volounteer to do the work. Andre "Dr. Douglas Lyon" wrote > > >In theory building against Darwin would be sufficient to getting > >things working on MacOS X. You need to remember that Darwin is the > >low-level OS, while MacOS X adds the everything else on top. IOKit, > >which is the I/O API, is available as part of Darwin. The only thing > >you will need extra are the Java libraries. > > > >One thing is that I would recommend that when producing binaries for > >the Mac, is to ensure they are Universal binaries (PPC+Intel). > > > >Andre > > I find the xcode ide for generating a mix of universal binaries > and java very difficult to make work. Is there a way to do this > with make files? > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Fri Aug 18 16:34:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 16:34:46 -0600 (MDT) Subject: [Rxtx] serial driver newbe question and problem In-Reply-To: <20060817190751.M5586@xvalheru.org> References: <20060817190751.M5586@xvalheru.org> Message-ID: On Thu, 17 Aug 2006, pat wrote: > Hi there, > > I've question(s) for you. I need to communicate with scale, I've used the > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > but the difference between the crash time is 5 second ... . > > My question is: Is there a stable driver ??? Or what I have to do to have > stable enough serial port driver ??? > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > Thanks to all for the help. > > Pat > Could you describe the hardware you have, the version of rxtx and provide the log of the crash? Did you download binaries? I've not been seeing a jvm crash with rxtx -- Trent Jarvi tjarvi at qbang.org From lunareclipse03 at web.de Sat Aug 19 12:11:48 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 19 Aug 2006 20:11:48 +0200 Subject: [Rxtx] Problem solved! Message-ID: <920065539@web.de> Hi everybody, I posted some months ago and asked about some help on my very special problem concerning my win32 port of a communications library. Now I just want to inform you that no further "mindstorming" is needed because I solved the problem by completely rewriting the win32 port of the library. Now everything works fine. Thank you all for your time and patience. --Sven Ahlemann __________________________________________________________________________ Erweitern Sie FreeMail zu einem noch leistungsst?rkeren E-Mail-Postfach! Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131 From ajmas at sympatico.ca Mon Aug 21 09:58:23 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 21 Aug 2006 11:58:23 -0400 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060821155823.TLSM18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Next time that happens, including a copy of the crash log, produced by Windows could probably help too. Andre Trent Jarvi wrote: > > On Thu, 17 Aug 2006, pat wrote: > > > Hi there, > > > > I've question(s) for you. I need to communicate with scale, I've used the > > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > > but the difference between the crash time is 5 second ... . > > > > My question is: Is there a stable driver ??? Or what I have to do to have > > stable enough serial port driver ??? > > > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > > > Thanks to all for the help. > > > > Pat > > > > Could you describe the hardware you have, the version of rxtx and > provide the log of the crash? Did you download binaries? > > I've not been seeing a jvm crash with rxtx > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From adrian.l.parker at gmail.com Thu Aug 24 09:10:39 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Thu, 24 Aug 2006 11:10:39 -0400 Subject: [Rxtx] Portability issues Message-ID: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use RXTX 2.0? Does it provide system librairies that javax.comm does not? I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, or 2000, or server 2003). Can this be done with a single implementation of RXTX? I don't want to have different versions of Java code that have different package names. References: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Message-ID: On Thu, 24 Aug 2006, Adrian Parker wrote: > Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use > RXTX 2.0? Does it provide system librairies that javax.comm does not? > > I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's > OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, > or 2000, or server 2003). Can this be done with a single implementation of > RXTX? I don't want to have different versions of Java code that have > different package names. > Hi Adrian. The native code can support all of the platforms you mention. I've never compiled for unixware or openunix but the patches are in the code. So you would need to compile for that target. >From there you would probably be best off going with rxtx 2.1 so you have all the classes in one package. You can opt to use rxtx 2.0 with Sun's commapi for Solaris v 2. The main differences are rxtx 2.1 comes with all the source/classes and is in package gnu.io while Sun's requires rxtx for some platforms but is in package javax.comm. The low level code is the same in either case as far as rxtx is concerned. -- Trent Jarvi tarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 04:12:52 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 06:12:52 -0400 Subject: [Rxtx] Serial.addEventListener bug? Message-ID: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on OpenServer 5.0.7). Its what Sun packages. I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an exception. It seems to throw the exception if no listener was previously declared (although I've not had chance to verify). Is this desireable behaviour? Sun's original API doesn't mention anything about an exception on this function, http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) Of course this is an old version of RXTX, so perhaps this has been changed. -- Adrian Parker Simulation Software Developer DLCSPM 4-4-3 (c) Building A31, CFB Kingston Tel: (613) 541-5010 x3020 CSN: 271-3020 Email: parker at lsec.dnd.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/22e2ea57/attachment-0313.html From tjarvi at qbang.org Fri Aug 25 05:15:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 25 Aug 2006 05:15:44 -0600 (MDT) Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: On Fri, 25 Aug 2006, Adrian Parker wrote: > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > OpenServer 5.0.7). Its what Sun packages. > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > exception. It seems to throw the exception if no listener was previously > declared (although I've not had chance to verify). > > Is this desireable behaviour? Sun's original API doesn't mention anything > about an exception on this function, > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > Of course this is an old version of RXTX, so perhaps this has been changed. > > > What exception was thrown? You can replace 1.4-8 with 2.0 for testing purposes. They are the same package. I doubt Sun shipped or packaged that. I think Caldera/SCOx/... did at one point. There may still be updates on their pages. I recall them sending patches here which are in current rxtx. -- Trent Jarvi tjarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 05:28:32 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 07:28:32 -0400 Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: <7da71e910608250428q32b86632g9a67b1b4efe69830@mail.gmail.com> On 8/25/06, Trent Jarvi wrote: > > On Fri, 25 Aug 2006, Adrian Parker wrote: > > > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > > OpenServer 5.0.7). Its what Sun packages. > > > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > > exception. It seems to throw the exception if no listener was > previously > > declared (although I've not had chance to verify). > > > > Is this desireable behaviour? Sun's original API doesn't mention > anything > > about an exception on this function, > > > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > > > Of course this is an old version of RXTX, so perhaps this has been > changed. > > > > > > > > What exception was thrown? Its weird. I catch an Exception. But when on that exception I call getClass().getName() I end up with a NullPointerException. You can replace 1.4-8 with 2.0 for testing > purposes. They are the same package. > > I doubt Sun shipped or packaged that. Doh! I meant to say SCO sorry. I was surfing Sun's site when I wrote that :) Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/e43aed3a/attachment-0313.html From sjudd at seas.upenn.edu Sat Aug 26 16:42:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Sat, 26 Aug 2006 18:42:09 -0400 Subject: [Rxtx] Mac commapi Message-ID: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? If so, where do I get it? Sun has various versions at http://www.sun.com/download/products.xml?id=43208d3d but they are for SolarisSparc, SolarisX86, Linux, and Generic. Do I use the Generic one? If so, read on; otherwise redirect me. While using the Generic version, my attempt to run the BlackBox sample program elicits a message saying it "can't find javax.comm.properties". I found a note in the rxtx.org HowTo (for Linux) saying to create this thing in /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties but where should it go on the Mac? After reading many versions of documentation around, and updates and revisions and re-authorings, I have worked my way into a state of confusion and high uncertainty. Please release me. sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060826/02d6b163/attachment-0283.html From tod at todbot.com Sat Aug 26 17:08:33 2006 From: tod at todbot.com (Tod E. Kurt) Date: Sat, 26 Aug 2006 16:08:33 -0700 Subject: [Rxtx] Mac commapi In-Reply-To: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Message-ID: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> You don't need Sun's CommAPI. You just need RXTX. Once you download RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and the native library is ("librxtxSerial.jnilib" on Mac OS X) via the standard methods. For instance, if you've placed those two files in a directory called 'rxtxlib' and you want to run a Java class called HelloWorld in the current directory, do the following: % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar HelloWorld On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? > If so, where do I get it? Sun has various versions at > http://www.sun.com/download/products.xml?id=43208d3d > but they are for SolarisSparc, SolarisX86, Linux, and Generic. > Do I use the Generic one? > If so, read on; otherwise redirect me. > > While using the Generic version, my attempt to run the BlackBox > sample program > elicits a message saying it "can't find javax.comm.properties". > I found a note in the rxtx.org HowTo (for Linux) saying to create > this thing in > /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties > but where should it go on the Mac? > > After reading many versions of documentation around, and updates > and revisions > and re-authorings, I have worked my way into a state of confusion > and high > uncertainty. Please release me. > > sj > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From sjudd at seas.upenn.edu Sun Aug 27 22:55:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Mon, 28 Aug 2006 00:55:09 -0400 Subject: [Rxtx] Mac commapi In-Reply-To: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> Message-ID: This was immensely helpful. Thank you, Tod. I wish it had been explicit somewhere in the documentation; it would have saved me 2 days of grief. One hugely valuable thing like this little set of instructions is that it implicitly lists all the hundreds of things you DON"T have to do. I know it seems obvious to those in the know, but every little bit of help on an arcane topic like this opens up the product to an exponentially wider group of dilettantes. I managed to get the SerialDemo program (from Sun) to work too. Hurrah! However, it required changing all the javax.comm references to gnu.io which I had heard of due to all my rambling readings. Is there not a demo program on rxtx.org already available that would not have needed this? BTW, the link on the Projects page for jPIC[Source] sends a *.hex file to a PIC 16F877 or similar chip... takes me to nowhere useful. I do not understand what the name "Toybox" is meant to imply. Thanks, sj On 2006 Aug 26, at 7:08 PM, Tod E. Kurt wrote: > You don't need Sun's CommAPI. You just need RXTX. Once you download > RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and > the native library is ("librxtxSerial.jnilib" on Mac OS X) via the > standard methods. > > For instance, if you've placed those two files in a directory called > 'rxtxlib' and you want to run a Java class called HelloWorld in the > current directory, do the following: > > % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar > HelloWorld > > > On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > >> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? >> If so, where do I get it? Sun has various versions at >> http://www.sun.com/download/products.xml?id=43208d3d >> but they are for SolarisSparc, SolarisX86, Linux, and Generic. >> Do I use the Generic one? >> If so, read on; otherwise redirect me. >> >> While using the Generic version, my attempt to run the BlackBox >> sample program >> elicits a message saying it "can't find javax.comm.properties". >> I found a note in the rxtx.org HowTo (for Linux) saying to create >> this thing in >> /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties >> but where should it go on the Mac? >> >> After reading many versions of documentation around, and updates >> and revisions and re-authorings, I have worked my way into a state >> of confusion and high uncertainty. Please release me. >> >> sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060827/b80d6389/attachment-0283.html From pete.flugstad at gmail.com Mon Aug 28 12:38:27 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 13:38:27 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE Message-ID: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Okay, my understanding is that originally, RTS meant "Request to Send" - the DTE (the PC) would assert this and the DCE (modem) would assert "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send data. This really only provided uni-directional flow control, from the PC to the modem. Now, as I understand it, the more modern usage of RTS is that it is used for the DTE to assert flow control back to the DCE - basically it means "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) raises this, then the DCE(modem) is free to send data to the DTE - this allows the DTE(PC) to exert flow control back towards the DCE(modem). This discussion is based on the Serial HOWTO from: and lots of other reading... Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which is defined as: > Enables RTS flow-control handshaking. The driver raises the RTS line, > enabling the DCE to send, when the input buffer has enough room to > receive data. The driver lowers the RTS line, preventing the DCE to > send, when the input buffer does not have enough room to receive > data. If this value is used, it is an error for the application to adjust > the line with EscapeCommFunction. which clearly reflects the newer usage style - it keeps the RTS line high as long as there is space to _receive_ data. And takes it low when the receive/input buffer is getting full to stop the modem from sending it data. Does this jive with other peoples understanding of RTS usage? Unfortunately, the hardware I'm trying to talk to wants to use the OLD style of RTS line usage. An existing Windows C++ program uses RTS_CONTROL_TOGGLE, which documentation states: > Specifies that the RTS line will be high if bytes are available for transmission. > After all buffered bytes have been sent, the RTS line will be low. If this value is > set, it would be an error for an application to adjust the line with > EscapeCommFunction. This value is ignored in Windows 95; it causes the > driver to act as if RTS_CONTROL_ENABLE were specified. This seems to be the OLD RTS behavior, right? So, what I seem to need is to be able to control the RTS line, either using TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS when getting ready to TX and clear it when the output buffer is empty). Does this make sense, or am I off in the weeds? Thanks, Pete From tjarvi at qbang.org Mon Aug 28 18:21:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 28 Aug 2006 18:21:10 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: On Mon, 28 Aug 2006, Pete Flugstad wrote: > Okay, my understanding is that originally, RTS meant "Request to Send" > - the DTE (the PC) would assert this and the DCE (modem) would assert > "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send > data. This really only provided uni-directional flow control, from the PC to > the modem. > > Now, as I understand it, the more modern usage of RTS is that it is used > for the DTE to assert flow control back to the DCE - basically it means > "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) > raises this, then the DCE(modem) is free to send data to the DTE - this > allows the DTE(PC) to exert flow control back towards the DCE(modem). > > This discussion is based on the Serial HOWTO from: > > > > and lots of other reading... > > Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > is defined as: > >> Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > > which clearly reflects the newer usage style - it keeps the RTS line high > as long as there is space to _receive_ data. And takes it low when the > receive/input buffer is getting full to stop the modem from sending it data. > > Does this jive with other peoples understanding of RTS usage? > > Unfortunately, the hardware I'm trying to talk to wants to use the OLD > style of RTS line usage. An existing Windows C++ program uses > RTS_CONTROL_TOGGLE, which documentation states: > >> Specifies that the RTS line will be high if bytes are available for transmission. >> After all buffered bytes have been sent, the RTS line will be low. If this value is >> set, it would be an error for an application to adjust the line with >> EscapeCommFunction. This value is ignored in Windows 95; it causes the >> driver to act as if RTS_CONTROL_ENABLE were specified. > > This seems to be the OLD RTS behavior, right? > > So, what I seem to need is to be able to control the RTS line, either using > TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS > when getting ready to TX and clear it when the output buffer is empty). > > Does this make sense, or am I off in the weeds? > Hi Pete OK. That sounds right. I do not know how you would communicate the difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through CommAPI as it stands. I take it you did not find anything either? Perhaps the best thing to do for your code is to toggle the RTS yourself. This could be a feature in the future JSR API perhaps. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 28 20:54:34 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 21:54:34 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <44F3AC6A.10908@gmail.com> Trent Jarvi wrote: > OK. That sounds right. I do not know how you would communicate the > difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through > CommAPI as it stands. I take it you did not find anything either? > > Perhaps the best thing to do for your code is to toggle the > RTS yourself. This could be a feature in the future JSR API perhaps. Yeah, this is what I ended up doing. I had to modify the dll in order to be able to set hardware flow control (which I do want), but leave the RTS flow control at RS_CONTROL_ENABLE. After that I just toggle setRTS(true) when I'm ready to send and setRTS(false) when I get a OUTPUT_BUFFER_EMPTY notification. Haven't tested with real hardware yet, but it seems to work OK. Thanks for the feedback! Pete From Bob_Jacobsen at lbl.gov Tue Aug 29 08:49:02 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 29 Aug 2006 07:49:02 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >is defined as: > > > Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > >which clearly reflects the newer usage style - it keeps the RTS line high >as long as there is space to _receive_ data. And takes it low when the >receive/input buffer is getting full to stop the modem from sending it data. > >Does this jive with other peoples understanding of RTS usage? Can you point to any devices that actually implement this "new" understanding? I think the person who wrote that documentation paragraph is just confused. The original "RTS/CTS" handshaking was extended to input (from DCE to DTE) handshaking via the DTR (Data Terminal Ready) line. I think the person who wrote the double-quoted paragraph above was just confused between the directions, and mixed them up. If you change "RTS" to "DTR" in that paragraph, you get: > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > enabling the DCE to send, when the input buffer has enough room to > > receive data. The driver lowers the DTR line, preventing the DCE to > > send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. which describes how dozens of devices actually work for controlling flow into the DTE (computer). This then leaves RTS/CTS (with RTS usually just stuck high) for controlling flow into the DCE (peripheral). Again, lots of hardware devices actually do this. I don't work on Windows, so can't be sure of what happens. But on the MacOS X version of RXTX, CTS low stops transmission, exactly as the "old" style would expect. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From mschned at basis.com Tue Aug 29 12:57:45 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 12:57:45 -0600 Subject: [Rxtx] Porting to AIX Message-ID: <01f201c6cb9d$034d4f20$341416ac@basis.com> Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar From mschned at basis.com Tue Aug 29 13:58:05 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 13:58:05 -0600 Subject: [Rxtx] Porting to AIX References: <01f201c6cb9d$034d4f20$341416ac@basis.com> Message-ID: <024901c6cba5$714c3560$341416ac@basis.com> After looking through the build messages closer, there is an error building SerialImp.c: gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type Looks like B57600 is not defined and there are no definitions for DEVICEDIR and LOCKDIR on AIX. Can I just a the following to SerialImp.h? #if defined(__aix__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __aix__ */ Mark Schnedar ----- Original Message ----- From: "Mark E. Schnedar" To: Sent: Tuesday, August 29, 2006 12:57 PM Subject: [Rxtx] Porting to AIX Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 29 15:25:35 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 29 Aug 2006 16:25:35 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <84d4a6d50608291425i1fb819d3i615cf9b85b1e9617@mail.gmail.com> On 8/29/06, Bob Jacobsen wrote: > Can you point to any devices that actually implement this "new" understanding? > > I think the person who wrote that documentation paragraph is just confused. The paragraph is from the Windows documentation of its DCB structure which is used to configure the Serial Device. This is what RXTX uses internally. My version is from MSDN, and Google finds the same text here: (search for fRtsControl). I have not seen any mention anywhere of it being incorrect (and yes, I did look, because I thought the same thing). My discussion is based on trying to use RXTX to talk to a device that used the old style of one-way flow control (RTS is raised to SEND data from the PC to the device). An existing VC++ app use the old-style RTS_CONTROL_TOGGLE. RXTX did not - it used the newer style RTS_CONTROL_HANDSHAKE, so things didn't work - the device was seeing RTS HIGH all the time, so it was thinking that the PC was ready to TX all the time. When I switch RXTX to using RTS_CONTROL_ENABLED and manually control RTS, then things work correctly. The behavior is consistent with this understanding if I hook two serial ports on Windows XP in lookback (via null modem). I'd be very surprised if this had not been corrected by M$ by this time. The same structure has been around since WinNT (mid 1990's) - their documentation is typically pretty good. > > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > > enabling the DCE to send, when the input buffer has enough room to > > > receive data. The driver lowers the DTR line, preventing the DCE to > > > send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. There is a seperate field, fDtrControl, which you can set to DTR_CONTROL_HANDSHAKE, that appears to do exactly this. > This then leaves RTS/CTS (with RTS usually just stuck high) for > controlling flow into the DCE (peripheral). Again, lots of hardware > devices actually do this. > > I don't work on Windows, so can't be sure of what happens. But on > the MacOS X version of RXTX, CTS low stops transmission, exactly as > the "old" style would expect. Well, the Linux Serial HOWTO is where I got most of my information. And yes, I thought it was wrong as well, but it's apparently how things are implemented: Donno - but it works for me... Pete From tjarvi at qbang.org Tue Aug 29 19:11:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 29 Aug 2006 19:11:40 -0600 (MDT) Subject: [Rxtx] Porting to AIX In-Reply-To: <024901c6cba5$714c3560$341416ac@basis.com> References: <01f201c6cb9d$034d4f20$341416ac@basis.com> <024901c6cba5$714c3560$341416ac@basis.com> Message-ID: Hi Mark That should do it. You can put ifdef around the B57600 as we did with higher baudrates. You may want to use tip, minicom, kermit or some other serial application on the AIX to confirm that the lockfiles created are correct. Neat stuff. On Tue, 29 Aug 2006, Mark E. Schnedar wrote: > After looking through the build messages closer, > there is an error building SerialImp.c: > > gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o > /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type > > Looks like B57600 is not defined and there are no > definitions for DEVICEDIR and LOCKDIR on AIX. > > Can I just a the following to SerialImp.h? > > #if defined(__aix__) > # define DEVICEDIR "/dev/" > # define LOCKDIR "/var/lock" > # define LOCKFILEPREFIX "LCK.." > # define FHS > #endif /* __aix__ */ > > Mark Schnedar > > > ----- Original Message ----- > From: "Mark E. Schnedar" > To: > Sent: Tuesday, August 29, 2006 12:57 PM > Subject: [Rxtx] Porting to AIX > > > Hi, > > I'm new to rxtx. Currently my company has an interpreter product > that uses rxtx on Windows and Linux. I am trying to get rxtx to > build on AIX. I downloaded rxtx, ran ./configure and make. When > I run make I get the following error: > > libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object > make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 > > Do you have any suggestions on how to fix this problem? > > I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error > on both systems). I did have our system administrator load > automake, autoconf, make (gnu), and gcc. Here are the versions: > > AIX 4.3.3 AIX 5.3.0 > rxtx: 2.1-7r2 2.1-7r2 > autoconf: 2.53 2.59 > automake: 1.5 1.8.5 > make: 3.79.1 3.80 > gcc: (used native cc) 4.0.0 > > Any help would be appreciated. > > Mark Schnedar > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From guille at sms.nl Wed Aug 30 01:14:32 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 09:14:32 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <7.0.1.0.0.20060830091204.03652de0@sms.nl> At 16:49 29/08/2006, Bob Jacobsen wrote: >At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > > > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >is defined as: > > > > > Enables RTS flow-control handshaking. The driver raises the RTS line, > >> enabling the DCE to send, when the input buffer has enough room to > >> receive data. The driver lowers the RTS line, preventing the DCE to > >> send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. > > > >which clearly reflects the newer usage style - it keeps the RTS line high > >as long as there is space to _receive_ data. And takes it low when the > >receive/input buffer is getting full to stop the modem from sending it data. > > > >Does this jive with other peoples understanding of RTS usage? > >Can you point to any devices that actually implement this "new" understanding? Many (most) of the embedded devices we work with implement this kind of flow control. The host (DTE) raises RTS when it can receive data, and lowers it when the input buffers are full. In turn it watches the CTS line to see whether it can send data to the DCE. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From tjarvi at qbang.org Wed Aug 30 01:23:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 30 Aug 2006 01:23:46 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830091204.03652de0@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 16:49 29/08/2006, Bob Jacobsen wrote: >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: >>> >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >>> is defined as: >>> >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, >>>> enabling the DCE to send, when the input buffer has enough room to >>>> receive data. The driver lowers the RTS line, preventing the DCE to >>>> send, when the input buffer does not have enough room to receive >>>> data. If this value is used, it is an error for the application to adjust >>>> the line with EscapeCommFunction. >>> >>> which clearly reflects the newer usage style - it keeps the RTS line high >>> as long as there is space to _receive_ data. And takes it low when the >>> receive/input buffer is getting full to stop the modem from sending it data. >>> >>> Does this jive with other peoples understanding of RTS usage? >> >> Can you point to any devices that actually implement this "new" understanding? > > Many (most) of the embedded devices we work with implement this kind of flow > control. The host (DTE) raises RTS when it can receive data, and lowers it > when the input buffers are full. In turn it watches the CTS line to see > whether it can send data to the DCE. > I think this explains some hardware control 'bugs' I've seen. -- Trent Jarvi tjarvi at qbang.org From guille at sms.nl Wed Aug 30 02:01:35 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 10:01:35 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> At 09:23 30/08/2006, Trent Jarvi wrote: >On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > > > At 16:49 29/08/2006, Bob Jacobsen wrote: > >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >>> > >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >>> is defined as: > >>> > >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, > >>>> enabling the DCE to send, when the input buffer has enough room to > >>>> receive data. The driver lowers the RTS line, preventing the DCE to > >>>> send, when the input buffer does not have enough room to receive > >>>> data. If this value is used, it is an error for the > application to adjust > >>>> the line with EscapeCommFunction. > >>> > >>> which clearly reflects the newer usage style - it keeps the RTS line high > >>> as long as there is space to _receive_ data. And takes it low when the > >>> receive/input buffer is getting full to stop the modem from > sending it data. > >>> > >>> Does this jive with other peoples understanding of RTS usage? > >> > >> Can you point to any devices that actually implement this "new" > understanding? > > > > Many (most) of the embedded devices we work with implement this > kind of flow > > control. The host (DTE) raises RTS when it can receive data, and lowers it > > when the input buffers are full. In turn it watches the CTS line to see > > whether it can send data to the DCE. > > > >I think this explains some hardware control 'bugs' I've seen. I think the above is the most widespread use, but that may just mean it is the most widespread use in our specific segment (embedded systems). Some UART chips (e.g. from Exar) implement this kind of flow control directly in hardware. For example the Exar can be configured to suspend transmission when it sees CTS low, and resume transmission when it sees CTS high. This is also consistent with our experience. Maybe this helps clarify: http://www.tldp.org/HOWTO/Text-Terminal-HOWTO-10.html#ss10.7 Note the "Old RTS/CTS handshaking is different" section, which refers to "older terminals" whereas newer equipment would use RTS/CTS flow control (or equivalently DTR/DTS) as described above. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From Bob_Jacobsen at lbl.gov Wed Aug 30 07:55:31 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 30 Aug 2006 06:55:31 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> <7.0.1.0.0.20060830095557.0374ff28@sms.nl> Message-ID: I think we all agree that CTS inactive means "Send no more from DTE to DCE". The question is how to express the other direction, "Send no more from DCE to DTE". There are two parts to this question: What do various DTE-like devices do, and what do various DCE-like devices expect? Electrically, the lines that go that direction are DTR, DCD, and RTS (plus some special-purpose lines that are rarely present). All three devices I work most with respect the DTR lead. On the other hand, the FTDI chips for doing serial over USB provide either (RTS and CTS) or (DTR and DSR) as the two leads. What we're probably seeing is two different approaches, that have propagated separately. That's a problem. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From Pawan.Kharbanda at dot.state.co.us Wed Aug 30 09:07:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 30 Aug 2006 09:07:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0455E5E5@hqexchange3.dot.state.co.us> Trent, Sorry for not responding earlier to your email. I was actually waiting for the release of our software on the new Hardware. As I mentioned in my previous emails, RXTX crashes and locks up serial ports with the older version of Redhat (Linux 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:28:55 EDT 2005 i686 i686 i386 GNU/Linux), it might work ok if you are using one or 2 ports but anything more than that it has issues. I was using JDK1.5.0_06 and older firmwares of Digi boxes. Let me know if you need any more specific information of the older system. Thanks Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Thursday, August 10, 2006 5:40 AM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even > after 10000 operations (now I am trying 100,000 :). This is all with > the original RXTX 2.1.7 (final) api's without any of my fixes that I > have been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying > the RXTX saying the suggested kernel for Redhat Linux is > 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Aug 1 01:11:30 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 1 Aug 2006 09:11:30 +0200 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <34B6BC40-1405-4A13-8054-0FC6CE10466A@buechse.de> This is a problem with lock files. You should find it somewhere in the documentation... On 01.08.2006, at 03:53, Richard P. Welty wrote: > trying to get my app running on a Mac OS X powerbook, when > the following is executed as the first thing inside the > run method of a Thread: > > > try { > port = (SerialPort) selectedPort.open( > this.getClass().getName(), 2000); > } catch ( PortInUseException ex){ > ex.printStackTrace(); > return; > } > > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java: > 354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run > (ScaleWatcher.java:143) > > i've not seen any documentation suggesting that rxtx would be finicky > about application names... > > thanks for any suggestions, > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From rwelty at suespammers.org Tue Aug 1 05:37:53 2006 From: rwelty at suespammers.org (Richard P. Welty) Date: Tue, 01 Aug 2006 07:37:53 -0400 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <44CF3D11.9060108@suespammers.org> Richard P. Welty wrote: > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) Aha, a confusing error message. it's really a lock file problem; the code is trying to fill in the application name but when it's getting "Unknown Application" and filling that in... richard From ajmas at sympatico.ca Tue Aug 1 13:10:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:10:59 -0400 Subject: [Rxtx] Application Name? Message-ID: <20060801191059.HFCD18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> You need the source code in CVS. The forth coming 2.18 will correct this, but currently the only place to find the correction is in CVS. No idea when 2.18 is due. > > From: "Richard P. Welty" > Date: 2006/08/01 Tue AM 07:37:53 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Application Name? > > Richard P. Welty wrote: > > > i get the following: > > > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > at > > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) > > Aha, a confusing error message. it's really a lock file problem; the > code is trying to fill in the application name but when it's getting > "Unknown Application" and filling that in... > > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:15:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:15:57 -0400 Subject: [Rxtx] Do interfaces break backwards compatibility? Message-ID: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> It is the class that decides to add serializable that needs to worry about those issues. For the most part serial ports and their connection states should be considered as transient, since there is no guarantee they will still be present or that their state will be, especially in a USB world. What you can store is the port settings and port id and then simply test for port availability next time. Nothing else should be assumed. > > From: Gregg Wonderly > Date: 2006/07/31 Mon PM 01:21:19 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Do interfaces break backwards compatibility? > > Doug Berkland wrote: > > As far as I can tell, nothing in either RXTX or Sun's JavaCOMM > > implements Serializable. Therefore, there are no worries from that > > either. (I can't think of a reason anything in JavaCOMM should > > implement Serializable either.) > > Any interface in javax.comm can become implemented by a serializable object. > Thus, if someone wants to provide remote access to a serial port, then they > might (and I think this is not wise) choose to subclass and add Serializable to > the interface list. > > It's that kind of Serialization compatibility that I'm talking about. > > Gregg Wonderly > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:18:11 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:18:11 -0400 Subject: [Rxtx] precompiled for Intel Mac? Message-ID: <20060801191811.FLJY27612.tomts16-srv.bellnexxia.net@smtp1.sympatico.ca> > > From: Joachim Buechse > There will be. However not before we have figured out some remaining issues. What issues are remaining? Andre From Pawan.Kharbanda at dot.state.co.us Tue Aug 1 16:55:08 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 1 Aug 2006 16:55:08 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Hi, I am also experiencing occasional JVM crash thru the native code. I am attaching the log from the crash. Any ideas what might be causing it???? Regards Pawan Kharbanda # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # --------------- T H R E A D --------------- Current thread (0x8d000480): JavaThread "Thread-119" [_thread_in_native, id=111 51] siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba Registers: EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 Top of Stack: (sp=0x8d3482b8) 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 0x8d348308: 00000000 00000002 00000000 00000000 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 Instructions: (pc=0xb75e39b2) 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~StubRoutines::call_stub V [libjvm.so+0x2607ec] V [libjvm.so+0x423828] V [libjvm.so+0x260045] V [libjvm.so+0x2600de] V [libjvm.so+0x2d7745] V [libjvm.so+0x4c2ba3] V [libjvm.so+0x424338] C [libpthread.so.0+0x4dd8] 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 ) =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, id=11026] 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, id=11023] From tjarvi at qbang.org Tue Aug 1 18:46:21 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 1 Aug 2006 18:46:21 -0600 (MDT) Subject: [Rxtx] JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Message-ID: On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) > C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] > 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, > id=11034] > 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, > id=11033] > 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, > id=11032] > 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, > id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] > 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, > id=11028] > 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, > id=11027] > 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, > id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] > 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- Index: termios.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/termios.c,v retrieving revision 1.9.2.57 diff -u -r1.9.2.57 termios.c --- termios.c 4 Jun 2006 02:50:01 -0000 1.9.2.57 +++ termios.c 11 Jun 2006 21:51:10 -0000 @@ -1048,26 +1048,29 @@ if ( !first_tl ) { port->prev = NULL; + port->next = NULL; first_tl = port; } else { - while ( index->next ) + while ( ( index->fd < port->fd ) && index->next ) index = index->next; - if ( port == first_tl ) + if ( index->fd > port->fd ) { - port->prev = NULL; - port->next = first_tl; - first_tl->prev = port; - first_tl = port; + /* inserting previously closed fd */ + port->prev = index->prev; + port->next=index + index->prev->next = port; + index->prev = port; } else { + /* adding to end of list */ port->prev = index; + port->next = NULL; index->next = port; } } - port->next = NULL; LEAVE( "add_port" ); return port; From gergg at cox.net Tue Aug 1 23:25:19 2006 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 02 Aug 2006 00:25:19 -0500 Subject: [Rxtx] Do interfaces break backwards compatibility? In-Reply-To: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <44D0373F.7020600@cox.net> Andre-John Mas wrote: > It is the class that decides to add serializable that needs to worry about those issues. > For the most part serial ports and their connection states should be considered as > transient, since there is no guarantee they will still be present or that their state > will be, especially in a USB world. Right, but when you provide an interface as the standard, that opens the doors for a lot more interpretation and variation. An abstract class can indicate a lot more about what the expected implementation is. Gregg Wonderly From lyon at docjava.com Wed Aug 2 06:02:15 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:02:15 -0400 Subject: [Rxtx] jsr spec and license issues Message-ID: Hi All, Trent and I have been discussing the license issues of the JSR spec and code that we develop, as a community. Here is what we have come up with: >During the development, the new JSR spec that we derive >will be >covered under the LGPL license. Since it is >just interfaces, any contributions will come back to me, for inclusion >into the specification. The goal is to provide a detailed set of >interfaces that >document the present state of our reference model. I am using >the RXTX as the reference model. If there is something missing from >the reference model, or if the reference model has something that should >not be there, we will need to discuss it. > >After Sun accepts the JSR, I, as the copyright holder, can issue >a version with a JSR compatible license. > >The goal is to migrate the interfaces into javax.comm. Does this sound like a reasonable plan to everyone? Thanks! - Doug From joachim at buechse.de Wed Aug 2 06:21:03 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 14:21:03 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Good day, quite frankly I think that this is a very bad idea. This specification (!) should be in the public domain and nowhere else. Defining a spec under the (L)GPL makes absolutely no sense. After all it is a specification not an implementation. There is no or only trivial code attached to it. So while nothing can be gained by putting it under the LGPL, a lot can be lost - for example the contribution of companies that do not like to open source their implementations. Furthermore you are plain wrong assuming you will be the copyright holder to additions made by other people. Best regards, Joachim On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for >> inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that >> should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Aug 2 06:39:28 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:39:28 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Hi All, I don't know anything about licensing issues. The below sounds reasonable. If we make this public domain, will that be compatible with Sun's JSR? Thanks! - DL P.S. I really don't care what we do, as long as there is some sort of collective agreement. >Good day, > >quite frankly I think that this is a very bad idea. This specification >(!) should be in the public domain and nowhere else. > >Defining a spec under the (L)GPL makes absolutely no sense. After all? >it is a specification not an implementation. There is no or only? >trivial code attached to it. So while nothing can be gained by? >putting it under the LGPL, a lot can be lost - for example the? >contribution of companies that do not like to open source their? >implementations. > >Furthermore you are plain wrong assuming you will be the copyright? >holder to additions made by other people. > >Best regards, >Joachim > > >On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for? >>> inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that? >>> should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> >> Does this sound like a reasonable plan to everyone? >> >> Thanks! >> - Doug >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 07:50:09 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 10:50:09 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D0AD91.4080103@gmail.com> Hi, I have been searching the web and here it is: http://jcp.org/en/resources/license_reference Here there is a list of the licenses that are compatible with the JCP for JSR submitting. I think that Apache, CDDL, CPL and OSL are the one that are compatible with our needs. But I think that Apache is the best for us, Doug why do not make a votation? Regards, Manuel > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. > >> Good day, >> >> quite frankly I think that this is a very bad idea. This specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From lyon at docjava.com Wed Aug 2 08:10:55 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 10:10:55 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D0AD91.4080103@gmail.com> References: <44D0AD91.4080103@gmail.com> Message-ID: Hi All, I have no objection to an Apache license for the JSR interfaces that we produce. Would anyone care to comment? Joachim: Does this address your public domain concerns? How does this impact the reference implementation (i.e. RXTX)? Thanks! - DL >Hi, >I have been searching the web and here it is: >http://jcp.org/en/resources/license_reference >Here there is a list of the licenses that are compatible with the JCP >for JSR submitting. >I think that Apache, CDDL, CPL and OSL are the one that are compatible >with our needs. >But I think that Apache is the best for us, Doug why do not make a votation? >Regards, >Manuel > >> Hi All, >> I don't know anything about licensing issues. >> The below sounds reasonable. If we make this public domain, >> will that be compatible with Sun's JSR? >> Thanks! >> - DL >> P.S. I really don't care what we do, as long as there is >> some sort of collective agreement. >>?? >>> Good day, >>> >>> quite frankly I think that this is a very bad idea. This specification >>> (!) should be in the public domain and nowhere else. >>> >>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>> it is a specification not an implementation. There is no or only >>> trivial code attached to it. So while nothing can be gained by >>> putting it under the LGPL, a lot can be lost - for example the >>> contribution of companies that do not like to open source their >>> implementations. >>> >>> Furthermore you are plain wrong assuming you will be the copyright >>> holder to additions made by other people. >>> >>> Best regards, > >> Joachim >>> >>> >>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>> >>>???? >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>?????? >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for >>>>> inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that >>>>> should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>>>???????? >>>> Does this sound like a reasonable plan to everyone? >>>> >>>> Thanks! >>>> - Doug >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>?????? >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>???? >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 08:20:29 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 11:20:29 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D0AD91.4080103@gmail.com> Message-ID: <44D0B4AD.2050106@gmail.com> Doug; > How does this impact the reference implementation (i.e. RXTX)? > Fuck I have not thinked about that, we would need that everyone who had colaborated with RXTX and have putted code on it to agree a license chaging. Or start from sractch. I don't know if Trent have the right to do that. Regards, Manuel > > >> Hi, >> I have been searching the web and here it is: >> http://jcp.org/en/resources/license_reference >> Here there is a list of the licenses that are compatible with the JCP >> for JSR submitting. >> I think that Apache, CDDL, CPL and OSL are the one that are compatible >> with our needs. >> But I think that Apache is the best for us, Doug why do not make a votation? >> Regards, >> Manuel >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> >> >> Joachim >> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 08:21:15 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 16:21:15 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Putting something in the public domain means, that it can be used by anyone for whatever (s)he thinks is appropriate. The authors define no restriction regarding it's use. That's how any specification should be. Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From berkland at spamcop.net Wed Aug 2 08:50:50 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 10:50:50 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> You may want to consider making it available under two separate licenses. 1 - LGPL as it is today The LGPL can be used by anyone wanting to extend the current functionality, as long as they provide code for anything they change. 2 - Sun Community Source License (SCSL) http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf The SCSL will allow anyone who wants to do a closed source implementation from the ground up to do so, if I'm reading it correctly, as long as they don't use any of the code from the Reference Implementation. This will satisfy any company that wants to have a closed-source implementation, but not help them out very much. On 8/2/06, Joachim Buechse wrote: > Putting something in the public domain means, that it can be used by > anyone for whatever (s)he thinks is appropriate. The authors define > no restriction regarding it's use. That's how any specification > should be. > > Best regards, > Joachim > > > On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > > > Hi All, > > I don't know anything about licensing issues. > > The below sounds reasonable. If we make this public domain, > > will that be compatible with Sun's JSR? > > Thanks! > > - DL > > P.S. I really don't care what we do, as long as there is > > some sort of collective agreement. > >> Good day, > >> > >> quite frankly I think that this is a very bad idea. This > >> specification > >> (!) should be in the public domain and nowhere else. > >> > >> Defining a spec under the (L)GPL makes absolutely no sense. After all > >> it is a specification not an implementation. There is no or only > >> trivial code attached to it. So while nothing can be gained by > >> putting it under the LGPL, a lot can be lost - for example the > >> contribution of companies that do not like to open source their > >> implementations. > >> > >> Furthermore you are plain wrong assuming you will be the copyright > >> holder to additions made by other people. > >> > >> Best regards, > >> Joachim > >> > >> > >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> > >>> Hi All, > >>> Trent and I have been discussing the license issues of the > >>> JSR spec and code that we develop, as a community. > >>> Here is what we have come up with: > >>> > >>>> During the development, the new JSR spec that we derive > >>>> will be > >>>> covered under the LGPL license. Since it is > >>>> just interfaces, any contributions will come back to me, for > >>>> inclusion > >>>> into the specification. The goal is to provide a detailed set of > >>>> interfaces that > >>>> document the present state of our reference model. I am using > >>>> the RXTX as the reference model. If there is something missing > >>>> from > >>>> the reference model, or if the reference model has something that > >>>> should > >>>> not be there, we will need to discuss it. > >>>> > >>>> After Sun accepts the JSR, I, as the copyright holder, can issue > >>>> a version with a JSR compatible license. > >>>> > >>>> The goal is to migrate the interfaces into javax.comm. > >>> > >>> Does this sound like a reasonable plan to everyone? > >>> > >>> Thanks! > >>> - Doug > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From naranjo.manuel at gmail.com Wed Aug 2 09:03:02 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 12:03:02 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> References: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> Message-ID: <44D0BEA6.2040408@gmail.com> Or even better, you can use Apache v2, which allows both Open Source and Closed Source forms ;-) > You may want to consider making it available under two separate licenses. > > 1 - LGPL as it is today > > The LGPL can be used by anyone wanting to extend the current > functionality, as long as they provide code for anything they change. > > 2 - Sun Community Source License (SCSL) > http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf > > The SCSL will allow anyone who wants to do a closed source > implementation from the ground up to do so, if I'm reading it > correctly, as long as they don't use any of the code from the > Reference Implementation. This will satisfy any company that wants to > have a closed-source implementation, but not help them out very much. > > On 8/2/06, Joachim Buechse wrote: > >> Putting something in the public domain means, that it can be used by >> anyone for whatever (s)he thinks is appropriate. The authors define >> no restriction regarding it's use. That's how any specification >> should be. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This >>>> specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> Joachim >>>> >>>> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing >>>>>> from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 09:46:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 17:46:25 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> I assume that javax.comm/RXTX is to be redefined using Interfaces. In this case we should separate 2 things: 1) The specification and it's incarnation in the form of java classes defining the interfaces. 2) The actual implementation of the functionality. It is possible that 1) may contain some trivial code in abstract or none abstract classes (ie PortFactory, PortRegistry, etc). Doug's original question was regarding 1) - unless I misunderstood. I personally think that 1) should be in the public domain. It should not be covered by any restrictions what-so-ever. Let it be free as in "totally free in any respect". I do not care under which license 2) is released. Why? Because it is in my very interest that all/almost all vendors include implementations with their distributions. Which will only happen if they do not need to respect open source licenses. (javax.comm is not nearly as important as the Apache web server or MySql, so nobody will take licensing risks). Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ssbello at gmail.com Wed Aug 2 10:28:30 2006 From: ssbello at gmail.com (Simone) Date: Wed, 2 Aug 2006 18:28:30 +0200 Subject: [Rxtx] pocketPC 2003 Message-ID: <39ed505d0608020928k6ceb01aen470c2e6a78c5a6b0@mail.gmail.com> Does anyone know if the Rxtx works on PocketPc 2003? If yes, could you, please, give me some suggestion. Thanks, Simone Bell? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/72e0fb87/attachment-0336.html From berkland at spamcop.net Wed Aug 2 13:00:10 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 15:00:10 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> Message-ID: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> How about these for the "Business Terms" of the new JSR: > The specification will be released in accordance with standard terms > as specified by the JCP process. > > The reference implementation (RI) will be delivered in binary form > free of charge from http://rxtx.org. Licensing details are expected to > be under the Binary Code License (BCL). > > The source for the reference implementation is expected to be > delivered via the Limited GNU Public License (LGPL) and available free > of charge. > > The TCK will be made available free of charge to all J2SE and J2EE licensees. > > The TCK will be offered for license at no charge, without support or > any trademark license rights, to qualified not-for-profit entities > (including not-for-profit) academic institutions) and qualified > individuals engaged in efforts to create compatible implementations of > the Specification. From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 13:13:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 13:13:33 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E495@hqexchange3.dot.state.co.us> Trent, I didn't exactly get it. Again I am not a C guy, maybe its very simple for you but I don't see any checks for FD (as written in the patch for termios.c) in the initialise_event_info_struct, I see some checks in the interruptEventLoop call. Second as you explained I open three("/dev/cuf01","/dev/cuf01","/dev/cuf01") ports, I close the 2nd ("/dev/cuf02", the other 2 are still open) , I never try to open the third ("/dev/cuf03") port again if it is already open. Are you planning to have a fix for this in the next release 2.1.8. Its very important for me to have a fix for this, its causing some major headaches for our project. I know you have your regular job too, I will appreciate any help. Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, August 01, 2006 6:46 PM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java > VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic > frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) C [librxtxSerial.so+0x69b2] > initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] > Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" > [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: > /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread > "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 > JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon > [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" > daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread > "AdapterThread" daemon [_thread_blocked, id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, > id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Wed Aug 2 13:14:20 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 16:14:20 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> Message-ID: <44D0F98C.1070600@gmail.com> +1 Agree > How about these for the "Business Terms" of the new JSR: > > >> The specification will be released in accordance with standard terms >> as specified by the JCP process. >> >> The reference implementation (RI) will be delivered in binary form >> free of charge from http://rxtx.org. Licensing details are expected to >> be under the Binary Code License (BCL). >> >> The source for the reference implementation is expected to be >> delivered via the Limited GNU Public License (LGPL) and available free >> of charge. >> >> The TCK will be made available free of charge to all J2SE and J2EE licensees. >> >> The TCK will be offered for license at no charge, without support or >> any trademark license rights, to qualified not-for-profit entities >> (including not-for-profit) academic institutions) and qualified >> individuals engaged in efforts to create compatible implementations of >> the Specification. >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From savagobr at yahoo.com Wed Aug 2 13:40:42 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:40:42 -0700 (PDT) Subject: [Rxtx] jsr spec and license issues Message-ID: <20060802194042.83599.qmail@web53807.mail.yahoo.com> Friends Apache seems ok... if I get it right, does it *almost* equals to BSD? Regarding public domain: I think that the good people that spent so much time on this library will like to keep some rights over its own work, don't you think? Best regards Savago --------------------------------- Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/79abdfd5/attachment-0336.html From savagobr at yahoo.com Wed Aug 2 13:58:04 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:58:04 -0700 (PDT) Subject: [Rxtx] JVM Crashing Message-ID: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago --------------------------------- Groups are talking. We´re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/47d561ae/attachment-0336.html From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 14:09:18 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 14:09:18 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E4AD@hqexchange3.dot.state.co.us> Thank You :) ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adenilson Cavalcanti Sent: Wednesday, August 02, 2006 1:58 PM To: rxtx at qbang.org Subject: Re: [Rxtx] JVM Crashing Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago ________________________________ Groups are talking. We?re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/b4eb22cf/attachment-0336.html From tjarvi at qbang.org Wed Aug 2 20:23:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 20:23:42 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > Hi Doug As mentioned off the list, the important point in my mind is that everyone is on the same base more than what license is decided upon. These things are just best addressed early so there isn't confusion. The Apache license is fairly standard in the Open Source community vs several of the relatively unknown [and obviously redundat even by their descriptions] offerings by Sun. Perhaps one option here that would kill a few birds with one stone is to dual license the interface as Apache and LGPL. This would allow everyone to use the interfaces without needing to do wastefull work for internal license requirements. Projects could choose between the two the license that best suits their needs. If there is a software shop doing Java that isn't familiar with the Apache license, they must be doing some strange Java. I do think it is foolhearty to blindly travel in public domain but nobody is trying to undermine the spec files. The intent is to use the work for a JSR submission that everyone can use without confusion later on down the line. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 21:01:16 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 20:01:16 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D166FC.9090005@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> Does this sound like a reasonable plan to everyone? >> > > Hi Doug > > As mentioned off the list, the important point in my mind is that everyone > is on the same base more than what license is decided upon. These things > are just best addressed early so there isn't confusion. > > The Apache license is fairly standard in the Open Source community vs > several of the relatively unknown [and obviously redundat even by > their descriptions] offerings by Sun. The JCP is a reasonable process for what the RxTx project intends to achieve by evolving the API. There isn't much to lose by going the JSR route. The community will benefit from a fair API like so many other that have undergone the process. Sun isn't going to own the API or manipulate it into anything weird anymore than anyone else is. I think your fears are rather vague and unfounded. Which isn't to say that I am a well-informed representative of the JCP, I've only sat through one JSR process and we ended up with javax.usb, and IBM got what it wanted out of the deal and the community got a very nice standard. Paul > > Perhaps one option here that would kill a few birds with one stone is to > dual license the interface as Apache and LGPL. This would allow everyone > to use the interfaces without needing to do wastefull work for internal > license requirements. Projects could choose between the two the license > that best suits their needs. If there is a software shop doing Java that > isn't familiar with the Apache license, they must be doing some strange > Java. > > I do think it is foolhearty to blindly travel in public domain but nobody > is trying to undermine the spec files. The intent is to use the work for > a JSR submission that everyone can use without confusion later on down the > line. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Aug 2 22:10:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 22:10:48 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D166FC.9090005@sun.com> References: <44D166FC.9090005@sun.com> Message-ID: On Wed, 2 Aug 2006, Paul Klissner wrote: > Trent Jarvi wrote: >> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> Does this sound like a reasonable plan to everyone? >>> >> >> Hi Doug >> >> As mentioned off the list, the important point in my mind is that everyone >> is on the same base more than what license is decided upon. These things >> are just best addressed early so there isn't confusion. >> >> The Apache license is fairly standard in the Open Source community vs >> several of the relatively unknown [and obviously redundat even by >> their descriptions] offerings by Sun. > > The JCP is a reasonable process for what the RxTx project intends > to achieve by evolving the API. > > There isn't much to lose by going the JSR route. The community will > benefit from a fair API like so many other that have undergone > the process. Sun isn't going to own the API or manipulate it > into anything weird anymore than anyone else is. I think your > fears are rather vague and unfounded. > > Which isn't to say that I am a well-informed representative > of the JCP, I've only sat through one JSR process and we ended > up with javax.usb, and IBM got what it wanted out of the deal > and the community got a very nice standard. > Hi Paul The JCP should work fine. As our intentions are in line, licensing so that everyone can use the interface code should not be a problem. Note that the current default right now is that the interfaces are copyrighted and no license for distribution is included. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 22:33:51 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 21:33:51 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D166FC.9090005@sun.com> Message-ID: <44D17CAF.1090802@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Paul Klissner wrote: > >> Trent Jarvi wrote: >>> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>> Does this sound like a reasonable plan to everyone? >>>> >>> Hi Doug >>> >>> As mentioned off the list, the important point in my mind is that everyone >>> is on the same base more than what license is decided upon. These things >>> are just best addressed early so there isn't confusion. >>> >>> The Apache license is fairly standard in the Open Source community vs >>> several of the relatively unknown [and obviously redundat even by >>> their descriptions] offerings by Sun. >> The JCP is a reasonable process for what the RxTx project intends >> to achieve by evolving the API. >> >> There isn't much to lose by going the JSR route. The community will >> benefit from a fair API like so many other that have undergone >> the process. Sun isn't going to own the API or manipulate it >> into anything weird anymore than anyone else is. I think your >> fears are rather vague and unfounded. >> >> Which isn't to say that I am a well-informed representative >> of the JCP, I've only sat through one JSR process and we ended >> up with javax.usb, and IBM got what it wanted out of the deal >> and the community got a very nice standard. >> > > Hi Paul > > The JCP should work fine. As our intentions are in line, licensing so > that everyone can use the interface code should not be a problem. Sorry, looks like my concerns were unfounded. I haven't been following the threads closely this week, as work got busy with an escalated issue and new project. Sorry about that. > > Note that the current default right now is that the interfaces are > copyrighted and no license for distribution is included. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Aug 3 03:45:56 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 03 Aug 2006 05:45:56 -0400 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: Hi All, I have been waiting a day for things to cool down. Licensing appears to be a hot-button topic. I have no objection to dual license the interfaces as both Apache and LGPL. Some thoughts: Goal: developers wish to work together on a common piece of code that the team needs. It makes sense that the code base they work on should be Apache-licensed. That makes it possible for the team to use and develop common code, even if the end result is LGPL'd as a whole. If we combine licenses, we must follow the terms of both licenses when distributing the combined work. Thus, the dual license contains the super set of terms in the licenses of Apached and LGPL. This should address concern about using Apache-licensed code within LGPL projects due to the FSF's claim that they are incompatible. Here is a draft statement for RXSL: The RXTX Specification Library (RXSL) uses a dual license strategy for the source code. These licenses are the GNU Lesser General Public License (LGPL) and the Apache License. I strongly encourage users to use the LGPL license and participate fully in the free software community. Dual licensing of the RXSL source code provides open and free access to the technology both for the GPL community and for other developers or companies that cannot use the GPL. Dual license is common practice in open source projects like OpenOffice, Perl and Mozilla. Through the combined use of LGPL and Apache license, developers will have a high degree of freedom yet compatibility and interoperability will be preserved. You can freely modify, extend, and improve the RXSL source code. The only question is whether or not you must provide the source code and contribute modifications to the community. The GNU and Apache licenses allow different ranges of flexibility in this regard, but in the end, regardless of the license used, any and all incompatible changes must be published openly. Note that there is the RXTX Reference Model that uses the org.rxtx package, which itself is protected by the LGPL. This may be part of the distribution, however, it can not be redistributed using a different license. Is everybody OK with this? Thanks Trent, great idea! - Doug From joachim at buechse.de Thu Aug 3 04:15:44 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 3 Aug 2006 12:15:44 +0200 Subject: [Rxtx] JVM Crashing In-Reply-To: <20060802195804.70935.qmail@web53812.mail.yahoo.com> References: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Message-ID: <6ABA2AB2-CECE-4C4B-A7D6-0CDF8B9C95A8@buechse.de> I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of > rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jvermillard at archean.fr Thu Aug 3 04:26:48 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Thu, 03 Aug 2006 12:26:48 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <1154600808.16732.18.camel@localhost.localdomain> Hi, I'm a developer of the Apache MINA framework. It's a network application framework which helps users develop high performance and high scalability network applications easily. http://directory.apache.org/subprojects/mina/index.html . I would like to integrate serial connection to the framework (actualy supporting TCP, UDP (broadcast) and in VM communications), but LGPL is an issue for me. An Apache License would be pretty usefull for me and integrate rxtx functionnalities easly. Thanks, Julien Le jeudi 03 ao?t 2006 ? 05:45 -0400, Dr. Douglas Lyon a ?crit : > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/755cca7f/smime-0336.bin From pascal at quies.net Thu Aug 3 04:32:35 2006 From: pascal at quies.net (Pascal S. de Kloe) Date: Thu, 3 Aug 2006 12:32:35 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <200608031232.35838.pascal@quies.net> Hi Doug, The Apache license is unnessesary complex. It puts all kinds of limitations on the usage. Is there a particular reason why people chose this or was it just the familiar name? I agree with Joachim (again) that the specification and the interfaces should be public domain. However, if we realy need a license then have a look at the X11 license because that one is compatible with the GPL and suits our needs: http://www.fsf.org/licensing/licenses/index_html http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3 ---- start: implementation Copyright (C) 2006 Sun Microsystems, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Sun Microsystems shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Sun Microsystems. Java is a trademark of Sun Microsystems, Inc. ---- end Op donderdag 3 augustus 2006 11:45, schreef Dr. Douglas Lyon: > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Aug 3 05:17:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 05:17:07 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154600808.16732.18.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: On Thu, 3 Aug 2006, Julien Vermillard wrote: > Hi, > > I'm a developer of the Apache MINA framework. It's a network application > framework which helps users develop high performance and high > scalability network applications easily. > http://directory.apache.org/subprojects/mina/index.html . I would like > to integrate serial connection to the framework (actualy supporting TCP, > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > An Apache License would be pretty usefull for me and integrate rxtx > functionnalities easly. > > Thanks, > > Julien > Hi Julien The rxtx license itself will not change. This is just the interface. You would be free to implement an rxtx replacement if the LGPL low level code is a problem for you. These licensing details would make it possible to take the interface code instead of needing to recode them for a new project. You are probably confusing the license problems with the GPL not the LGPL though you can share links to concerns off the list if you would like to go through them. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 11:59:48 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 11:59:48 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E516@hqexchange3.dot.state.co.us> Joachim, I think my both problems (JVM crashing & Port Locking) are being caused by the corruption of "Event Info Struct / EIS" I have noticed with in EIS my "FD" and "Closing" value being overwritten. The problem is definitely in SerialImp.c file. I am trying to understand what the code does and try to pin point the problem by trying few other options. I will keep everybody posted. Regards Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Joachim Buechse Sent: Thursday, August 03, 2006 4:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Thu Aug 3 13:50:07 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 14:50:07 -0500 Subject: [Rxtx] slow startup Message-ID: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete From brian at mbari.org Thu Aug 3 14:05:57 2006 From: brian at mbari.org (Brian Schlining) Date: Thu, 3 Aug 2006 13:05:57 -0700 Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> References: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Message-ID: Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B > Greetings, > I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/ > qbang.org). > > In testing things out, I ran the list ports example from the Wiki, > and it seems to take quite a while for the library to initialize? > Like on the order of 30+ seconds or so after startup (and the RXTX > banner prints), and before the application starts running. > > Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then > I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ > terminal server) and I'm wondering if they are not responding properly > and this is causing the slow startup? Or is this a known problem of > some kind, or maybe something on my system is screwy? > > Thanks, > Pete > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/6123f730/attachment-0335.html From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 14:13:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 14:13:47 -0600 Subject: [Rxtx] slow startup Message-ID: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Hi Pete, RXTX does open and close the ports in Windows. Try downloading utility like PORTMON(only for windows) and you can see that whenever you load RXTX it tries to register all the available COMM ports in the system. It is a little slow if you have virtual ports, we use digi as a terminal server, Its going to get worst of you have comm ports in 100's Thanks Pawan Kharbanda ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Brian Schlining Sent: Thursday, August 03, 2006 2:06 PM To: RXTX Developers and Users Subject: Re: [Rxtx] slow startup Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/94fd105d/attachment-0335.html From pete.flugstad at gmail.com Thu Aug 3 14:32:04 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 15:32:04 -0500 Subject: [Rxtx] slow startup In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Message-ID: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> On 8/3/06, Kharbanda, Pawan wrote: > RXTX does open and close the ports in Windows. Try downloading utility > like PORTMON(only for windows) and you can see that whenever you load RXTX > it tries to register all the available COMM ports in the system. It is a > little slow if you have virtual ports, we use digi as a terminal server, Its > going to get worst of you have comm ports in 100's Okay, I can understand that, but from the PORTMON output, it looks like it's opening each port TWICE: 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS ... 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS Also, assuming instead of listing the ports I wanted to just open one, I'm still seeing the 30 second delay, so it's scanning at startup regardless of what the Java code is going to do. Probably necessary, but annoying. I know, I know, contribute patches... :-) Thanks, Pete From tjarvi at qbang.org Thu Aug 3 15:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 15:04:42 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: On Thu, 3 Aug 2006, Pete Flugstad wrote: > On 8/3/06, Kharbanda, Pawan wrote: >> RXTX does open and close the ports in Windows. Try downloading utility >> like PORTMON(only for windows) and you can see that whenever you load RXTX >> it tries to register all the available COMM ports in the system. It is a >> little slow if you have virtual ports, we use digi as a terminal server, Its >> going to get worst of you have comm ports in 100's > > Okay, I can understand that, but from the PORTMON output, it looks > like it's opening each port TWICE: > > 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > ... > 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > > Also, assuming instead of listing the ports I wanted to just open one, > I'm still seeing the 30 second delay, so it's scanning at startup > regardless of what the Java code is going to do. Probably necessary, > but annoying. > > I know, I know, contribute patches... :-) > I think this problem is in RXTXCommDriver.java. I've just not tracked it down but it should be in the java code, not the native code so easy enough to track down. -- Trent Jarvi tjarvi at qbang.org From jvermillard at archean.fr Fri Aug 4 03:43:28 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:43:28 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: <1154684608.6181.4.camel@localhost.localdomain> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > Hi, > > > > I'm a developer of the Apache MINA framework. It's a network application > > framework which helps users develop high performance and high > > scalability network applications easily. > > http://directory.apache.org/subprojects/mina/index.html . I would like > > to integrate serial connection to the framework (actualy supporting TCP, > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > An Apache License would be pretty usefull for me and integrate rxtx > > functionnalities easly. > > > > Thanks, > > > > Julien > > > > Hi Julien > > The rxtx license itself will not change. This is just the interface. > You would be free to implement an rxtx replacement if the LGPL low level > code is a problem for you. These licensing details would make it possible > to take the interface code instead of needing to recode them for a new > project. > > You are probably confusing the license problems with the GPL not the LGPL > though you can share links to concerns off the list if you would like to > go through them. > > -- > Trent Jarvi > tjarvi at qbang.org Hi, I'm not a license expert but some guys at ASF said me you can't call LGPLed libs from java. some peoples interprete that as static linking and not dynamic linking (no idea why). So ASF/BSD licensied interface willl solve the license probleme. If you got some questions about the ASL and the way you can dual license LGPL/ASL you can ask it on legal-discuss at apache.org Julien -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/8d46c0aa/smime-0335.bin From jvermillard at archean.fr Fri Aug 4 03:51:30 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:51:30 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <1154685091.6181.6.camel@localhost.localdomain> erm from java -> from ASLed Java code Le vendredi 04 ao?t 2006 ? 11:43 +0200, Julien Vermillard a ?crit : > Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > Hi, > > I'm not a license expert but some guys at ASF said me you can't call > LGPLed libs from java. some peoples interprete that as static linking > and not dynamic linking (no idea why). So ASF/BSD licensied interface > willl solve the license probleme. > > If you got some questions about the ASL and the way you can dual license > LGPL/ASL you can ask it on legal-discuss at apache.org > > Julien > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dcc29d70/smime-0335.bin From guille at sms.nl Fri Aug 4 04:35:24 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Fri, 04 Aug 2006 12:35:24 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <7.0.1.0.0.20060804123322.036dc748@sms.nl> At 11:43 04/08/2006, Julien Vermillard wrote: >Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > >Hi, > >I'm not a license expert but some guys at ASF said me you can't call >LGPLed libs from java. some peoples interprete that as static linking >and not dynamic linking (no idea why). This interpretation is wrong. See the official position of the FSF regarding the LGPL and Java: http://www.gnu.org/licenses/lgpl-java.html http://www.fsf.org/licensing/licenses/lgpl-java.html Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From hambyiii at hotmail.com Fri Aug 4 04:52:47 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 10:52:47 +0000 Subject: [Rxtx] error getting InputStream Message-ID: Hi, I have written a program in Java for Windows xp using RXTX (which is why I am using this mailing list :). However, I am getting a problem. I am connecting to a serial port, like so: private CommPortIdentifier portID; private boolean openPort(String selectedPort) { boolean portFound = false; Enumeration portList; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portID.getName().equals(selectedPort)) { portFound = true; break; } } } return portFound; } and then I try and get the serial port input stream (leaving out the try and catch for the sake of space): SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); InputStream inputStream = serialPort.getInputStream(); but on the getInputStream() I get the following error message: Bad file descriptor in nativeavailable I cannot figure out where it is going wrong...anyone any ideas. A quick answer would be wonderful, as I am kinda under the hammer to get this fixed quickly Thanks in Advance Keith From tjarvi at qbang.org Fri Aug 4 05:13:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 05:13:19 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <7.0.1.0.0.20060804123322.036dc748@sms.nl> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> <7.0.1.0.0.20060804123322.036dc748@sms.nl> Message-ID: On Fri, 4 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 11:43 04/08/2006, Julien Vermillard wrote: >> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : >>> On Thu, 3 Aug 2006, Julien Vermillard wrote: >>> >>>> Hi, >>>> >>>> I'm a developer of the Apache MINA framework. It's a network application >>>> framework which helps users develop high performance and high >>>> scalability network applications easily. >>>> http://directory.apache.org/subprojects/mina/index.html . I would like >>>> to integrate serial connection to the framework (actualy supporting TCP, >>>> UDP (broadcast) and in VM communications), but LGPL is an issue for me. >>>> >>>> An Apache License would be pretty usefull for me and integrate rxtx >>>> functionnalities easly. >>>> >>>> Thanks, >>>> >>>> Julien >>>> >>> >>> Hi Julien >>> >>> The rxtx license itself will not change. This is just the interface. >>> You would be free to implement an rxtx replacement if the LGPL low level >>> code is a problem for you. These licensing details would make it possible >>> to take the interface code instead of needing to recode them for a new >>> project. >>> >>> You are probably confusing the license problems with the GPL not the LGPL >>> though you can share links to concerns off the list if you would like to >>> go through them. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >> >> Hi, >> >> I'm not a license expert but some guys at ASF said me you can't call >> LGPLed libs from java. some peoples interprete that as static linking >> and not dynamic linking (no idea why). > > This interpretation is wrong. See the official position of the FSF regarding > the LGPL and Java: > > http://www.gnu.org/licenses/lgpl-java.html > > http://www.fsf.org/licensing/licenses/lgpl-java.html > What I do with legal groups that go down that rat hole is give them a copy of the rxtx 2.0 license. Since the confused legal folks are going in a direction that does not represent the intent of the license or authors at that point and are confused about basic things in our industry that most consider facts, the discussions are very short. The rxtx 2.0 license just adds the following and has for 6 years or so. Not because the lawyers are right. They get confused about intent and even facts. The following is added to make confused lawyers that cant understand intent go far away and never come back. period. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. From hambyiii at hotmail.com Fri Aug 4 05:42:21 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 11:42:21 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Okay, I made a little mistake in my last message. The error is not occuring where I thought it was. Instead it is occuring when I do the following: byte[] readBuffer = new byte[128]; try { int numBytes = 0; try { Thread.sleep(500); } catch (InterruptedException e) {} while (inputStream.available() > 0) { numBytes = inputStream.read(readBuffer); } processReceivedData(readBuffer, numBytes); } catch (IOException e) { System.out.println(e.getMessage()); } So I guess the error is happening on the inputStream.read(readBuffer) again, any help is appreciated and again, thanks in advance Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 10:52:47 +0000 > >Hi, > >I have written a program in Java for Windows xp using RXTX (which is why I >am using this mailing list :). However, I am getting a problem. I am >connecting to a serial port, like so: > private CommPortIdentifier portID; > > private boolean openPort(String selectedPort) > { > boolean portFound = false; > Enumeration portList; > > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portID.getName().equals(selectedPort)) > { > portFound = true; > break; > } > } > } > > return portFound; > } > >and then I try and get the serial port input stream (leaving out the try >and >catch for the sake of space): > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >InputStream inputStream = serialPort.getInputStream(); > >but on the getInputStream() I get the following error message: > >Bad file descriptor in nativeavailable > >I cannot figure out where it is going wrong...anyone any ideas. A quick >answer would be wonderful, as I am kinda under the hammer to get this fixed >quickly > >Thanks in Advance >Keith > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From hambyiii at hotmail.com Fri Aug 4 07:08:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:08:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Hi, I know I am replying to myself a lot at the moment, but more information has come to light (These errors are actually happening on a client machine, on software that has worked for the past month, and only now has started to fail, which is why I am a little slow finding things out) The errors I have already written about are only symptoms of an orignal error. The original error occurs the first time I try to WRITE thte OutputStream: OutputStream oStream = serialPort.getOutputStream(); serialPort.notifyOnOutputEmpty(true); byte[] bs = encodeMessage(configString.toString()); oStream.write(bs); oStream.flush(); The error occurs on oStream.write(bs); and is: Input/output error in writeArray Now writeArray is native code, so I have no idea what is going on there. Any help would be appreciated Thanks Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 11:42:21 +0000 > >Okay, I made a little mistake in my last message. > >The error is not occuring where I thought it was. Instead it is occuring >when I do the following: > >byte[] readBuffer = new byte[128]; > >try { > > int numBytes = 0; > try { > Thread.sleep(500); > } > catch (InterruptedException e) > {} > > while (inputStream.available() > 0) > { > numBytes = inputStream.read(readBuffer); > } > > processReceivedData(readBuffer, numBytes); >} >catch (IOException e) >{ > System.out.println(e.getMessage()); >} > >So I guess the error is happening on the inputStream.read(readBuffer) > >again, any help is appreciated and again, thanks in advance >Keith > > >From: "Keith Thorne" > >Reply-To: RXTX Developers and Users > >To: rxtx at qbang.org > >Subject: [Rxtx] error getting InputStream > >Date: Fri, 04 Aug 2006 10:52:47 +0000 > > > >Hi, > > > >I have written a program in Java for Windows xp using RXTX (which is why >I > >am using this mailing list :). However, I am getting a problem. I am > >connecting to a serial port, like so: > > private CommPortIdentifier portID; > > > > private boolean openPort(String selectedPort) > > { > > boolean portFound = false; > > Enumeration portList; > > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > > while (portList.hasMoreElements()) > > { > > portID = (CommPortIdentifier) portList.nextElement(); > > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > > { > > if (portID.getName().equals(selectedPort)) > > { > > portFound = true; > > break; > > } > > } > > } > > > > return portFound; > > } > > > >and then I try and get the serial port input stream (leaving out the try > >and > >catch for the sake of space): > > > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); > >InputStream inputStream = serialPort.getInputStream(); > > > >but on the getInputStream() I get the following error message: > > > >Bad file descriptor in nativeavailable > > > >I cannot figure out where it is going wrong...anyone any ideas. A quick > >answer would be wonderful, as I am kinda under the hammer to get this >fixed > >quickly > > > >Thanks in Advance > >Keith > > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Aug 4 07:26:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: Hi Keith Can you tell us more about the physical serial port? Might it be 'vanishing?' On Fri, 4 Aug 2006, Keith Thorne wrote: > Hi, > > I know I am replying to myself a lot at the moment, but more information has > come to light (These errors are actually happening on a client machine, on > software that has worked for the past month, and only now has started to > fail, which is why I am a little slow finding things out) > > The errors I have already written about are only symptoms of an orignal > error. The original error occurs the first time I try to WRITE thte > OutputStream: > > OutputStream oStream = serialPort.getOutputStream(); > serialPort.notifyOnOutputEmpty(true); > > byte[] bs = encodeMessage(configString.toString()); > > oStream.write(bs); > oStream.flush(); > > The error occurs on oStream.write(bs); and is: > > Input/output error in writeArray > > Now writeArray is native code, so I have no idea what is going on there. Any > help would be appreciated > Thanks > Keith > > >> From: "Keith Thorne" >> Reply-To: RXTX Developers and Users >> To: rxtx at qbang.org >> Subject: Re: [Rxtx] error getting InputStream >> Date: Fri, 04 Aug 2006 11:42:21 +0000 >> >> Okay, I made a little mistake in my last message. >> >> The error is not occuring where I thought it was. Instead it is occuring >> when I do the following: >> >> byte[] readBuffer = new byte[128]; >> >> try { >> >> int numBytes = 0; >> try { >> Thread.sleep(500); >> } >> catch (InterruptedException e) >> {} >> >> while (inputStream.available() > 0) >> { >> numBytes = inputStream.read(readBuffer); >> } >> >> processReceivedData(readBuffer, numBytes); >> } >> catch (IOException e) >> { >> System.out.println(e.getMessage()); >> } >> >> So I guess the error is happening on the inputStream.read(readBuffer) >> >> again, any help is appreciated and again, thanks in advance >> Keith >> >>> From: "Keith Thorne" >>> Reply-To: RXTX Developers and Users >>> To: rxtx at qbang.org >>> Subject: [Rxtx] error getting InputStream >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 >>> >>> Hi, >>> >>> I have written a program in Java for Windows xp using RXTX (which is why >> I >>> am using this mailing list :). However, I am getting a problem. I am >>> connecting to a serial port, like so: >>> private CommPortIdentifier portID; >>> >>> private boolean openPort(String selectedPort) >>> { >>> boolean portFound = false; >>> Enumeration portList; >>> >>> portList = CommPortIdentifier.getPortIdentifiers(); >>> >>> while (portList.hasMoreElements()) >>> { >>> portID = (CommPortIdentifier) portList.nextElement(); >>> if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) >>> { >>> if (portID.getName().equals(selectedPort)) >>> { >>> portFound = true; >>> break; >>> } >>> } >>> } >>> >>> return portFound; >>> } >>> >>> and then I try and get the serial port input stream (leaving out the try >>> and >>> catch for the sake of space): >>> >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >>> InputStream inputStream = serialPort.getInputStream(); >>> >>> but on the getInputStream() I get the following error message: >>> >>> Bad file descriptor in nativeavailable >>> >>> I cannot figure out where it is going wrong...anyone any ideas. A quick >>> answer would be wonderful, as I am kinda under the hammer to get this >> fixed >>> quickly >>> >>> Thanks in Advance >>> Keith >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From hambyiii at hotmail.com Fri Aug 4 07:52:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:52:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more information >has > > come to light (These errors are actually happening on a client machine, >on > > software that has worked for the past month, and only now has started to > > fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an orignal > > error. The original error occurs the first time I try to WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); > >> } > >> catch (IOException e) > >> { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance > >> Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I am > >>> connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Fri Aug 4 08:21:07 2006 From: gergg at cox.net (Gregg Wonderly) Date: Fri, 04 Aug 2006 09:21:07 -0500 Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: <44D357D3.40303@cox.net> Keith Thorne wrote: > Okay, I made a little mistake in my last message. > > The error is not occuring where I thought it was. Instead it is occuring > when I do the following: > > byte[] readBuffer = new byte[128]; > > try { > > } > catch (IOException e) > { > System.out.println(e.getMessage()); > } > > So I guess the error is happening on the inputStream.read(readBuffer) This is one of the most frustrating things to see over and over. The exception tells you exactly which line the error is occuring on, if you will use it to see where. In Java, these days, every class should do the following. import java.util.logging.*; public class MyClass { Logger log = Logger.getLogger( getClass().getName() ); ...in some method... { String data = ...; // any extra data like addresses or // ports which might be wrong and // cause an exception. try { ... } catch( SomeException ex ) { log.log( Level.SEVERE, ex.toString()+": "+data, ex ); } } } By default, you will see all of the appropriate details of any exception logged at the WARNING or SEVERE level. You can read the javadocs about logging to get more information too. Once you do this, people can then turn up logging and get more information, or otherwise manage it with a logging configuration file or other tools such as JMX or my http://logman.dev.java.net project. Gregg Wonderly From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 09:15:24 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 09:15:24 -0600 Subject: [Rxtx] error getting InputStream Message-ID: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Keith, Please send the full stack trace of the exception, may be I can help you. On Trent's question regarding physical 'Serial Port', do you mean you have a USB(Connected to Client Machine) to 9 Pin Serial cable(Connected to H/W device)? Also please mention which java version you are using? Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Keith Thorne Sent: Friday, August 04, 2006 7:52 AM To: rxtx at qbang.org Subject: Re: [Rxtx] error getting InputStream The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more > > information >has > > come to light (These errors are actually happening on a client > > machine, >on > > software that has worked for the past month, and only now has > > started to fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an > > orignal error. The original error occurs the first time I try to > > WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); } catch (IOException > >> e) { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the > >> inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which > >>> is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I > >>> am connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out > >>> the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get > >>> this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 14:36:16 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 14:36:16 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Trent, As discussed over the phone yesterday, I am emailing you all the details of the bugs I have been experiencing. We do not use Serial Ports like most of the applications. Our application uses approx 80 -100 serial ports (attached thru Digi boxes) which are opened and closed every 20 sec to 1 minute depending upon the type of device. Some Serial ports are left opened all the time and receive event based serial calls while other devices uses polling (request and reply) to collect data. So the opening and closing of the Serial Ports is not really in a sequential order as you mentioned in our conversation yesterday. Also 2 same serial ports can never be opened at one time we have business locks to prevent that from happening. Our findings so far (of course with the help of RXTX user group): The real culprit is in the SerialImp.c file, somehow the other the Event Info Structure in the Linked List gets damaged and loses references to the original EIS structure. I believe both the problems are caused because of the corruption of EIS packet. I have noticed that the link list traversal of EIS in the following methods under SerialImp.c : 1)initialise_event_info_struct 2)finalize_event_info_struct 3)interruptEventLoop So culprit code might be in one of these methods. I am currently using JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and Fedora Core 5). I am also attaching a Test Class to replicate the problem. You need to modify the class and add your systems Serial ports into the code and execute. java TestOpenClosePort 100 It will open and close all the serial ports 100 times in there own thread. Please let me know, I will be available thru out this weekend and can help you as much as I can with testing. Regards Pawan Kharbanda CDOT-ITS 303-478-2991 (cell) 303-985-4350 (home) -------------- next part -------------- A non-text attachment was scrubbed... Name: TestOpenClosePort.java Type: application/octet-stream Size: 6139 bytes Desc: TestOpenClosePort.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dd3754d9/TestOpenClosePort-0334.obj From tjarvi at qbang.org Fri Aug 4 15:43:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 15:43:09 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: Thanks, I'll look at it tomorrow morning. I don't know when I'll find the solution but you may check email tomorrow afternoon to see if I think I found it. On Fri, 4 Aug 2006, Kharbanda, Pawan wrote: > Trent, > As discussed over the phone yesterday, I am emailing you all the > details of the bugs I have been experiencing. We do not use Serial Ports > like most of the applications. Our application uses approx 80 -100 > serial ports (attached thru Digi boxes) which are opened and closed > every 20 sec to 1 minute depending upon the type of device. Some Serial > ports are left opened all the time and receive event based serial calls > while other devices uses polling (request and reply) to collect data. So > the opening and closing of the Serial Ports is not really in a > sequential order as you mentioned in our conversation yesterday. Also 2 > same serial ports can never be opened at one time we have business locks > to prevent that from happening. > > Our findings so far (of course with the help of RXTX user group): > > The real culprit is in the SerialImp.c file, somehow the other the Event > Info Structure in the Linked List gets damaged and loses references to > the original EIS structure. I believe both the problems are caused > because of the corruption of EIS packet. I have noticed that the link > list traversal of EIS in the following methods under SerialImp.c : > > 1)initialise_event_info_struct > 2)finalize_event_info_struct > 3)interruptEventLoop > > So culprit code might be in one of these methods. I am currently using > JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and > Fedora Core 5). > > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > > Regards > Pawan Kharbanda > CDOT-ITS > 303-478-2991 (cell) > 303-985-4350 (home) > > > > > > > > > > From tjarvi at qbang.org Sat Aug 5 12:32:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:32:40 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:34:27 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:34:27 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> You need to run it few times. More the number of ports, more frequently you can reproduce. With just 2 ports it will be hard to reproduce frequently. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:33 PM To: Kharbanda, Pawan Cc: tjarvi at qbang.org; RXTX Developers and Users Subject: Re: Port Locking / JVM Crashing > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Aug 5 12:52:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:52:26 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> Message-ID: Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more frequently > you can reproduce. With just 2 ports it will be hard to reproduce > frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:57:49 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:57:49 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Trent, I have 5 ports of Digi and I can reproduce almost every time. Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX version -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:52 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more > frequently you can reproduce. With just 2 ports it will be hard to > reproduce frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need >> to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From tjarvi at qbang.org Sat Aug 5 13:06:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:06:07 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Message-ID: You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few thousand > iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:07:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:07:33 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E659@hqexchange3.dot.state.co.us> We use our own locks but I haven't turned off the RXTX locks. I am still using the RXTX locks that might be the difference. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:13:22 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:13:22 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Trent, How can you turn off the lock files? I can try using that. I never tried that, I thought you can't turn off the file locking. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From tjarvi at qbang.org Sat Aug 5 13:18:53 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:18:53 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Message-ID: Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java > -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except lockfiles > are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:31:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:31:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Trent, I am able to constantly replicate almost everytime even when I have locks disabled. Don't know the reason why you are not able to on your environment. Any suggestions??????? Cycle No (Thread ::: /dev/cuf04) ::::::: 7 Cycle No (Thread ::: /dev/cuf01) ::::::: 7 Cycle No (Thread ::: /dev/cuf02) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) Exiting Thread ::: /dev/cuf03 Cycle No (Thread ::: /dev/cuf03) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent Port /dev/cuf01 is Opened 0x01 Sent Port /dev/cub01 is Opened 0x01 Sent Port /dev/cuf01 is Closed Port /dev/cuf02 is Closed Port /dev/cuf03 is Closed Port /dev/cuf04 is Closed Port /dev/cub01 is Closed Exiting Thread ::: /dev/cuf03 Exiting Thread ::: /dev/cuf02 Cycle No (Thread ::: /dev/cuf03) ::::::: 8 Cycle No (Thread ::: /dev/cuf02) ::::::: 8 Exiting Thread ::: /dev/cuf04 Exiting Thread ::: /dev/cuf01 Cycle No (Thread ::: /dev/cuf01) ::::::: 8 Cycle No (Thread ::: /dev/cuf04) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened 0x01 Sent Port /dev/cuf01 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 # # An error report file with more information is saved as hs_err_pid21386.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:19 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) > 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux > java -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except > lockfiles are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code >>>> and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm >>> running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From tjarvi at qbang.org Sat Aug 5 14:14:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 14:14:49 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: I'd stick a couple $15 dual port serial boards in the machine to see if its kernel driver specific. I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more problematic. They do not get the same number of eyes looking for problems. You could try putting #undef TIOCSERGETLSR #undef TIOCGICOUNT in the very top of SerialImp.h or one or the other to flip bits of code off and on. The kernel here is 2.6.11.4-20a-smp from Suse. glibc is 2.3.4-23.4 from Suse the jre is 1.5.0_06-b05 from Sun. The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC ram. You should be able to reproduce what I'm seeing then go from there. I don't think I'm going to see this problem without having the same cornercase hardware you have. Maybe we can work that out off the list but I doubt I'm going to find it in rxtx at this point. I have seen problems in the past were kernel structs don't match user space struct and bad things happen but I was including a kernel struct to get functionality that had not made its way into user space at the time. The only thing I may be missing is that when I write 0x01 out the port, nothing comes back. That was not specified but you could easily disconnect anything connected to the ports to see if that changes anything. rxtx is far from bug free but I do not see anything yet. On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I am able to constantly replicate almost everytime even when I have > locks disabled. Don't know the reason why you are not able to on your > environment. Any suggestions??????? > > > Cycle No (Thread ::: /dev/cuf04) ::::::: 7 > Cycle No (Thread ::: /dev/cuf01) ::::::: 7 > Cycle No (Thread ::: /dev/cuf02) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > Exiting Thread ::: /dev/cuf03 > Cycle No (Thread ::: /dev/cuf03) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > Port /dev/cuf01 is Opened > 0x01 Sent > Port /dev/cub01 is Opened > 0x01 Sent > Port /dev/cuf01 is Closed > Port /dev/cuf02 is Closed > Port /dev/cuf03 is Closed > Port /dev/cuf04 is Closed > Port /dev/cub01 is Closed > Exiting Thread ::: /dev/cuf03 > Exiting Thread ::: /dev/cuf02 > Cycle No (Thread ::: /dev/cuf03) ::::::: 8 > Cycle No (Thread ::: /dev/cuf02) ::::::: 8 > Exiting Thread ::: /dev/cuf04 > Exiting Thread ::: /dev/cuf01 > Cycle No (Thread ::: /dev/cuf01) ::::::: 8 > Cycle No (Thread ::: /dev/cuf04) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > 0x01 Sent > Port /dev/cuf01 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 > # > # An error report file with more information is saved as > hs_err_pid21386.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > Aborted > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:19 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Lockfiles are a compile time option. I've turned them on now, corrected > a mistake resulting in only 3 ports being used and now have it going > through a few hundred iterations again without a crash. > > To disable lockfiles.. > > ./configure --disable-lockfiles && make install > > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > Port /dev/ttyS5 is Closed > Exiting Thread ::: /dev/ttyS1 > Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: > /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting > Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port > /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS1 is Closed > Port /dev/ttyS4 is Closed > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > > > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, How can you turn off the lock files? I can try using that. I >> never tried that, I thought you can't turn off the file locking. >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:06 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> You may try 4 ports instead of 5 to make sure thats not the issue. >> >> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >> 2.6.11.4-20a-smp >> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >> java -version java version "1.5.0_06" >> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >> >> I'm using rxtx 2.1-7 (final) with default configuration except >> lockfiles are disabled. I gathered that you are doing your own > resource locking. >> >> ... >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> ... >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>> version >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:52 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> Whats a few times? I've got 4 ports here and have run it a few >>> thousand iterations. >>> >>> Is that true for you if you run it with just four of your DIGI ports? >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> You need to run it few times. More the number of ports, more >>>> frequently you can reproduce. With just 2 ports it will be hard to >>>> reproduce frequently. >>>> >>>> ~pk >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:33 PM >>>> To: Kharbanda, Pawan >>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>> Subject: Re: Port Locking / JVM Crashing >>>> >>>>> I am also attaching a Test Class to replicate the problem. You need > >>>>> to >>>> >>>>> modify the class and add your systems Serial ports into the code >>>>> and >> >>>>> execute. >>>>> >>>>> java TestOpenClosePort 100 >>>>> >>>>> It will open and close all the serial ports 100 times in there own >>>>> thread. >>>>> >>>>> Please let me know, I will be available thru out this weekend and >>>>> can >>> >>>>> help you as much as I can with testing. >>>>> >>>> >>>> How reproducable is the problem with the above testcase? I'm >>>> running >> >>>> 100's of iterations without reproducing the problem. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> >>> >> > From rtlane01 at comcast.net Tue Aug 1 19:22:03 2006 From: rtlane01 at comcast.net (Randall T. Lane) Date: Tue, 01 Aug 2006 21:22:03 -0400 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] Message-ID: <44CFFE3B.90001@comcast.net> Rxtx Community: Please see my e-mail to Trent. Does anyone have any experience using rxtx to successfully communicate with hardware via USB? Thanks. Randy Lane -------------- next part -------------- An embedded message was scrubbed... From: Trent Jarvi Subject: Re: Help with RxTx for USB Communication Date: Tue, 1 Aug 2006 18:49:13 -0600 (MDT) Size: 3300 Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060801/9bbbc255/HelpwithRxTxforUSBCommunication-0332.mht From naranjo.manuel at gmail.com Sun Aug 6 16:59:28 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Sun, 06 Aug 2006 19:59:28 -0300 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44CFFE3B.90001@comcast.net> References: <44CFFE3B.90001@comcast.net> Message-ID: <44D67450.8010100@gmail.com> Randy: I have been able to communicate to AIRcable USB Bluetooth Dongle, with success. I'm not sure which are the options that you have to send to RXTX library, but you can indeed. Check that you do not have the port avaible for much long. I have heard of a problem with WinXP that it simply turn off virtual ports when they are too much long with out activity. If you want I can send you my code, because it is avaible under GPL, the new release is not avaible at AIRcable web site, but it should in short time. Regards, Manu > Rxtx Community: > > Please see my e-mail to Trent. Does anyone have any experience using > rxtx to successfully communicate with hardware via USB? > > Thanks. > > Randy Lane > > ------------------------------------------------------------------------ > > Asunto: > Re: Help with RxTx for USB Communication > De: > Trent Jarvi > Fecha: > Tue, 1 Aug 2006 18:49:13 -0600 (MDT) > Para: > "Randall T. Lane" > > Para: > "Randall T. Lane" > CC: > taj at www.linux.org.uk > > > On Tue, 1 Aug 2006, Randall T. Lane wrote: > >> Trent, >> >> I am working on a project written in Java (1.5) and need to >> communicate to an external device via a USB port. >> >> I have downloaded rxtx-2.1-7-bins-r2.zip from www.rxtx.org and setup >> a Java test project to learn how to use rxtx. I am able to list the >> serial ports available, however rxtx does not recognize my USB port. >> I am running on Windows XP. Here is some output from my test project >> ... >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> COM1 - Serial >> COM3 - Serial >> LPT1 - Parallel >> >> I would appreciate any help you could provide in getting rxtx to >> allow me to communicate via my USB port. >> >> Here is my code, if that would help. >> >> public static void main(String[] args) { >> listPorts(); >> // The listPorts() and getPortTypeName() methods are used for >> port identification. >> static void listPorts() >> { >> Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); >> while ( portEnum.hasMoreElements() ) >> { >> CommPortIdentifier portIdentifier = (CommPortIdentifier) >> portEnum.nextElement(); >> System.out.println(portIdentifier.getName() + " - " + >> getPortTypeName(portIdentifier.getPortType()) ); >> } } >> static String getPortTypeName ( int portType ) >> { >> switch ( portType ) >> { >> case CommPortIdentifier.PORT_I2C: >> return "I2C"; >> case CommPortIdentifier.PORT_PARALLEL: >> return "Parallel"; >> case CommPortIdentifier.PORT_RAW: >> return "Raw"; >> case CommPortIdentifier.PORT_RS485: >> return "RS485"; >> case CommPortIdentifier.PORT_SERIAL: >> return "Serial"; >> default: >> return "unknown type"; >> } >> } >> >> Thanks. >> >> Randy Lane >> > > Hi Randy > > The rxtx mail list is a better place to ask as there are more eyes. > I'm swamped with work. > > Be sure to look to see that your serial port dongle shows up as a > serial port in device manager and no other applications have it open. > USB serial dongles do work with rxtx. Some are less complete than > others. > > -- > Trent Jarvi > tjarvi at qbang.org > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From eddythejekyll at gmail.com Sun Aug 6 23:31:45 2006 From: eddythejekyll at gmail.com (Ed) Date: Sun, 6 Aug 2006 23:31:45 -0600 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? Message-ID: I have written a simple client server (RMI) application without using RxTx where the server controls a parallel port simply by addressing the port and banging the bits in order to drive a relay. It also reads the port's. I am doing this by making Runtime.exec calls to a binary that actually does the parallel port bit banging and reading. However, I'd like to use RxTx so it is a pure Java application, and I've so far installed and figured out how to discover the ports, but I'm having trouble finding good examples or some howto type documentation for this. I did find the two examples on the Wiki: one for serial IO and the other to discover the ports on a system. As I said, I have so far installed RxTx and gotten it to compile and run and I can identify the ports. When I run the server I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found Ports! Found port COM1 Found port COM3 Found port LPT1 LPT1 Not Currently owned EASSwitch Server starting. EASSwitch is bound. Server Ready. So it looks like thing are installed and working, but I feel all dressed up and no idea how to proceed. Basically, I just want to be able to toggle the data lines on the parallel port and read them. Very simple. No parallel printer type usage. Are there any examples I can work off of? If so, please advise. Thank you. -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060806/c7e39898/attachment-0332.html From hambyiii at hotmail.com Sun Aug 6 23:53:54 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Mon, 07 Aug 2006 05:53:54 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Message-ID: Hi, sorry I took the weekend to reply, but I was away for the last couple of days. Unfortunately I cannot send the full stack trace yet. The problem is not, unfortunately, happening on my computer, but on a clients computer, which I will go and visit today. I will hopefully be able to get a stack trace then. As to the physical connection, tt is indeed a USB from the computer, connected to a 9 pin serial device that connects to the hard-ware. My java version is 1.5.06 >From: "Kharbanda, Pawan" >Reply-To: RXTX Developers and Users >To: "RXTX Developers and Users" >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 09:15:24 -0600 > >Keith, > Please send the full stack trace of the exception, may be I can help >you. On Trent's question regarding physical 'Serial Port', do you mean >you have a USB(Connected to Client Machine) to 9 Pin Serial >cable(Connected to H/W device)? > >Also please mention which java version you are using? > >Thanks >Pawan Kharbanda > > >-----Original Message----- >From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >Of Keith Thorne >Sent: Friday, August 04, 2006 7:52 AM >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream > >The physical serial port is actually a USB connection that is then >changed to a "virtual serial port", so I can use the serial port >protocols to connect to it. The other end of the connection is a >hardware device that is constantly turned on. I am not sure about the >port 'vanishing'...we have another piece of software that came with the >hardware device, which we can test the device (and with it the virtual >serial port) with. This has no problem connecting to the serial port or >writing to/reading from the device. >It is only when my software is run, that the error occurs. Like I have >said, my software (using rxtx) is connecting to the serial port >successfully, but it is when I try and write to the serial port that I >get the error. > >Although to be truthful, I am not absolutely certain if the error is >happening on the oStream.write() or the oStream.flush(). I only think it >is the write(), because that is where the writeArray() function is >called. > >thanks >Keith > > > >From: Trent Jarvi > >Reply-To: RXTX Developers and Users > >To: RXTX Developers and Users > >Subject: Re: [Rxtx] error getting InputStream > >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > > > > >Hi Keith > > > >Can you tell us more about the physical serial port? Might it be > >'vanishing?' > > > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > > > Hi, > > > > > > I know I am replying to myself a lot at the moment, but more > > > information > >has > > > come to light (These errors are actually happening on a client > > > machine, > >on > > > software that has worked for the past month, and only now has > > > started to fail, which is why I am a little slow finding things out) > > > > > > The errors I have already written about are only symptoms of an > > > orignal error. The original error occurs the first time I try to > > > WRITE thte > > > OutputStream: > > > > > > OutputStream oStream = serialPort.getOutputStream(); > > > serialPort.notifyOnOutputEmpty(true); > > > > > > byte[] bs = encodeMessage(configString.toString()); > > > > > > oStream.write(bs); > > > oStream.flush(); > > > > > > The error occurs on oStream.write(bs); and is: > > > > > > Input/output error in writeArray > > > > > > Now writeArray is native code, so I have no idea what is going on >there. > >Any > > > help would be appreciated > > > Thanks > > > Keith > > > > > > > > >> From: "Keith Thorne" > > >> Reply-To: RXTX Developers and Users > > >> To: rxtx at qbang.org > > >> Subject: Re: [Rxtx] error getting InputStream > > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > > >> > > >> Okay, I made a little mistake in my last message. > > >> > > >> The error is not occuring where I thought it was. Instead it is > >occuring > > >> when I do the following: > > >> > > >> byte[] readBuffer = new byte[128]; > > >> > > >> try { > > >> > > >> int numBytes = 0; > > >> try { > > >> Thread.sleep(500); > > >> } > > >> catch (InterruptedException e) > > >> {} > > >> > > >> while (inputStream.available() > 0) > > >> { > > >> numBytes = inputStream.read(readBuffer); > > >> } > > >> > > >> processReceivedData(readBuffer, numBytes); } catch (IOException > > >> e) { > > >> System.out.println(e.getMessage()); > > >> } > > >> > > >> So I guess the error is happening on the > > >> inputStream.read(readBuffer) > > >> > > >> again, any help is appreciated and again, thanks in advance Keith > > >> > > >>> From: "Keith Thorne" > > >>> Reply-To: RXTX Developers and Users > > >>> To: rxtx at qbang.org > > >>> Subject: [Rxtx] error getting InputStream > > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > > >>> > > >>> Hi, > > >>> > > >>> I have written a program in Java for Windows xp using RXTX (which > > >>> is > >why > > >> I > > >>> am using this mailing list :). However, I am getting a problem. I > > >>> am connecting to a serial port, like so: > > >>> private CommPortIdentifier portID; > > >>> > > >>> private boolean openPort(String selectedPort) > > >>> { > > >>> boolean portFound = false; > > >>> Enumeration portList; > > >>> > > >>> portList = CommPortIdentifier.getPortIdentifiers(); > > >>> > > >>> while (portList.hasMoreElements()) > > >>> { > > >>> portID = (CommPortIdentifier) portList.nextElement(); > > >>> if (portID.getPortType() == > >CommPortIdentifier.PORT_SERIAL) > > >>> { > > >>> if (portID.getName().equals(selectedPort)) > > >>> { > > >>> portFound = true; > > >>> break; > > >>> } > > >>> } > > >>> } > > >>> > > >>> return portFound; > > >>> } > > >>> > > >>> and then I try and get the serial port input stream (leaving out > > >>> the > >try > > >>> and > > >>> catch for the sake of space): > > >>> > > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", > >2000); > > >>> InputStream inputStream = serialPort.getInputStream(); > > >>> > > >>> but on the getInputStream() I get the following error message: > > >>> > > >>> Bad file descriptor in nativeavailable > > >>> > > >>> I cannot figure out where it is going wrong...anyone any ideas. A > >quick > > >>> answer would be wonderful, as I am kinda under the hammer to get > > >>> this > > >> fixed > > >>> quickly > > >>> > > >>> Thanks in Advance > > >>> Keith > > >>> > > >>> > > >>> _______________________________________________ > > >>> Rxtx mailing list > > >>> Rxtx at qbang.org > > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > > >> > > >> > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Aug 7 06:22:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:22:03 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: Hmm.. I left the test running went I went home Saturday. It looks like something did show up after ~30k iterations. I'll look at it more in my free time. Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS5 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 29417 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 29417 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 29417 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00002aab14c2ec63, pid=20573, tid=1095125344 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6c63] initialise_event_info_struct+0x63 # [thread 1087756640 also had an error] Port /dev/ttyS5 is Opened 0x01 Sent [thread 1089861984 also had an error] Port /dev/ttyS4 is Opened 0x01 Sent [thread 1090914656 also had an error] # An error report file with more information is saved as [thread 1090914656 also had an error] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted On Sat, 5 Aug 2006, Trent Jarvi wrote: > > I'd stick a couple $15 dual port serial boards in the machine to see if its > kernel driver specific. > > I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more > problematic. They do not get the same number of eyes looking for problems. > > You could try putting > > #undef TIOCSERGETLSR > #undef TIOCGICOUNT > > in the very top of SerialImp.h or one or the other to flip bits of code off > and on. > > The kernel here is 2.6.11.4-20a-smp from Suse. > glibc is 2.3.4-23.4 from Suse > the jre is 1.5.0_06-b05 from Sun. > > The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC > ram. > > You should be able to reproduce what I'm seeing then go from there. I don't > think I'm going to see this problem without having the same cornercase > hardware you have. Maybe we can work that out off the list but I doubt I'm > going to find it in rxtx at this point. > > I have seen problems in the past were kernel structs don't match user space > struct and bad things happen but I was including a kernel struct to get > functionality that had not made its way into user space at the time. > > The only thing I may be missing is that when I write 0x01 out the port, > nothing comes back. That was not specified but you could easily disconnect > anything connected to the ports to see if that changes anything. > > rxtx is far from bug free but I do not see anything yet. > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, >> I am able to constantly replicate almost everytime even when I have >> locks disabled. Don't know the reason why you are not able to on your >> environment. Any suggestions??????? >> >> >> Cycle No (Thread ::: /dev/cuf04) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> Exiting Thread ::: /dev/cuf03 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> Port /dev/cuf01 is Opened >> 0x01 Sent >> Port /dev/cub01 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Closed >> Port /dev/cuf02 is Closed >> Port /dev/cuf03 is Closed >> Port /dev/cuf04 is Closed >> Port /dev/cub01 is Closed >> Exiting Thread ::: /dev/cuf03 >> Exiting Thread ::: /dev/cuf02 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 8 >> Exiting Thread ::: /dev/cuf04 >> Exiting Thread ::: /dev/cuf01 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf04) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 >> # >> # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 >> # >> # An error report file with more information is saved as >> hs_err_pid21386.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> Aborted >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:19 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Lockfiles are a compile time option. I've turned them on now, corrected >> a mistake resulting in only 3 ports being used and now have it going >> through a few hundred iterations again without a crash. >> >> To disable lockfiles.. >> >> ./configure --disable-lockfiles && make install >> >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> Port /dev/ttyS5 is Closed >> Exiting Thread ::: /dev/ttyS1 >> Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: >> /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting >> Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port >> /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> >> >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, How can you turn off the lock files? I can try using that. I >>> never tried that, I thought you can't turn off the file locking. >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 1:06 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> You may try 4 ports instead of 5 to make sure thats not the issue. >>> >>> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >>> 2.6.11.4-20a-smp >>> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >>> java -version java version "1.5.0_06" >>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >>> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >>> >>> I'm using rxtx 2.1-7 (final) with default configuration except >>> lockfiles are disabled. I gathered that you are doing your own >> resource locking. >>> >>> ... >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> Port /dev/ttyS4 is Closed >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> ... >>> >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>>> version >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:52 PM >>>> To: Kharbanda, Pawan >>>> Cc: Trent Jarvi; RXTX Developers and Users >>>> Subject: RE: Port Locking / JVM Crashing >>>> >>>> >>>> Whats a few times? I've got 4 ports here and have run it a few >>>> thousand iterations. >>>> >>>> Is that true for you if you run it with just four of your DIGI ports? >>>> >>>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>>> >>>>> You need to run it few times. More the number of ports, more >>>>> frequently you can reproduce. With just 2 ports it will be hard to >>>>> reproduce frequently. >>>>> >>>>> ~pk >>>>> >>>>> -----Original Message----- >>>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>>> Sent: Saturday, August 05, 2006 12:33 PM >>>>> To: Kharbanda, Pawan >>>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>>> Subject: Re: Port Locking / JVM Crashing >>>>> >>>>>> I am also attaching a Test Class to replicate the problem. You need >> >>>>>> to >>>>> >>>>>> modify the class and add your systems Serial ports into the code >>>>>> and >>> >>>>>> execute. >>>>>> >>>>>> java TestOpenClosePort 100 >>>>>> >>>>>> It will open and close all the serial ports 100 times in there own >>>>>> thread. >>>>>> >>>>>> Please let me know, I will be available thru out this weekend and >>>>>> can >>>> >>>>>> help you as much as I can with testing. >>>>>> >>>>> >>>>> How reproducable is the problem with the above testcase? I'm >>>>> running >>> >>>>> 100's of iterations without reproducing the problem. >>>>> >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> >>>> >>> >> > From iinjlv01 at gmail.com Mon Aug 7 06:22:07 2006 From: iinjlv01 at gmail.com (J LV) Date: Mon, 7 Aug 2006 14:22:07 +0200 Subject: [Rxtx] Data lost or Slow sampling Message-ID: Hello I am using RXTX to comm with a motion controller using Serial Port and i can write the commands using SerialPort or RXTXPort without problems, but when i try write and read at high sampling rate, for example to know the position and speed at every moment of a trajectory, i obtain a very irregular response times. I am using the most simple algorimth: 1-Write the command "is trajectory finished?" and wait for SerialPortEvent.DATA_AVAILABLE 2-Read the InputStreamReader of serial port while not empty 3-If trajectory finished then stop program, else, continue 4-Read actual time using System.currentTimeMillis() (t0) 5-Write the command "give me position" and wait for SerialPortEvent.DATA_AVAILABLE 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) 7-Read the InputStreamReader of serial port while not empty 8-Save position in Vector or ArrayList and repeat from 1 I don't know if the problem is the RXTX, my program or the motion controller hardware but i have response times from 16 millis to 78 millis at 19200 bauds!. I am using SwingWorked to threading SerialPort reading/writing process. Any idea or similar data leak problem? Thanks for RXTX project and sorry for my badde english! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/909a4cb3/attachment-0332.html From tjarvi at qbang.org Mon Aug 7 06:50:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:50:10 -0600 (MDT) Subject: [Rxtx] Data lost or Slow sampling In-Reply-To: References: Message-ID: On Mon, 7 Aug 2006, J LV wrote: > Hello > > I am using RXTX to comm with a motion controller using Serial Port and i can > write the commands using SerialPort or RXTXPort without problems, but when i > try write and read at high sampling rate, for example to know the position > and speed at every moment of a trajectory, i obtain a very irregular > response times. I am using the most simple algorimth: > 1-Write the command "is trajectory finished?" and wait for > SerialPortEvent.DATA_AVAILABLE > 2-Read the InputStreamReader of serial port while not empty > 3-If trajectory finished then stop program, else, continue > 4-Read actual time using System.currentTimeMillis() (t0) > 5-Write the command "give me position" and wait for > SerialPortEvent.DATA_AVAILABLE > 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) > 7-Read the InputStreamReader of serial port while not empty > 8-Save position in Vector or ArrayList and repeat from 1 > > > I don't know if the problem is the RXTX, my program or the motion controller > hardware but i have response times from 16 millis to 78 millis at 19200 > bauds!. I am using SwingWorked to threading SerialPort reading/writing > process. > > Any idea or similar data leak problem? > > Thanks for RXTX project and sorry for my badde english! > This can be platform dependant. What you may do for a starting point is use a loopback connection and time the same thing at 19200. Write the date, wait for data available, read the data. I would expect from write to data available to take around 10 ms from past experiences. You can experiment with turning on and off buffering in the port settings of the OS, if the OS supports more realtime like interrupts, that could help. You have a java schedual and the kernel schedual. Serial interrupts traditionally have very high priority but modern OSs tend to realize thats not good for GUIs, ... and delay responding to the interrupts. You should be able to have usec response times in a realtime OS. Windows and Linux are not typically setup as realtime OSs. For comparison, the last time I looked which was about 5 years ago, windows NT4 came back with data available in 8 ms and Linux came back in 10 ms. I would be interested in seeing what you get today. -- Trent Jarvi tjarvi at qbang.org From gergg at cox.net Mon Aug 7 09:21:56 2006 From: gergg at cox.net (Gregg Wonderly) Date: Mon, 07 Aug 2006 10:21:56 -0500 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? In-Reply-To: References: Message-ID: <44D75A94.9030205@cox.net> Ed wrote: > Are there any examples I can work off of? If so, please advise. Just read the javax.comm javadocs. You need to take the parallel port and write values to it based on which bits of which lines you want on and off. Gregg Wonderly From pete.flugstad at gmail.com Mon Aug 7 09:36:19 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 7 Aug 2006 10:36:19 -0500 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44D67450.8010100@gmail.com> References: <44CFFE3B.90001@comcast.net> <44D67450.8010100@gmail.com> Message-ID: <84d4a6d50608070836v97e9a29q96e98441ea903ac7@mail.gmail.com> FYI, I'm talking to a USB<->Serial dongle just fine under Windows XP Pro. I did have to install a driver for the thing - Windows XP by default, did not recognize it. Once installed, it just showed up as another COM port, and I've been pushing data over it with no problems. Pete From savagobr at yahoo.com Mon Aug 7 10:13:06 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Mon, 7 Aug 2006 09:13:06 -0700 (PDT) Subject: [Rxtx] Port Locking / JVM Crashing: 2 ports (Serial + usb) Message-ID: <20060807161306.9648.qmail@web53803.mail.yahoo.com> Trent This is curious, since I did reproduced the aformentioned bug using only 2 ports: /dev/ttyS0 and /dev/ttyUSB0. It only need to run for 500 times: $ java -cp . TestOpenClosePort 500 500 Port /dev/ttyS0 is Closed Excpetion ::: Thread ::: /dev/ttyUSB0null Exiting Thread ::: /dev/ttyUSB0 Cycle No (Thread ::: /dev/ttyUSB0) ::::::: 227 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 184 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x203d2044, pid=32368, tid=2986859424 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing) # Problematic frame: # C 0x203d2044 # # An error report file with more information is saved as /tmp/hs_err_pid32368.log # # If you would like to submit a bug report, please visit: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Best regards Savago ps: Test environment $ uname -a Linux localhost.localdomain 2.6.15-1.2054_FC5 #1 Tue Mar 14 15:48:33 EST 2006 i686 i686 i386 GNU/Linux $ java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) $gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.1 20060525 (Red Hat 4.1.1-1) --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/c6ca8094/attachment-0331.html From Pawan.Kharbanda at dot.state.co.us Mon Aug 7 17:23:25 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 7 Aug 2006 17:23:25 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Trent, I think I got the problem fixed after some code changes in the C (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the staging environment (with 10 devices) with real time data and haven't seen a JVM lock/ Port locking since last night. I am going to do further stress testing and will send all my code changes and my findings in next few days. I believe the problem was causing due to the digi drivers and how the Linux kernel talked to it, so after making some code changes and synchronization fixes, I got it to work. I am keeping my fingers crossed :) Thanks for all your help. You have been a great help. Will keep you posted. Cheers ~pk PS : We are going to test my new RXTX changes with the 2.6 Red Hat kernel (currently using 2.4.21-37.ELsmp) too. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 5:08 PM To: Kharbanda, Pawan Subject: RE: Port Locking / JVM Crashing Hi Pawan As mentioned I did reproduce the error but after several hours of cycles. I'm looking at RXTXPort.java and thinking about what may be happening. The error is in the C layer but it may be preventable in the java code. lets say two closes are overlapping or an operation is trying to happen while another port is closing. The structure may be out of sync by the time the code using the structure in another thread gets to the event info struct. So I'm wondering if synchronization in RXTXPort() and close() may help you. A second thing that may help is you can put printf("got here\n"); in each of the lines in initialize event info struct to verify that the problem is in walking the linked list. Thats my suspicion. So a properly timed close() while calling the constructor may be catching rxtx off guard. You can synchronize to test that and it may do away with the problem. From tjarvi at qbang.org Mon Aug 7 18:01:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 18:01:54 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Message-ID: Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do further > stress testing and will send all my code changes and my findings in next > few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to happen > while another port is closing. The structure may be out of sync by the > time the code using the structure in another thread gets to the event > info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may do > away with the problem. > From Pawan.Kharbanda at dot.state.co.us Tue Aug 8 13:49:14 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 8 Aug 2006 13:49:14 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Trent, I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and have absolutely no problem with JVM crashing or Port Locking even after 10000 operations (now I am trying 100,000 :). This is all with the original RXTX 2.1.7 (final) api's without any of my fixes that I have been trying for last 2-3 weeks. I will suggest that we update the INSTALL or Readme file accompnying the RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: 82000685_G 02/02/2006). This should helped everybody using the RXTX API's with RedHat Linux atleast. Regards Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 6:02 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do > further stress testing and will send all my code changes and my > findings in next few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers > crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to > happen while another port is closing. The structure may be out of > sync by the time the code using the structure in another thread gets > to the event info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may > do away with the problem. > From jimo at earthlink.net Wed Aug 9 21:21:00 2006 From: jimo at earthlink.net (Jim Owen) Date: Wed, 9 Aug 2006 20:21:00 -0700 Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat Message-ID: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Hi All, I've run into some difficulties with rxtx that have me baffled and need some help. I have an application that has used earlier versions of rxtx successfully and on a variety of platforms. We recently needed to deploy this application into an environment where we could not utilize lock files. I pulled down the 2.0.7 pre1 source distribution and executed configure with --disable-lockfiles. I then executed make and make install. When I execute the program, as root, I get the following error: ************************************************************************ Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) # Problematic frame: # C 0x00001004 # # An error report file with more information is saved as hs_err_pid20151.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # **************************************************************************** If I execute as a normal user, I get no errors, but no ports listed: (Using an earlier version, I get a serial and parallel port listed.) **************************************************************************** [jim at linuxDev ingenicoApp]$ java VerifyCommBuild Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Some ports appear to have been found, let's try to enumerate them. Complete. **************************************************************************** When I built rxtx, there was a warning given of the following: **************************************************************************** conftest.c: In function 'main': conftest.c:6: warning: incompatible implicit declaration of built-in function 'printf' conftest.c:7: warning: incompatible implicit declaration of built-in function 'exit' WARNING: Kernel include files do not match the current kernel **************************************************************************** uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux JAVA_HOME=/usr/java/j2sdk1.4.2_11 javax.comm.properties: Driver=gnu.io.RXTXCommDriver Here's the code for VerifyCommBuild.java that I'm using to test: **************************************************************************** import javax.comm.*; import java.util.Enumeration; /** * A quick app to check that the javax.comm (Serial) Communications extension has been properly * installed and configured on this machine. * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. */ public class VerifyCommBuild { public static void main(String args[]) { Enumeration ports; System.out.println("Verifying Comm Build Environment"); try { ports = CommPortIdentifier.getPortIdentifiers(); if (ports == null) { System.out.println("No comm ports found!"); return; } System.out.println("Some ports appear to have been found, let's try to enumerate them."); while (ports.hasMoreElements()) { System.out.println("Here is a port [" + ((CommPortIdentifier)ports.nextElement()).getName() + "]"); } } catch (Exception e) { System.out.println("Failed to enumerate ports [" + e.getMessage() + "]"); e.printStackTrace(); } System.out.println("Complete."); } } **************************************************************************** Any suggestions as to what I'm missing? Thanks, Jim Owen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060809/92503a81/attachment-0329.html From tjarvi at qbang.org Thu Aug 10 05:39:36 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 05:39:36 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Message-ID: On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even after > 10000 operations (now I am trying 100,000 :). This is all with the > original RXTX 2.1.7 (final) api's without any of my fixes that I have > been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying the > RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp > and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From oliver.archner at bayceer.uni-bayreuth.de Wed Aug 9 06:13:36 2006 From: oliver.archner at bayceer.uni-bayreuth.de (Oliver Archner) Date: Wed, 09 Aug 2006 14:13:36 +0200 Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() Message-ID: <44D9D170.5020806@bayceer.uni-bayreuth.de> Dear Users, i would like to send a byte to a parallel device. The following piece of code works well but throws an IOException in LPRPort$ParallelOutputStream.write() saying that everything is ok ?! Oliver import java.io.*; import gnu.io.*; public class Test { public static void main(String[] args) { RXTXCommDriver TxPort = new RXTXCommDriver(); ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", CommPortIdentifier.PORT_PARALLEL); OutputStream oStream = null; try { oStream = pPort.getOutputStream(); oStream.write((byte)0x51); } catch (IOException e) { e.printStackTrace(); } finally { try { if (oStream != null) oStream.close(); } catch (IOException e) { e.printStackTrace(); } } } } Output: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Der Vorgang wurde erfolgreich beendet. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at Test.main(Test.java:12) From tjarvi at qbang.org Thu Aug 10 18:12:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 18:12:27 -0600 (MDT) Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() In-Reply-To: <44D9D170.5020806@bayceer.uni-bayreuth.de> References: <44D9D170.5020806@bayceer.uni-bayreuth.de> Message-ID: On Wed, 9 Aug 2006, Oliver Archner wrote: > Dear Users, > > i would like to send a byte to a parallel device. > The following piece of code works well but throws an IOException in > LPRPort$ParallelOutputStream.write() saying that everything is ok ?! > > Oliver > > > import java.io.*; > import gnu.io.*; > > public class Test { > > public static void main(String[] args) { > RXTXCommDriver TxPort = new RXTXCommDriver(); > ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", > CommPortIdentifier.PORT_PARALLEL); > OutputStream oStream = null; > try { > oStream = pPort.getOutputStream(); > oStream.write((byte)0x51); > } catch (IOException e) { > e.printStackTrace(); > } finally { > try { > if (oStream != null) oStream.close(); > } catch (IOException e) { > e.printStackTrace(); > > } > } > > } > } > > Output: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Der Vorgang wurde erfolgreich beendet. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at Test.main(Test.java:12) WriteFile is returning a negative value or 0. I do not know what that exception is saying but it should be an IO Exception. The native code in question is line 405 in ParallelImp.c. If you find the documentation pointing out how the code is wrong, we can fix it. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 08:12:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 09:12:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question Message-ID: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Hello, I'm trying to send data over a serial port using the RXTX libraries. I've got the binaries for Windows XP from qbang.org. On the receiving side, I'm using event notification (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial Ports InputStream. Similarly on the transmist side, I use SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. First question: does this make sense? The code was largely adopted from an existing Windows C++ program and that's more or less how it operated (overlapped io using ReadFile, WriteFile, GetOverlappedResult, Events, etc). Second question: in a small standalone test program I wrote, everything seems to work just fine - whenever SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good chunk of data available (I explicitly set the in/out buffers to 1024 bytes) to read. However, when I pull my "library" into a much larger environment (OSGI framework based, but same JVM/OS/etc), whenever SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a byte or two available. Needless to say, this really kills performance. Everything appears to still operate properly, just really, really slowly. So, has anyone seen this problem before? I haven't dived into the details of RXTX library, and I'm wondering what the mechanism is here? How does the RXTX thread determine when to issue the SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to tweak in RXTX or the JVM to get this to operate more like the small test program? Seems like I want RXTX to call me back _less_ often. Thanks, Pete From tjarvi at qbang.org Fri Aug 11 09:55:23 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 09:55:23 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Hello, > > I'm trying to send data over a serial port using the RXTX > libraries. I've got the binaries for Windows XP from qbang.org. > > On the receiving side, I'm using event notification > (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial > Ports InputStream. Similarly on the transmist side, I use > SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. > > First question: does this make sense? The code was largely adopted > from an existing Windows C++ program and that's more or less how it > operated (overlapped io using ReadFile, WriteFile, > GetOverlappedResult, Events, etc). > > Second question: in a small standalone test program I wrote, > everything seems to work just fine - whenever > SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good > chunk of data available (I explicitly set the in/out buffers to 1024 > bytes) to read. > > However, when I pull my "library" into a much larger environment > (OSGI framework based, but same JVM/OS/etc), whenever > SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a > byte or two available. Needless to say, this really kills > performance. Everything appears to still operate properly, just > really, really slowly. > > So, has anyone seen this problem before? I haven't dived into the > details of RXTX library, and I'm wondering what the mechanism is here? > How does the RXTX thread determine when to issue the > SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to > tweak in RXTX or the JVM to get this to operate more like the small > test program? > Seems like I want RXTX to call me back _less_ often. > Hi Pete RXTX is doing overlapped IO in termios.c. In this file we map the windows functionality to termios (mostly POSIX). From there, we just talk termios to all platforms. What I guess is happening is the eventloop is waiting a specified amount of time. As you application uses more cpu cycles, you observe the difference in behavior. You could go into the C code and change this after looking at the eventLoop() code in serialImp.c and following that to the serial_ioctl() and serial_select() in termios.c Another option is to go into RXTXPort.java and put a sleep in the sendEvent() code. This way you would not have to recompile the native code (not very easy at this point). -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 13:27:36 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:27:36 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > Another option is to go into RXTXPort.java and put a sleep in the > sendEvent() code. This way you would not have to recompile the native > code (not very easy at this point). Are the instructions in the INSTALL file still valid? If so, it wasn't very hard to build it (I already had MinGW installed). Everything seemed to build just fine. Haven't tried to install/use it yet, but it wasn't a big deal (assuming those instructions were correct. Thanks, Pete From pete.flugstad at gmail.com Fri Aug 11 13:42:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:42:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, but there doesn't appear to be a way to select that via RXTX (which appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control is selected). Is there a way I'm not seeing? Thanks, Pete From eddythejekyll at gmail.com Fri Aug 11 15:20:44 2006 From: eddythejekyll at gmail.com (Ed) Date: Fri, 11 Aug 2006 15:20:44 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion Message-ID: I'm trying to read and write a parallel port on a standard (Dell) pc running RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. I'm having problems getting rxtx to return a port enumeration from getPortIdentifiers. I'm using a file PortChooser.java as a test file to get things going. This is from the Java CookBook 2nd edition (Chapter 12). The call // get list of ports available on this particular computer, // by calling static method in CommPortIdentifier. Enumeration pList = CommPortIdentifier.getPortIdentifiers(); returns a null pList; I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and compile without --disable-lockfiles I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ... When I compile with --disable-lockfiles the call to getPortIdentifiers simply returns a null Enumeration. I've read the documention and threads about this issue and I feel like I've tried everything, so at the moment I'm stumped. I can supply any further info that may help. Thanks in advance. Ed -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060811/80c4eeec/attachment-0327.html From tjarvi at qbang.org Fri Aug 11 18:29:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:29:48 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > On 8/11/06, Trent Jarvi wrote: >> Another option is to go into RXTXPort.java and put a sleep in the >> sendEvent() code. This way you would not have to recompile the native >> code (not very easy at this point). > > Are the instructions in the INSTALL file still valid? If so, it > wasn't very hard to build it > (I already had MinGW installed). Everything seemed to build just > fine. Haven't tried to install/use it yet, but it wasn't a big deal > (assuming those instructions were correct. > Hi Pete The instructions are correct. You will want to make sure that the exports worked. If the library does not work properly, then the exports failed. The exports are currently generated with nm, sed and grep in the Makefile which is often commented out. If the def file is old, it will cause problems. You should be good to go then. Look at the serial_select and eventLoop code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:33:32 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:33:32 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > but there doesn't appear to be a way to select that via RXTX (which > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > is selected). > > Is there a way I'm not seeing? > Hi Pete I'm guessing I didn't know the difference. At the time, I really didn't have windows API documentation. I just had some pages I found with altivista/google. Later microsoft made their documentation available on msdn or I learned about it. For rxtx, the calls need to be platform neutral. So if you see how to do each in termios, then we can get it going. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:45:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:45:24 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Fri, 11 Aug 2006, Ed wrote: > I'm trying to read and write a parallel port on a standard (Dell) pc running > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. > > I'm having problems getting rxtx to return a port enumeration from > getPortIdentifiers. I'm using a file > PortChooser.java as a test file to get things going. This is from the Java > CookBook 2nd edition (Chapter 12). The call > > // get list of ports available on this particular computer, > // by calling static method in CommPortIdentifier. > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > returns a null pList; > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and > compile without --disable-lockfiles I get: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > ... > > When I compile with --disable-lockfiles the call to getPortIdentifiers > simply returns a null Enumeration. > > I've read the documention and threads about this issue and I feel like I've > tried everything, so at the moment I'm stumped. > > I can supply any further info that may help. > > Thanks in advance. > > Ed > Hi Ed You may want to check the permissions of /dev/lp*. Also make sure lp or your kernel support for lp is loaded. It should show up in dmesg and lsmod. For my laptop with no printer port enabled in BIOS is see: lp: driver loaded but no devices found in desg |grep lp [] $ ls -l /dev/lp* crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 here root and group lp can read and write. Normal users cannot. Try a simple read as a user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: Permission denied Fix as root [] chmod 666 /dev/lp* [] $ ls -l /dev/lp* crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 Now as user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: No such device or address So this is saying there is no lp0 on my laptop. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:58:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:58:31 -0600 (MDT) Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat In-Reply-To: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> References: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Message-ID: On Wed, 9 Aug 2006, Jim Owen wrote: > Hi All, > > I've run into some difficulties with rxtx that have me baffled and need > some help. > > I have an application that has used earlier versions of rxtx > successfully and on a variety of platforms. We recently needed to deploy > this application into an environment where we could not utilize lock files. > > I pulled down the 2.0.7 pre1 source distribution and executed configure > with --disable-lockfiles. I then executed make and make install. > > When I execute the program, as root, I get the following error: > > ************************************************************************ > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) > # Problematic frame: > # C 0x00001004 > # > # An error report file with more information is saved as hs_err_pid20151.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > **************************************************************************** > > If I execute as a normal user, I get no errors, but no ports listed: > (Using an earlier version, I get a serial and parallel port listed.) > > **************************************************************************** > [jim at linuxDev ingenicoApp]$ java VerifyCommBuild > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Some ports appear to have been found, let's try to enumerate them. > Complete. > **************************************************************************** > > When I built rxtx, there was a warning given of the following: > > **************************************************************************** > conftest.c: In function 'main': > conftest.c:6: warning: incompatible implicit declaration of built-in > function 'printf' > conftest.c:7: warning: incompatible implicit declaration of built-in > function 'exit' > > WARNING: Kernel include files do not match the current kernel > **************************************************************************** > > > uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 > Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux > > JAVA_HOME=/usr/java/j2sdk1.4.2_11 > > javax.comm.properties: Driver=gnu.io.RXTXCommDriver > > Here's the code for VerifyCommBuild.java that I'm using to test: > > > **************************************************************************** > import javax.comm.*; > import java.util.Enumeration; > /** > * A quick app to check that the javax.comm (Serial) Communications > extension has been properly > * installed and configured on this machine. > * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. > */ > public class VerifyCommBuild > { > public static void main(String args[]) > { > Enumeration ports; > System.out.println("Verifying Comm Build Environment"); > try > { > ports = CommPortIdentifier.getPortIdentifiers(); > if (ports == null) > { > System.out.println("No comm ports found!"); > return; > } > System.out.println("Some ports appear to have been found, let's > try to enumerate them."); > while (ports.hasMoreElements()) > { > System.out.println("Here is a port [" + > ((CommPortIdentifier)ports.nextElement()).getName() > + "]"); > } > } catch (Exception e) > { > System.out.println("Failed to enumerate ports [" + > e.getMessage() + "]"); > e.printStackTrace(); > } > System.out.println("Complete."); > } > } > Hi Jim This is a new one to me. Have you tried it on another system. Maybe something isnt sane in your toolchain. -- Trent Jarvi tarvi at qbang.org From eddythejekyll at gmail.com Sat Aug 12 11:45:39 2006 From: eddythejekyll at gmail.com (Ed) Date: Sat, 12 Aug 2006 11:45:39 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Trent, Right after I sent the results indicated below I re-ran the app and it apparently found the parallel port. The difference was that I set the permissions to : /dev: wildcard lp* crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 I'm still not sure how to interpret the dmesg and lsmod before. However I'm thinking that since the user now has permission to access the lp* port, a request to access it loaded the lp and parport modules automatically and allowed me access. Here's the output of lsmod now: ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp lp 5540 0 (autoclean) parport 21608 1 (autoclean) [parport_pc lp] and dmesg: ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp On node 0 totalpages: 161776 lp0: using parport0 (polling). So I think I'm good, and ready to move on the next steps. Thanks Trent! Ed On 8/12/06, Ed wrote: > > Thanks for the reply Trent. > > I'm on a different system today but am trying your suggestons. This is a > debian 3.1r2 system and I'm running jdk 1.5.0_04. > > Take a look below, but I think I have no parallel port support on this > kernel, however I never get the "No such device or address" return from the > cat call as you did so I'm not sure how to interpret the results. > > When I run the test program (PortChooser.java), the getPortIdentifiers > call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is > more than I found on the RedHat system. Incidently --disable-lockfiles has > no effect. > > It looks as though there is no parallel support in this kernel: > falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > On node 0 totalpages: 161776 > falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > > I'm a little confused by the results when I cat to the lp0 device. It > seems from the dmesg output that I don't have parallel printer support, but > when I cat to the lp0 device, I get permission denied if I'm non-root user > and input/output error if I'm root. Apparently this means I have the device, > but no support in the kernel? > > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > ed at falcon:~/src/workspace/EASServer/src$ su > Password: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > > Here's my lp* device permissions. > /dev: > wildcard lp* > crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > If I change it to > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I get: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > falcon:/home/ed/src/workspace/EASServer/src# exit > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > cat: /dev/lp0: Input/output error > ed at falcon:~/src/workspace/EASServer/src$ > > What do you think? Should I recompile the kernel or is it something else? > > By the way, I added the user ed to the lp and uucp groups on this system. > > Thanks again, > > Ed > > On 8/11/06, Trent Jarvi wrote: > > > > On Fri, 11 Aug 2006, Ed wrote: > > > > > I'm trying to read and write a parallel port on a standard (Dell) pc > > running > > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > > gates. > > > > > > I'm having problems getting rxtx to return a port enumeration from > > > getPortIdentifiers. I'm using a file > > > PortChooser.java as a test file to get things going. This is from the > > Java > > > CookBook 2nd edition (Chapter 12). The call > > > > > > // get list of ports available on this particular computer, > > > // by calling static method in CommPortIdentifier. > > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > > > > > returns a null pList; > > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure > > and > > > compile without --disable-lockfiles I get: > > > > > > Stable Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7 > > > Java lib Version = RXTX-2.1-7 > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > ... > > > > > > When I compile with --disable-lockfiles the call to getPortIdentifiers > > > > > simply returns a null Enumeration. > > > > > > I've read the documention and threads about this issue and I feel like > > I've > > > tried everything, so at the moment I'm stumped. > > > > > > I can supply any further info that may help. > > > > > > Thanks in advance. > > > > > > Ed > > > > > > > Hi Ed > > > > You may want to check the permissions of /dev/lp*. Also make sure lp or > > your kernel support for lp is loaded. It should show up in dmesg and > > lsmod. > > > > For my laptop with no printer port enabled in BIOS is see: > > > > lp: driver loaded but no devices found > > > > in desg |grep lp > > > > [] $ ls -l /dev/lp* > > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > here root and group lp can read and write. Normal users cannot. > > > > Try a simple read as a user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > > > > Fix as root > > > > [] chmod 666 /dev/lp* > > [] $ ls -l /dev/lp* > > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > Now as user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: No such device or address > > > > So this is saying there is no lp0 on my laptop. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > > > -- > > Ed > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060812/c2afe1f8/attachment-0326.html From tjarvi at qbang.org Sat Aug 12 14:01:52 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 12 Aug 2006 14:01:52 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Remember that the lp code expects a printer - or something like it. There is a line that specifies the printer is online. If you are doing hobby work, you will need to raise that line or loop it back to something that is raised. If you just try reading a port with no device connected and online, there will be an error while trying to read. This should be addressed in the mail-list archives. On Sat, 12 Aug 2006, Ed wrote: > Trent, > Right after I sent the results indicated below I re-ran the app and it > apparently found the parallel port. The difference was that I set the > permissions to : > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I'm still not sure how to interpret the dmesg and lsmod before. However I'm > thinking that since the user now has permission to access the lp* port, a > request to access it loaded the lp and parport modules automatically and > allowed me access. Here's the output of lsmod now: > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > lp 5540 0 (autoclean) > parport 21608 1 (autoclean) [parport_pc lp] > > and dmesg: > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > On node 0 totalpages: 161776 > lp0: using parport0 (polling). > > So I think I'm good, and ready to move on the next steps. > > Thanks Trent! > > Ed > > > On 8/12/06, Ed wrote: >> >> Thanks for the reply Trent. >> >> I'm on a different system today but am trying your suggestons. This is a >> debian 3.1r2 system and I'm running jdk 1.5.0_04. >> >> Take a look below, but I think I have no parallel port support on this >> kernel, however I never get the "No such device or address" return from the >> cat call as you did so I'm not sure how to interpret the results. >> >> When I run the test program (PortChooser.java), the getPortIdentifiers >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is >> more than I found on the RedHat system. Incidently --disable-lockfiles has >> no effect. >> >> It looks as though there is no parallel support in this kernel: >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp >> On node 0 totalpages: 161776 >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp >> >> I'm a little confused by the results when I cat to the lp0 device. It >> seems from the dmesg output that I don't have parallel printer support, but >> when I cat to the lp0 device, I get permission denied if I'm non-root user >> and input/output error if I'm root. Apparently this means I have the >> device, >> but no support in the kernel? >> >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> >> cat: /dev/lp0: Permission denied >> ed at falcon:~/src/workspace/EASServer/src$ su >> Password: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> >> Here's my lp* device permissions. >> /dev: >> wildcard lp* >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> If I change it to >> /dev: >> wildcard lp* >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> I get: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> falcon:/home/ed/src/workspace/EASServer/src# exit >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> ed at falcon:~/src/workspace/EASServer/src$ >> >> What do you think? Should I recompile the kernel or is it something else? >> >> By the way, I added the user ed to the lp and uucp groups on this system. >> >> Thanks again, >> >> Ed >> >> On 8/11/06, Trent Jarvi wrote: >> > >> > On Fri, 11 Aug 2006, Ed wrote: >> > >> > > I'm trying to read and write a parallel port on a standard (Dell) pc >> > running >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the >> > gates. >> > > >> > > I'm having problems getting rxtx to return a port enumeration from >> > > getPortIdentifiers. I'm using a file >> > > PortChooser.java as a test file to get things going. This is from the >> > Java >> > > CookBook 2nd edition (Chapter 12). The call >> > > >> > > // get list of ports available on this particular computer, >> > > // by calling static method in CommPortIdentifier. >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); >> > > >> > > returns a null pList; >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure >> > and >> > > compile without --disable-lockfiles I get: >> > > >> > > Stable Library >> > > ========================================= >> > > Native lib Version = RXTX-2.1-7 >> > > Java lib Version = RXTX-2.1-7 >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > ... >> > > >> > > When I compile with --disable-lockfiles the call to getPortIdentifiers >> > >> > > simply returns a null Enumeration. >> > > >> > > I've read the documention and threads about this issue and I feel like >> > I've >> > > tried everything, so at the moment I'm stumped. >> > > >> > > I can supply any further info that may help. >> > > >> > > Thanks in advance. >> > > >> > > Ed >> > > >> > >> > Hi Ed >> > >> > You may want to check the permissions of /dev/lp*. Also make sure lp or >> > your kernel support for lp is loaded. It should show up in dmesg and >> > lsmod. >> > >> > For my laptop with no printer port enabled in BIOS is see: >> > >> > lp: driver loaded but no devices found >> > >> > in desg |grep lp >> > >> > [] $ ls -l /dev/lp* >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > here root and group lp can read and write. Normal users cannot. >> > >> > Try a simple read as a user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: Permission denied >> > >> > Fix as root >> > >> > [] chmod 666 /dev/lp* >> > [] $ ls -l /dev/lp* >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > Now as user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: No such device or address >> > >> > So this is saying there is no lp0 on my laptop. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > >> >> >> >> -- >> >> Ed >> > > > > From pete.flugstad at gmail.com Mon Aug 14 07:51:41 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 08:51:41 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: <84d4a6d50608140651h3cb2266ap90c47780abace00@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > On Fri, 11 Aug 2006, Pete Flugstad wrote: > > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > > but there doesn't appear to be a way to select that via RXTX (which > > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > > is selected). > > I'm guessing I didn't know the difference. At the time, I really didn't > have windows API documentation. I just had some pages I found with > altivista/google. Later microsoft made their documentation available on > msdn or I learned about it. > > For rxtx, the calls need to be platform neutral. So if you see how to do > each in termios, then we can get it going. so, RTSCTS_IN/OUT at the COMM API is mapped to HARDWARE_FLOW_CONTROL in the POSIX layer. Which termios.c maps to RTS_CONTROL_HANDSHAKE and fOutxCtsFlow = true. Since termios.c is Windows only anway... Would it work to change the mapping in termios.c to map hardware flow control to RTS_CONTROL_TOGGLE? I just wondering (I'm going to go look, but there's a lot of code in there) if the code does anything special playing with flow control signals? Thanks, Pete From pete.flugstad at gmail.com Mon Aug 14 09:42:48 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 10:42:48 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> On 8/3/06, Trent Jarvi wrote: > On Thu, 3 Aug 2006, Pete Flugstad wrote: > > Okay, I can understand that, but from the PORTMON output, it looks > > like it's opening each port TWICE: > > I think this problem is in RXTXCommDriver.java. I've just not tracked it > down but it should be in the java code, not the native code so easy > enough to track down. Okay, I'm trying to track this down... Looks like the CommPortIdentifier static initializer loads RXTXCommDriver, and then calls RXTXDriver.initialize. But then CommPortIdentifier.getPortIdentifiers does the exact same thing. So that's where the two scans are coming from. I would guess that one or the other can be removed? Probably the one in the CommPortIdentifier.getPortIdentifiers? Doing so removes the 2nd scan. Pete PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) val = System.getProperty("gnu.io.SerialPorts"); Shouldn't the comparison be != null? getProperty returns null if the variable is NOT found, and you only want to assign to val if it IS found, right? Same thing for the parallel port case. End result is the same I guess, since you check for null later, but probably should be fixed. From eddythejekyll at gmail.com Mon Aug 14 11:55:17 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 11:55:17 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: When I try to get the mode with int mode = pPort.getMode(); it returns 0 which isn't any of the valid modes. I tried setting it explicitely with pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced the requested mode in nativeSetSerialPortParams at gnu.io.LPRPort.setLPRMode(Native Method) at gnu.io.LPRPort.setMode(LPRPort.java:87) Except for LPT_MODE_ANY, but the getMode call still failed out with an invalid state. I'm wondering if it's because I don't have the line pulled high like you said. This isn't a printer connected. It's a relay board with pins 2-9 tied to data, and 18-25 to gnd. The rest are open. I looked at a DB25 pinout diagram and I'm not sure which pin I need to tie high, and I looked through the archives, but didn't find a reference to something definitive. Can someone help me with which pin is the "online" pin as Trent mentioned? DB25 spec has ( I hope this formats correctly in this email) BUSY (11), SEL (13) or INIT (16) are candidates, but I'm guessing. Any clues? *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Thanks, Ed On 8/12/06, Trent Jarvi wrote: > > > Remember that the lp code expects a printer - or something like it. There > is a line that specifies the printer is online. If you are doing hobby > work, you will need to raise that line or loop it back to something that > is raised. > > If you just try reading a port with no device connected and online, there > will be an error while trying to read. This should be addressed in the > mail-list archives. > > On Sat, 12 Aug 2006, Ed wrote: > > > Trent, > > Right after I sent the results indicated below I re-ran the app and it > > apparently found the parallel port. The difference was that I set the > > permissions to : > > /dev: > > wildcard lp* > > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > > > I'm still not sure how to interpret the dmesg and lsmod before. However > I'm > > thinking that since the user now has permission to access the lp* port, > a > > request to access it loaded the lp and parport modules automatically and > > allowed me access. Here's the output of lsmod now: > > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > > lp 5540 0 (autoclean) > > parport 21608 1 (autoclean) [parport_pc lp] > > > > and dmesg: > > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > > On node 0 totalpages: 161776 > > lp0: using parport0 (polling). > > > > So I think I'm good, and ready to move on the next steps. > > > > Thanks Trent! > > > > Ed > > > > > > On 8/12/06, Ed wrote: > >> > >> Thanks for the reply Trent. > >> > >> I'm on a different system today but am trying your suggestons. This is > a > >> debian 3.1r2 system and I'm running jdk 1.5.0_04. > >> > >> Take a look below, but I think I have no parallel port support on this > >> kernel, however I never get the "No such device or address" return from > the > >> cat call as you did so I'm not sure how to interpret the results. > >> > >> When I run the test program (PortChooser.java), the getPortIdentifiers > >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this > is > >> more than I found on the RedHat system. Incidently --disable-lockfiles > has > >> no effect. > >> > >> It looks as though there is no parallel support in this kernel: > >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > >> On node 0 totalpages: 161776 > >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > >> > >> I'm a little confused by the results when I cat to the lp0 device. It > >> seems from the dmesg output that I don't have parallel printer support, > but > >> when I cat to the lp0 device, I get permission denied if I'm non-root > user > >> and input/output error if I'm root. Apparently this means I have the > >> device, > >> but no support in the kernel? > >> > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> > >> cat: /dev/lp0: Permission denied > >> ed at falcon:~/src/workspace/EASServer/src$ su > >> Password: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> > >> Here's my lp* device permissions. > >> /dev: > >> wildcard lp* > >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> If I change it to > >> /dev: > >> wildcard lp* > >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> I get: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> falcon:/home/ed/src/workspace/EASServer/src# exit > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> ed at falcon:~/src/workspace/EASServer/src$ > >> > >> What do you think? Should I recompile the kernel or is it something > else? > >> > >> By the way, I added the user ed to the lp and uucp groups on this > system. > >> > >> Thanks again, > >> > >> Ed > >> > >> On 8/11/06, Trent Jarvi wrote: > >> > > >> > On Fri, 11 Aug 2006, Ed wrote: > >> > > >> > > I'm trying to read and write a parallel port on a standard (Dell) > pc > >> > running > >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > >> > gates. > >> > > > >> > > I'm having problems getting rxtx to return a port enumeration from > >> > > getPortIdentifiers. I'm using a file > >> > > PortChooser.java as a test file to get things going. This is from > the > >> > Java > >> > > CookBook 2nd edition (Chapter 12). The call > >> > > > >> > > // get list of ports available on this particular computer, > >> > > // by calling static method in CommPortIdentifier. > >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > >> > > > >> > > returns a null pList; > >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I > configure > >> > and > >> > > compile without --disable-lockfiles I get: > >> > > > >> > > Stable Library > >> > > ========================================= > >> > > Native lib Version = RXTX-2.1-7 > >> > > Java lib Version = RXTX-2.1-7 > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > ... > >> > > > >> > > When I compile with --disable-lockfiles the call to > getPortIdentifiers > >> > > >> > > simply returns a null Enumeration. > >> > > > >> > > I've read the documention and threads about this issue and I feel > like > >> > I've > >> > > tried everything, so at the moment I'm stumped. > >> > > > >> > > I can supply any further info that may help. > >> > > > >> > > Thanks in advance. > >> > > > >> > > Ed > >> > > > >> > > >> > Hi Ed > >> > > >> > You may want to check the permissions of /dev/lp*. Also make sure lp > or > >> > your kernel support for lp is loaded. It should show up in dmesg and > >> > lsmod. > >> > > >> > For my laptop with no printer port enabled in BIOS is see: > >> > > >> > lp: driver loaded but no devices found > >> > > >> > in desg |grep lp > >> > > >> > [] $ ls -l /dev/lp* > >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > here root and group lp can read and write. Normal users cannot. > >> > > >> > Try a simple read as a user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: Permission denied > >> > > >> > Fix as root > >> > > >> > [] chmod 666 /dev/lp* > >> > [] $ ls -l /dev/lp* > >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > Now as user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: No such device or address > >> > > >> > So this is saying there is no lp0 on my laptop. > >> > > >> > -- > >> > Trent Jarvi > >> > tjarvi at qbang.org > >> > > >> > >> > >> > >> -- > >> > >> Ed > >> > > > > > > > > > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/59164078/attachment-0324.html From eddythejekyll at gmail.com Mon Aug 14 14:19:58 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 14:19:58 -0600 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? Message-ID: I'm using the ParallelPort class to drive a relay board. According to Mr. Jarvi, since this board isn't a printer, there will be a read error unless I hold the "printer online" line high in order to make the API think I'm talking to a printer. The problem is, I can't figure out which line is the "printer online". My DB25 spec lists the following: *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Anyone know which one I should tie high? I tried the busy line and it still errored out on the read. Thanks in advance, -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/66cf3c3e/attachment-0324.html From tjarvi at qbang.org Mon Aug 14 18:06:29 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:06:29 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Mon, 14 Aug 2006, Ed wrote: > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > which isn't any of the valid modes. I tried setting it explicitely with > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced > the requested mode in nativeSetSerialPortParams > at gnu.io.LPRPort.setLPRMode(Native Method) > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > invalid state. This is because rxtx only supports the basics. JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } One could program in more support. When I did that I just had a daisy wheel printer to test with and doing any more would have been blind. So that behavior is expected. I'll look to see if the Parallel Complete book mentions which pins you need to raise. If you look in the source code [ParallelImp.c] you can see this code isn't well tested. It has worked for hobby use in the past as I'd guess you are trying to do. But my experience with the code is as is mentioned in the top of the source: /* fear he who enter here. It appears that things have changed. An attempt has been made to put things the way the should be. It compiles and ParallelBlackBox runs. No further guarantees. Well... One.. it will print "Hello World!" on an epson DX 10 printer. you know.. the 10 character per second daisy wheel printer ;) - Trent Jarvi */ That comment is from 1997 or so. Since then some windows support was contributed but it is still very green code. We get about four requests for parallel support a year so its just not a well traveled area. It would be nice to have some documentation for the people trying to hook parallel ports to electronic projects. That appears to be the exclusive use of the Parallel support. The wiki pages are intended to let people share information like this to help each other in their projects as they figure out the details. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Aug 14 18:40:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:40:40 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: > PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): > > if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) > val = System.getProperty("gnu.io.SerialPorts"); > > Shouldn't the comparison be != null? getProperty returns null if the > variable is NOT found, and you only want to assign to val if it IS > found, right? Same thing for the > parallel port case. End result is the same I guess, since you check > for null later, > but probably should be fixed. I think this is just a fallback to the second property. gnu.io.SerialPorts isn't documented but perhaps it is used. It should behave properly as documented in INSTALL. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 14 18:56:55 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 19:56:55 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: <44E11BD7.5030102@gmail.com> Trent Jarvi wrote: >> PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): >> >> if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) >> val = System.getProperty("gnu.io.SerialPorts"); >> > > I think this is just a fallback to the second property. > gnu.io.SerialPorts isn't documented but perhaps it is used. It should > behave properly as documented in INSTALL. Doh - yup, I missed the fact that the property names were different... Pete From berkland at spamcop.net Mon Aug 14 19:58:21 2006 From: berkland at spamcop.net (Doug Berkland) Date: Mon, 14 Aug 2006 21:58:21 -0400 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? In-Reply-To: References: Message-ID: <269e40090608141858g698c2579v8d962deca3f4df53@mail.gmail.com> Based on memory and this page as confirmation, I would say pin 13 is the "Online" pin for SPP (standard parallel port). http://www.quatech.com/support/comm-over-parallel.php On 8/14/06, Ed wrote: > > I'm using the ParallelPort class to drive a relay board. According to Mr. > Jarvi, since this board isn't a printer, there will be a read error unless I > hold the "printer online" line high in order to make the API think I'm > talking to a printer. The problem is, I can't figure out which line is the > "printer online". My DB25 spec lists the following: > > *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and > Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data > Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 > D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select > 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select > In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit > 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 > Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and > Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground > > Anyone know which one I should tie high? I tried the busy line and it > still errored out on the read. > > Thanks in advance, > > -- > Ed > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/842bb770/attachment-0324.html From eddythejekyll at gmail.com Mon Aug 14 20:25:42 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 20:25:42 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Ah, I see. I've seen the caveats about limited Parallel support, but I thought it was mainly about the javax.comm package. The gnu.io is derived from javax.comm package right? That is, is the parallel support in rxtx is a superset of what's in javax.comm? I'm using this not for hobby usage, but for some simple instrumenation and control. If the project mandates it, I'll gladly work on extending the support. In the meantime, I need to get some sanity checks working, and repair my relay board (I smoked the ULN2803 chip, apparently by tying the BUSY (pin 11) to vcc). I guess I'll try the SEL pin next (and a supply of 2803s) with a ~1K pullup. The caveat in the comment block isn't very encouraging (!), but I borrowed an old Epson Stylus Color 600 printer to see what I can do. If I can write out characters to it I'll be happy. Parallel printers aren't easy to find these days. I haven't yet looked at the native source, yet, but I've just imported it into eclipse and I'll surf around a bit. Ed On 8/14/06, Trent Jarvi wrote: > > On Mon, 14 Aug 2006, Ed wrote: > > > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > > which isn't any of the valid modes. I tried setting it explicitely with > > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to > proced > > the requested mode in nativeSetSerialPortParams > > at gnu.io.LPRPort.setLPRMode(Native Method) > > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > > invalid state. > > This is because rxtx only supports the basics. > > JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > jclass jclazz, jint mode) > { > switch(mode) > { > case LPT_MODE_ANY: > break; > case LPT_MODE_SPP: > case LPT_MODE_PS2: > case LPT_MODE_EPP: > case LPT_MODE_ECP: > case LPT_MODE_NIBBLE: > default: > throw_java_exception( env, > UNSUPPORTED_COMM_OPERATION, > "nativeSetSerialPortParams", > "setLPRMode was unable to proced the > requested \ > mode" > ); > } > return(JNI_TRUE); > } > > One could program in more support. When I did that I just had a daisy > wheel printer to test with and doing any more would have been blind. > > So that behavior is expected. I'll look to see if the Parallel Complete > book mentions which pins you need to raise. If you look in the source > code [ParallelImp.c] you can see this code isn't well tested. It has > worked for hobby use in the past as I'd guess you are trying to do. But > my experience with the code is as is mentioned in the top of the source: > > /* > fear he who enter here. It appears that things have changed. An > attempt > has been made to put things the way the should be. > > It compiles and ParallelBlackBox runs. No further guarantees. > > Well... One.. it will print "Hello World!" on an epson DX 10 > printer. > you know.. the 10 character per second daisy wheel printer ;) > > - Trent Jarvi > */ > > That comment is from 1997 or so. > > Since then some windows support was contributed but it is still very green > code. We get about four requests for parallel support a year so its just > not a well traveled area. > > It would be nice to have some documentation for the people trying to hook > parallel ports to electronic projects. That appears to be the exclusive > use of the Parallel support. The wiki pages are intended to let people > share information like this to help each other in their projects as they > figure out the details. > > -- > Trent Jarvi > tjarvi at qbang.org > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/fbb5ddb4/attachment-0324.html From lyon at docjava.com Tue Aug 15 06:06:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 15 Aug 2006 08:06:27 -0400 Subject: [Rxtx] smoking is bad for your health In-Reply-To: References: Message-ID: Hi All, If you are connecting to the parallel port and smoking chips, it is time for extra stuff to buffer the parallel port. You may be want more current, in which case driver transistors are needed, or, if you are using the port as an output only device, you may like to add your own bus transceiver (e.g., 74245), set for output. Do be careful to design this properly; http://www.beyondlogic.org/spp/parallel.htm Some people like to use Octal D-type F.F's with OC outputs, like a 74374, http://upgrade.cntc.ac.kr/data/ttl/74374.html I like this one, as it has the D FF's and can latch the outputs for presentation to slower electronics (like relays). But careful! A relay that needs more current than the family of the device you have selected will look like a short to ground, and you will smoke your bug! And MOBO's do NOT come with the ability to drive any load you like. Check the power specs on your relay and be sure to protect the chip against back EMF with a diode. It is best to smoke test this on a bread board BEFORE hooking it to the computer. And be sure you smoke test the corner points in the ckt for a while, lest it fail in the field. - Doug >Ah, I see. I've seen the caveats about limited >Parallel support, but I thought it was mainly >about the javax.comm package. The >gnu.io is derived from javax.comm >package right? That is, is the parallel support >in rxtx is a superset of what's in javax.comm? > >I'm using this not for hobby usage, but for some >simple instrumenation and control. If the >project mandates it, I'll gladly work on >extending the support. In the meantime, I need >to get some sanity checks working, and repair my >relay board (I smoked the ULN2803 chip, >apparently by tying the BUSY (pin 11) to vcc). I >guess I'll try the SEL pin next (and a supply of >2803s) with a ~1K pullup. > >The caveat in the comment block isn't very >encouraging (!), ?but?I borrowed an old Epson >Stylus Color 600 printer to see what I can do. >?If I can write out characters to it I'll be >happy. Parallel printers aren't easy to find >these days. > > I haven't yet looked at the native source, yet, >but I've just imported it into eclipse and I'll >surf around a bit. > >Ed > >On 8/14/06, Trent Jarvi <tjarvi at qbang.org> wrote: > >On Mon, 14 Aug 2006, Ed wrote: > >> When I try to get the mode with int mode = pPort.getMode(); it returns 0 >> which isn't any of the valid modes. I tried setting it explicitely with >> pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with >> >> gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced >> the requested mode in nativeSetSerialPortParams >> at gnu.io.LPRPort.setLPRMode(Native Method) >> at gnu.io.LPRPort.setMode(LPRPort.java:87) >> >> Except for LPT_MODE_ANY, but the getMode call still failed out with an >> invalid state. > >This is because rxtx only supports the basics. > >JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > ???????jclass jclazz, jint mode) >{ > ???????switch(mode) > ???????{ > ???????????????case LPT_MODE_ANY: > ???????????????????????break; > ???????????????case LPT_MODE_SPP: > ???????????????case LPT_MODE_PS2: > ???????????????case LPT_MODE_EPP: > ???????????????case LPT_MODE_ECP: > ???????????????case LPT_MODE_NIBBLE: > ???????????????default: > ???????????????????????throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, > ???????????????????????????????"nativeSetSerialPortParams", > ???????????????????????????????"setLPRMode was >unable to proced the requested \ > ???????????????????????????????mode" > ???????????????????????); > ???????} > ???????return(JNI_TRUE); >} > >One could program in more support.??When I did that I just had a daisy >wheel printer to test with and doing any more would have been blind. > >So that behavior is expected.??I'll look to see if the Parallel Complete >book mentions which pins you need to raise.??If you look in the source >code [ParallelImp.c] you can see this code isn't well tested.??It has >worked for hobby use in the past as I'd guess you are trying to do.??But >my experience with the code is as is mentioned in the top of the source: > >/* > fear he who enter here.??It appears that things have changed.??An attempt > has been made to put things the way the should be. > > ???????It compiles and ParallelBlackBox runs.??No further guarantees. > > ???????Well... One.. it will print "Hello World!" on an epson DX 10 printer. > ???????you know.. the 10 character per second daisy wheel printer ;) > > ???????- Trent Jarvi >*/ > >That comment is from 1997 or so. > >Since then some windows support was contributed but it is still very green >code.??We get about four requests for parallel support a year so its just >not a well traveled area. > >It would be nice to have some documentation for the people trying to hook >parallel ports to electronic projects.??That appears to be the exclusive >use of the Parallel support.??The wiki pages are intended to let people >share information like this to help each other in their projects as they >figure out the details. > >-- >Trent Jarvi >tjarvi at qbang.org > > > > >-- >Ed > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 15 13:26:16 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 15 Aug 2006 14:26:16 -0500 Subject: [Rxtx] crash with too much memory Message-ID: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded from qbang.org. I'm exercising the RXTX COMM serial interface, both in a small standalone test and with the same code pulled into a large OSGI framework setup. If I use the stock .jar/.dll's, then everything works correctly in both situations. I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 (mingw-special)). If I use my locally built version, then my small test case works just fine, both when run inside Eclipse and when run standalone on the command line. However, when I try and use my locally built .jar/.dll's in the large framework environment, then I get a JVM crash with the attached log. Normally this would lead me to think that I was running out of memory or something in the large environment, and when I try and play with the JVM memory args, some interesting things show up. In our large environment, we have -Xms32M/-Xmx1024M - this appears to be the problem. If I set max to something like 64M, then things work. The cross over point from working to failing seems to be around 32M/110M (works) and 32M/111M (fails). But 128M/128M works while 128M/129M fails. So it seems to have to do with how much memory is actually available, or something like that. The thing that occurs to me is if my GCC is somehow generating something like "near" calls. But when the JVM has a lot of RAM available, it puts the DLL up somehwere in the address space and then the near calls fail - far calls are needed. So, I'm thinking this is probably a difference in the MinGW GCC I'm using and the one that was used to build the stock binaries from qbang, or maybe some command line args were changed? So, I'm hoping someone will have an idea of what's going on here... Thanks, Pete From tjarvi at qbang.org Tue Aug 15 18:54:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 15 Aug 2006 18:54:04 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: On Tue, 15 Aug 2006, Pete Flugstad wrote: > I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded > from qbang.org. > > I'm exercising the RXTX COMM serial interface, both in a small > standalone test and with the same code pulled into a large OSGI > framework setup. > > If I use the stock .jar/.dll's, then everything works correctly in > both situations. > > I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 > (mingw-special)). > > If I use my locally built version, then my small test case works just > fine, both when run inside Eclipse and when run standalone on the > command line. However, when I try and use my locally built > .jar/.dll's in the large framework environment, then I get a JVM crash > with the attached log. > > Normally this would lead me to think that I was running out of memory > or something in the large environment, and when I try and play with > the JVM memory args, some interesting things show up. > > In our large environment, we have -Xms32M/-Xmx1024M - this appears to > be the problem. If I set max to something like 64M, then things work. > The cross over point from working to failing seems to be around > 32M/110M (works) and 32M/111M (fails). > But 128M/128M works while 128M/129M fails. So it seems to have to do > with how much memory is actually available, or something like that. > > The thing that occurs to me is if my GCC is somehow generating > something like "near" calls. But when the JVM has a lot of RAM > available, it puts the DLL up somehwere in the address space and then > the near calls fail - far calls are needed. > > So, I'm thinking this is probably a difference in the MinGW GCC I'm > using and the one that was used to build the stock binaries from > qbang, or maybe some command line args were changed? > > So, I'm hoping someone will have an idea of what's going on here... > Hi Pete The binaries are from the src. They should be reproducable. I did extensive testing of rxtx several years ago using mingw as the compiler. The version was 2.95. I have not changed versions since. There are way too many variables as it is. I have a linux->mingw cross compiler rpm I use for all windows use. If you want a copy of it you can have it. It isn't anything 'special' :) -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Thu Aug 17 11:49:24 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 17 Aug 2006 12:49:24 -0500 Subject: [Rxtx] crash with too much memory In-Reply-To: References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> On 8/15/06, Trent Jarvi wrote: > I did extensive testing of rxtx several years ago using mingw as the > compiler. The version was 2.95. I have not changed versions since. > There are way too many variables as it is. FYI, I believe I've solved this problem by changing how the dll's were built. The original mingw makefile was generating Serial.def, then performing various operations with dlltool and ld. I modified the makefile to create the dll using this page: as a guide. With that, there's no longer any need to deal with Serial.def and the makefile becomes _much_ simpler. This appears to have addressed my problems with crashing. FWIW, GCC 2.95 is _really_ old - you should consider investigating upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is supposed to generate a native binary (i.e. just like MinGW). Thanks, Pete From claretlc at yahoo.com Thu Aug 17 12:34:48 2006 From: claretlc at yahoo.com (Clare Cooley) Date: Thu, 17 Aug 2006 11:34:48 -0700 (PDT) Subject: [Rxtx] parallel port communication Message-ID: <20060817183448.76911.qmail@web53908.mail.yahoo.com> Hi, I'm trying to write a 1 to a bit 15 on a parallel port cable that isn't attached to a printer.(It's a control box for eye-tracking equipment.)I need to do this in Java. I looked at the javax.comm documentation, and it said, "Application programs should not directly create ParallelPortEvent objects." So is there a way to do this with your package? If not, do you have any suggestions of where to look? It really needs to be done in Java. Thanks, Clare Cooley __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From pat at xvalheru.org Thu Aug 17 13:13:52 2006 From: pat at xvalheru.org (pat) Date: Thu, 17 Aug 2006 21:13:52 +0200 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060817190751.M5586@xvalheru.org> Hi there, I've question(s) for you. I need to communicate with scale, I've used the Sun's direver. Now I've switched to Rxtx and the speed of the communication is perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, but the difference between the crash time is 5 second ... . My question is: Is there a stable driver ??? Or what I have to do to have stable enough serial port driver ??? OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. Thanks to all for the help. Pat From tjarvi at qbang.org Fri Aug 18 05:13:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 05:13:42 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> Message-ID: On Thu, 17 Aug 2006, Pete Flugstad wrote: > On 8/15/06, Trent Jarvi wrote: >> I did extensive testing of rxtx several years ago using mingw as the >> compiler. The version was 2.95. I have not changed versions since. >> There are way too many variables as it is. > > FWIW, GCC 2.95 is _really_ old - you should consider investigating > upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is > supposed to generate a native binary (i.e. just like MinGW). > It is really old but also well known like C itself. I have considered upgrading. The ToyBox builds should be gcc 3* cross-compiled. I'm not going to be validating gcc 3* w32 binaries though. It's looking like we will need to focus support on MSFT's toolchain for 64 bit windows support until it is possible for gcc to support w64. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Aug 18 05:32:10 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 07:32:10 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: Hi All, Does anyone know how to produce mac intel binaries on a Fedora Linux box? Thanks! - Doug From tjarvi at qbang.org Fri Aug 18 06:42:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 06:42:05 -0600 (MDT) Subject: [Rxtx] cross compilation for the mac In-Reply-To: References: Message-ID: On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Does anyone know how to produce > mac intel binaries on a Fedora Linux > box? > > Thanks! > - Doug Hi Doug You need to build the cross toolchain which means copying the Darwin/Mac binaries over to fedora. It would be nontrivial but possible. Do the Darwin libraries work with Mac in general? I'm not aware of the licensing issues associated with grabbing Mac binaries. Same with OpenSolaris/Solaris. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Aug 18 08:15:26 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 10:15:26 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> In theory building against Darwin would be sufficient to getting things working on MacOS X. You need to remember that Darwin is the low-level OS, while MacOS X adds the everything else on top. IOKit, which is the I/O API, is available as part of Darwin. The only thing you will need extra are the Java libraries. One thing is that I would recommend that when producing binaries for the Mac, is to ensure they are Universal binaries (PPC+Intel). Andre > > From: Trent Jarvi > Date: 2006/08/18 Fri AM 08:42:05 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] cross compilation for the mac > > On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > > > Hi All, > > Does anyone know how to produce > > mac intel binaries on a Fedora Linux > > box? > > > > Thanks! > > - Doug > > Hi Doug > > You need to build the cross toolchain which means copying the Darwin/Mac > binaries over to fedora. It would be nontrivial but possible. > > Do the Darwin libraries work with Mac in general? I'm not aware of the > licensing issues associated with grabbing Mac binaries. > > Same with OpenSolaris/Solaris. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Aug 18 13:43:16 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 15:43:16 -0400 Subject: [Rxtx] cross compilation for the mac In-Reply-To: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: >In theory building against Darwin would be sufficient to getting >things working on MacOS X. You need to remember that Darwin is the >low-level OS, while MacOS X adds the everything else on top. IOKit, >which is the I/O API, is available as part of Darwin. The only thing >you will need extra are the Java libraries. > >One thing is that I would recommend that when producing binaries for >the Mac, is to ensure they are Universal binaries (PPC+Intel). > >Andre I find the xcode ide for generating a mix of universal binaries and java very difficult to make work. Is there a way to do this with make files? Thanks! - Doug From ajmas at sympatico.ca Fri Aug 18 13:54:55 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 15:54:55 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818195455.PGAP29052.tomts13-srv.bellnexxia.net@smtp1.sympatico.ca> It should be doable. XCode hands off the compilation process to gcc et al, for the compilation of C/C++ code and to javac et al. for the Java side. While ant is the favoured tool for 'automated' Java compilation, make can easily be used. All is needed is someone to volounteer to do the work. Andre "Dr. Douglas Lyon" wrote > > >In theory building against Darwin would be sufficient to getting > >things working on MacOS X. You need to remember that Darwin is the > >low-level OS, while MacOS X adds the everything else on top. IOKit, > >which is the I/O API, is available as part of Darwin. The only thing > >you will need extra are the Java libraries. > > > >One thing is that I would recommend that when producing binaries for > >the Mac, is to ensure they are Universal binaries (PPC+Intel). > > > >Andre > > I find the xcode ide for generating a mix of universal binaries > and java very difficult to make work. Is there a way to do this > with make files? > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Fri Aug 18 16:34:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 16:34:46 -0600 (MDT) Subject: [Rxtx] serial driver newbe question and problem In-Reply-To: <20060817190751.M5586@xvalheru.org> References: <20060817190751.M5586@xvalheru.org> Message-ID: On Thu, 17 Aug 2006, pat wrote: > Hi there, > > I've question(s) for you. I need to communicate with scale, I've used the > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > but the difference between the crash time is 5 second ... . > > My question is: Is there a stable driver ??? Or what I have to do to have > stable enough serial port driver ??? > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > Thanks to all for the help. > > Pat > Could you describe the hardware you have, the version of rxtx and provide the log of the crash? Did you download binaries? I've not been seeing a jvm crash with rxtx -- Trent Jarvi tjarvi at qbang.org From lunareclipse03 at web.de Sat Aug 19 12:11:48 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 19 Aug 2006 20:11:48 +0200 Subject: [Rxtx] Problem solved! Message-ID: <920065539@web.de> Hi everybody, I posted some months ago and asked about some help on my very special problem concerning my win32 port of a communications library. Now I just want to inform you that no further "mindstorming" is needed because I solved the problem by completely rewriting the win32 port of the library. Now everything works fine. Thank you all for your time and patience. --Sven Ahlemann __________________________________________________________________________ Erweitern Sie FreeMail zu einem noch leistungsst?rkeren E-Mail-Postfach! Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131 From ajmas at sympatico.ca Mon Aug 21 09:58:23 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 21 Aug 2006 11:58:23 -0400 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060821155823.TLSM18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Next time that happens, including a copy of the crash log, produced by Windows could probably help too. Andre Trent Jarvi wrote: > > On Thu, 17 Aug 2006, pat wrote: > > > Hi there, > > > > I've question(s) for you. I need to communicate with scale, I've used the > > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > > but the difference between the crash time is 5 second ... . > > > > My question is: Is there a stable driver ??? Or what I have to do to have > > stable enough serial port driver ??? > > > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > > > Thanks to all for the help. > > > > Pat > > > > Could you describe the hardware you have, the version of rxtx and > provide the log of the crash? Did you download binaries? > > I've not been seeing a jvm crash with rxtx > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From adrian.l.parker at gmail.com Thu Aug 24 09:10:39 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Thu, 24 Aug 2006 11:10:39 -0400 Subject: [Rxtx] Portability issues Message-ID: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use RXTX 2.0? Does it provide system librairies that javax.comm does not? I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, or 2000, or server 2003). Can this be done with a single implementation of RXTX? I don't want to have different versions of Java code that have different package names. References: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Message-ID: On Thu, 24 Aug 2006, Adrian Parker wrote: > Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use > RXTX 2.0? Does it provide system librairies that javax.comm does not? > > I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's > OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, > or 2000, or server 2003). Can this be done with a single implementation of > RXTX? I don't want to have different versions of Java code that have > different package names. > Hi Adrian. The native code can support all of the platforms you mention. I've never compiled for unixware or openunix but the patches are in the code. So you would need to compile for that target. >From there you would probably be best off going with rxtx 2.1 so you have all the classes in one package. You can opt to use rxtx 2.0 with Sun's commapi for Solaris v 2. The main differences are rxtx 2.1 comes with all the source/classes and is in package gnu.io while Sun's requires rxtx for some platforms but is in package javax.comm. The low level code is the same in either case as far as rxtx is concerned. -- Trent Jarvi tarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 04:12:52 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 06:12:52 -0400 Subject: [Rxtx] Serial.addEventListener bug? Message-ID: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on OpenServer 5.0.7). Its what Sun packages. I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an exception. It seems to throw the exception if no listener was previously declared (although I've not had chance to verify). Is this desireable behaviour? Sun's original API doesn't mention anything about an exception on this function, http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) Of course this is an old version of RXTX, so perhaps this has been changed. -- Adrian Parker Simulation Software Developer DLCSPM 4-4-3 (c) Building A31, CFB Kingston Tel: (613) 541-5010 x3020 CSN: 271-3020 Email: parker at lsec.dnd.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/22e2ea57/attachment-0314.html From tjarvi at qbang.org Fri Aug 25 05:15:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 25 Aug 2006 05:15:44 -0600 (MDT) Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: On Fri, 25 Aug 2006, Adrian Parker wrote: > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > OpenServer 5.0.7). Its what Sun packages. > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > exception. It seems to throw the exception if no listener was previously > declared (although I've not had chance to verify). > > Is this desireable behaviour? Sun's original API doesn't mention anything > about an exception on this function, > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > Of course this is an old version of RXTX, so perhaps this has been changed. > > > What exception was thrown? You can replace 1.4-8 with 2.0 for testing purposes. They are the same package. I doubt Sun shipped or packaged that. I think Caldera/SCOx/... did at one point. There may still be updates on their pages. I recall them sending patches here which are in current rxtx. -- Trent Jarvi tjarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 05:28:32 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 07:28:32 -0400 Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: <7da71e910608250428q32b86632g9a67b1b4efe69830@mail.gmail.com> On 8/25/06, Trent Jarvi wrote: > > On Fri, 25 Aug 2006, Adrian Parker wrote: > > > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > > OpenServer 5.0.7). Its what Sun packages. > > > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > > exception. It seems to throw the exception if no listener was > previously > > declared (although I've not had chance to verify). > > > > Is this desireable behaviour? Sun's original API doesn't mention > anything > > about an exception on this function, > > > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > > > Of course this is an old version of RXTX, so perhaps this has been > changed. > > > > > > > > What exception was thrown? Its weird. I catch an Exception. But when on that exception I call getClass().getName() I end up with a NullPointerException. You can replace 1.4-8 with 2.0 for testing > purposes. They are the same package. > > I doubt Sun shipped or packaged that. Doh! I meant to say SCO sorry. I was surfing Sun's site when I wrote that :) Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/e43aed3a/attachment-0314.html From sjudd at seas.upenn.edu Sat Aug 26 16:42:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Sat, 26 Aug 2006 18:42:09 -0400 Subject: [Rxtx] Mac commapi Message-ID: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? If so, where do I get it? Sun has various versions at http://www.sun.com/download/products.xml?id=43208d3d but they are for SolarisSparc, SolarisX86, Linux, and Generic. Do I use the Generic one? If so, read on; otherwise redirect me. While using the Generic version, my attempt to run the BlackBox sample program elicits a message saying it "can't find javax.comm.properties". I found a note in the rxtx.org HowTo (for Linux) saying to create this thing in /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties but where should it go on the Mac? After reading many versions of documentation around, and updates and revisions and re-authorings, I have worked my way into a state of confusion and high uncertainty. Please release me. sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060826/02d6b163/attachment-0284.html From tod at todbot.com Sat Aug 26 17:08:33 2006 From: tod at todbot.com (Tod E. Kurt) Date: Sat, 26 Aug 2006 16:08:33 -0700 Subject: [Rxtx] Mac commapi In-Reply-To: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Message-ID: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> You don't need Sun's CommAPI. You just need RXTX. Once you download RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and the native library is ("librxtxSerial.jnilib" on Mac OS X) via the standard methods. For instance, if you've placed those two files in a directory called 'rxtxlib' and you want to run a Java class called HelloWorld in the current directory, do the following: % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar HelloWorld On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? > If so, where do I get it? Sun has various versions at > http://www.sun.com/download/products.xml?id=43208d3d > but they are for SolarisSparc, SolarisX86, Linux, and Generic. > Do I use the Generic one? > If so, read on; otherwise redirect me. > > While using the Generic version, my attempt to run the BlackBox > sample program > elicits a message saying it "can't find javax.comm.properties". > I found a note in the rxtx.org HowTo (for Linux) saying to create > this thing in > /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties > but where should it go on the Mac? > > After reading many versions of documentation around, and updates > and revisions > and re-authorings, I have worked my way into a state of confusion > and high > uncertainty. Please release me. > > sj > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From sjudd at seas.upenn.edu Sun Aug 27 22:55:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Mon, 28 Aug 2006 00:55:09 -0400 Subject: [Rxtx] Mac commapi In-Reply-To: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> Message-ID: This was immensely helpful. Thank you, Tod. I wish it had been explicit somewhere in the documentation; it would have saved me 2 days of grief. One hugely valuable thing like this little set of instructions is that it implicitly lists all the hundreds of things you DON"T have to do. I know it seems obvious to those in the know, but every little bit of help on an arcane topic like this opens up the product to an exponentially wider group of dilettantes. I managed to get the SerialDemo program (from Sun) to work too. Hurrah! However, it required changing all the javax.comm references to gnu.io which I had heard of due to all my rambling readings. Is there not a demo program on rxtx.org already available that would not have needed this? BTW, the link on the Projects page for jPIC[Source] sends a *.hex file to a PIC 16F877 or similar chip... takes me to nowhere useful. I do not understand what the name "Toybox" is meant to imply. Thanks, sj On 2006 Aug 26, at 7:08 PM, Tod E. Kurt wrote: > You don't need Sun's CommAPI. You just need RXTX. Once you download > RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and > the native library is ("librxtxSerial.jnilib" on Mac OS X) via the > standard methods. > > For instance, if you've placed those two files in a directory called > 'rxtxlib' and you want to run a Java class called HelloWorld in the > current directory, do the following: > > % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar > HelloWorld > > > On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > >> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? >> If so, where do I get it? Sun has various versions at >> http://www.sun.com/download/products.xml?id=43208d3d >> but they are for SolarisSparc, SolarisX86, Linux, and Generic. >> Do I use the Generic one? >> If so, read on; otherwise redirect me. >> >> While using the Generic version, my attempt to run the BlackBox >> sample program >> elicits a message saying it "can't find javax.comm.properties". >> I found a note in the rxtx.org HowTo (for Linux) saying to create >> this thing in >> /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties >> but where should it go on the Mac? >> >> After reading many versions of documentation around, and updates >> and revisions and re-authorings, I have worked my way into a state >> of confusion and high uncertainty. Please release me. >> >> sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060827/b80d6389/attachment-0284.html From pete.flugstad at gmail.com Mon Aug 28 12:38:27 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 13:38:27 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE Message-ID: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Okay, my understanding is that originally, RTS meant "Request to Send" - the DTE (the PC) would assert this and the DCE (modem) would assert "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send data. This really only provided uni-directional flow control, from the PC to the modem. Now, as I understand it, the more modern usage of RTS is that it is used for the DTE to assert flow control back to the DCE - basically it means "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) raises this, then the DCE(modem) is free to send data to the DTE - this allows the DTE(PC) to exert flow control back towards the DCE(modem). This discussion is based on the Serial HOWTO from: and lots of other reading... Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which is defined as: > Enables RTS flow-control handshaking. The driver raises the RTS line, > enabling the DCE to send, when the input buffer has enough room to > receive data. The driver lowers the RTS line, preventing the DCE to > send, when the input buffer does not have enough room to receive > data. If this value is used, it is an error for the application to adjust > the line with EscapeCommFunction. which clearly reflects the newer usage style - it keeps the RTS line high as long as there is space to _receive_ data. And takes it low when the receive/input buffer is getting full to stop the modem from sending it data. Does this jive with other peoples understanding of RTS usage? Unfortunately, the hardware I'm trying to talk to wants to use the OLD style of RTS line usage. An existing Windows C++ program uses RTS_CONTROL_TOGGLE, which documentation states: > Specifies that the RTS line will be high if bytes are available for transmission. > After all buffered bytes have been sent, the RTS line will be low. If this value is > set, it would be an error for an application to adjust the line with > EscapeCommFunction. This value is ignored in Windows 95; it causes the > driver to act as if RTS_CONTROL_ENABLE were specified. This seems to be the OLD RTS behavior, right? So, what I seem to need is to be able to control the RTS line, either using TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS when getting ready to TX and clear it when the output buffer is empty). Does this make sense, or am I off in the weeds? Thanks, Pete From tjarvi at qbang.org Mon Aug 28 18:21:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 28 Aug 2006 18:21:10 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: On Mon, 28 Aug 2006, Pete Flugstad wrote: > Okay, my understanding is that originally, RTS meant "Request to Send" > - the DTE (the PC) would assert this and the DCE (modem) would assert > "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send > data. This really only provided uni-directional flow control, from the PC to > the modem. > > Now, as I understand it, the more modern usage of RTS is that it is used > for the DTE to assert flow control back to the DCE - basically it means > "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) > raises this, then the DCE(modem) is free to send data to the DTE - this > allows the DTE(PC) to exert flow control back towards the DCE(modem). > > This discussion is based on the Serial HOWTO from: > > > > and lots of other reading... > > Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > is defined as: > >> Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > > which clearly reflects the newer usage style - it keeps the RTS line high > as long as there is space to _receive_ data. And takes it low when the > receive/input buffer is getting full to stop the modem from sending it data. > > Does this jive with other peoples understanding of RTS usage? > > Unfortunately, the hardware I'm trying to talk to wants to use the OLD > style of RTS line usage. An existing Windows C++ program uses > RTS_CONTROL_TOGGLE, which documentation states: > >> Specifies that the RTS line will be high if bytes are available for transmission. >> After all buffered bytes have been sent, the RTS line will be low. If this value is >> set, it would be an error for an application to adjust the line with >> EscapeCommFunction. This value is ignored in Windows 95; it causes the >> driver to act as if RTS_CONTROL_ENABLE were specified. > > This seems to be the OLD RTS behavior, right? > > So, what I seem to need is to be able to control the RTS line, either using > TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS > when getting ready to TX and clear it when the output buffer is empty). > > Does this make sense, or am I off in the weeds? > Hi Pete OK. That sounds right. I do not know how you would communicate the difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through CommAPI as it stands. I take it you did not find anything either? Perhaps the best thing to do for your code is to toggle the RTS yourself. This could be a feature in the future JSR API perhaps. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 28 20:54:34 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 21:54:34 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <44F3AC6A.10908@gmail.com> Trent Jarvi wrote: > OK. That sounds right. I do not know how you would communicate the > difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through > CommAPI as it stands. I take it you did not find anything either? > > Perhaps the best thing to do for your code is to toggle the > RTS yourself. This could be a feature in the future JSR API perhaps. Yeah, this is what I ended up doing. I had to modify the dll in order to be able to set hardware flow control (which I do want), but leave the RTS flow control at RS_CONTROL_ENABLE. After that I just toggle setRTS(true) when I'm ready to send and setRTS(false) when I get a OUTPUT_BUFFER_EMPTY notification. Haven't tested with real hardware yet, but it seems to work OK. Thanks for the feedback! Pete From Bob_Jacobsen at lbl.gov Tue Aug 29 08:49:02 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 29 Aug 2006 07:49:02 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >is defined as: > > > Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > >which clearly reflects the newer usage style - it keeps the RTS line high >as long as there is space to _receive_ data. And takes it low when the >receive/input buffer is getting full to stop the modem from sending it data. > >Does this jive with other peoples understanding of RTS usage? Can you point to any devices that actually implement this "new" understanding? I think the person who wrote that documentation paragraph is just confused. The original "RTS/CTS" handshaking was extended to input (from DCE to DTE) handshaking via the DTR (Data Terminal Ready) line. I think the person who wrote the double-quoted paragraph above was just confused between the directions, and mixed them up. If you change "RTS" to "DTR" in that paragraph, you get: > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > enabling the DCE to send, when the input buffer has enough room to > > receive data. The driver lowers the DTR line, preventing the DCE to > > send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. which describes how dozens of devices actually work for controlling flow into the DTE (computer). This then leaves RTS/CTS (with RTS usually just stuck high) for controlling flow into the DCE (peripheral). Again, lots of hardware devices actually do this. I don't work on Windows, so can't be sure of what happens. But on the MacOS X version of RXTX, CTS low stops transmission, exactly as the "old" style would expect. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From mschned at basis.com Tue Aug 29 12:57:45 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 12:57:45 -0600 Subject: [Rxtx] Porting to AIX Message-ID: <01f201c6cb9d$034d4f20$341416ac@basis.com> Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar From mschned at basis.com Tue Aug 29 13:58:05 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 13:58:05 -0600 Subject: [Rxtx] Porting to AIX References: <01f201c6cb9d$034d4f20$341416ac@basis.com> Message-ID: <024901c6cba5$714c3560$341416ac@basis.com> After looking through the build messages closer, there is an error building SerialImp.c: gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type Looks like B57600 is not defined and there are no definitions for DEVICEDIR and LOCKDIR on AIX. Can I just a the following to SerialImp.h? #if defined(__aix__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __aix__ */ Mark Schnedar ----- Original Message ----- From: "Mark E. Schnedar" To: Sent: Tuesday, August 29, 2006 12:57 PM Subject: [Rxtx] Porting to AIX Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 29 15:25:35 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 29 Aug 2006 16:25:35 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <84d4a6d50608291425i1fb819d3i615cf9b85b1e9617@mail.gmail.com> On 8/29/06, Bob Jacobsen wrote: > Can you point to any devices that actually implement this "new" understanding? > > I think the person who wrote that documentation paragraph is just confused. The paragraph is from the Windows documentation of its DCB structure which is used to configure the Serial Device. This is what RXTX uses internally. My version is from MSDN, and Google finds the same text here: (search for fRtsControl). I have not seen any mention anywhere of it being incorrect (and yes, I did look, because I thought the same thing). My discussion is based on trying to use RXTX to talk to a device that used the old style of one-way flow control (RTS is raised to SEND data from the PC to the device). An existing VC++ app use the old-style RTS_CONTROL_TOGGLE. RXTX did not - it used the newer style RTS_CONTROL_HANDSHAKE, so things didn't work - the device was seeing RTS HIGH all the time, so it was thinking that the PC was ready to TX all the time. When I switch RXTX to using RTS_CONTROL_ENABLED and manually control RTS, then things work correctly. The behavior is consistent with this understanding if I hook two serial ports on Windows XP in lookback (via null modem). I'd be very surprised if this had not been corrected by M$ by this time. The same structure has been around since WinNT (mid 1990's) - their documentation is typically pretty good. > > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > > enabling the DCE to send, when the input buffer has enough room to > > > receive data. The driver lowers the DTR line, preventing the DCE to > > > send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. There is a seperate field, fDtrControl, which you can set to DTR_CONTROL_HANDSHAKE, that appears to do exactly this. > This then leaves RTS/CTS (with RTS usually just stuck high) for > controlling flow into the DCE (peripheral). Again, lots of hardware > devices actually do this. > > I don't work on Windows, so can't be sure of what happens. But on > the MacOS X version of RXTX, CTS low stops transmission, exactly as > the "old" style would expect. Well, the Linux Serial HOWTO is where I got most of my information. And yes, I thought it was wrong as well, but it's apparently how things are implemented: Donno - but it works for me... Pete From tjarvi at qbang.org Tue Aug 29 19:11:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 29 Aug 2006 19:11:40 -0600 (MDT) Subject: [Rxtx] Porting to AIX In-Reply-To: <024901c6cba5$714c3560$341416ac@basis.com> References: <01f201c6cb9d$034d4f20$341416ac@basis.com> <024901c6cba5$714c3560$341416ac@basis.com> Message-ID: Hi Mark That should do it. You can put ifdef around the B57600 as we did with higher baudrates. You may want to use tip, minicom, kermit or some other serial application on the AIX to confirm that the lockfiles created are correct. Neat stuff. On Tue, 29 Aug 2006, Mark E. Schnedar wrote: > After looking through the build messages closer, > there is an error building SerialImp.c: > > gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o > /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type > > Looks like B57600 is not defined and there are no > definitions for DEVICEDIR and LOCKDIR on AIX. > > Can I just a the following to SerialImp.h? > > #if defined(__aix__) > # define DEVICEDIR "/dev/" > # define LOCKDIR "/var/lock" > # define LOCKFILEPREFIX "LCK.." > # define FHS > #endif /* __aix__ */ > > Mark Schnedar > > > ----- Original Message ----- > From: "Mark E. Schnedar" > To: > Sent: Tuesday, August 29, 2006 12:57 PM > Subject: [Rxtx] Porting to AIX > > > Hi, > > I'm new to rxtx. Currently my company has an interpreter product > that uses rxtx on Windows and Linux. I am trying to get rxtx to > build on AIX. I downloaded rxtx, ran ./configure and make. When > I run make I get the following error: > > libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object > make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 > > Do you have any suggestions on how to fix this problem? > > I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error > on both systems). I did have our system administrator load > automake, autoconf, make (gnu), and gcc. Here are the versions: > > AIX 4.3.3 AIX 5.3.0 > rxtx: 2.1-7r2 2.1-7r2 > autoconf: 2.53 2.59 > automake: 1.5 1.8.5 > make: 3.79.1 3.80 > gcc: (used native cc) 4.0.0 > > Any help would be appreciated. > > Mark Schnedar > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From guille at sms.nl Wed Aug 30 01:14:32 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 09:14:32 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <7.0.1.0.0.20060830091204.03652de0@sms.nl> At 16:49 29/08/2006, Bob Jacobsen wrote: >At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > > > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >is defined as: > > > > > Enables RTS flow-control handshaking. The driver raises the RTS line, > >> enabling the DCE to send, when the input buffer has enough room to > >> receive data. The driver lowers the RTS line, preventing the DCE to > >> send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. > > > >which clearly reflects the newer usage style - it keeps the RTS line high > >as long as there is space to _receive_ data. And takes it low when the > >receive/input buffer is getting full to stop the modem from sending it data. > > > >Does this jive with other peoples understanding of RTS usage? > >Can you point to any devices that actually implement this "new" understanding? Many (most) of the embedded devices we work with implement this kind of flow control. The host (DTE) raises RTS when it can receive data, and lowers it when the input buffers are full. In turn it watches the CTS line to see whether it can send data to the DCE. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From tjarvi at qbang.org Wed Aug 30 01:23:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 30 Aug 2006 01:23:46 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830091204.03652de0@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 16:49 29/08/2006, Bob Jacobsen wrote: >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: >>> >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >>> is defined as: >>> >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, >>>> enabling the DCE to send, when the input buffer has enough room to >>>> receive data. The driver lowers the RTS line, preventing the DCE to >>>> send, when the input buffer does not have enough room to receive >>>> data. If this value is used, it is an error for the application to adjust >>>> the line with EscapeCommFunction. >>> >>> which clearly reflects the newer usage style - it keeps the RTS line high >>> as long as there is space to _receive_ data. And takes it low when the >>> receive/input buffer is getting full to stop the modem from sending it data. >>> >>> Does this jive with other peoples understanding of RTS usage? >> >> Can you point to any devices that actually implement this "new" understanding? > > Many (most) of the embedded devices we work with implement this kind of flow > control. The host (DTE) raises RTS when it can receive data, and lowers it > when the input buffers are full. In turn it watches the CTS line to see > whether it can send data to the DCE. > I think this explains some hardware control 'bugs' I've seen. -- Trent Jarvi tjarvi at qbang.org From guille at sms.nl Wed Aug 30 02:01:35 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 10:01:35 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> At 09:23 30/08/2006, Trent Jarvi wrote: >On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > > > At 16:49 29/08/2006, Bob Jacobsen wrote: > >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >>> > >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >>> is defined as: > >>> > >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, > >>>> enabling the DCE to send, when the input buffer has enough room to > >>>> receive data. The driver lowers the RTS line, preventing the DCE to > >>>> send, when the input buffer does not have enough room to receive > >>>> data. If this value is used, it is an error for the > application to adjust > >>>> the line with EscapeCommFunction. > >>> > >>> which clearly reflects the newer usage style - it keeps the RTS line high > >>> as long as there is space to _receive_ data. And takes it low when the > >>> receive/input buffer is getting full to stop the modem from > sending it data. > >>> > >>> Does this jive with other peoples understanding of RTS usage? > >> > >> Can you point to any devices that actually implement this "new" > understanding? > > > > Many (most) of the embedded devices we work with implement this > kind of flow > > control. The host (DTE) raises RTS when it can receive data, and lowers it > > when the input buffers are full. In turn it watches the CTS line to see > > whether it can send data to the DCE. > > > >I think this explains some hardware control 'bugs' I've seen. I think the above is the most widespread use, but that may just mean it is the most widespread use in our specific segment (embedded systems). Some UART chips (e.g. from Exar) implement this kind of flow control directly in hardware. For example the Exar can be configured to suspend transmission when it sees CTS low, and resume transmission when it sees CTS high. This is also consistent with our experience. Maybe this helps clarify: http://www.tldp.org/HOWTO/Text-Terminal-HOWTO-10.html#ss10.7 Note the "Old RTS/CTS handshaking is different" section, which refers to "older terminals" whereas newer equipment would use RTS/CTS flow control (or equivalently DTR/DTS) as described above. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From Bob_Jacobsen at lbl.gov Wed Aug 30 07:55:31 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 30 Aug 2006 06:55:31 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> <7.0.1.0.0.20060830095557.0374ff28@sms.nl> Message-ID: I think we all agree that CTS inactive means "Send no more from DTE to DCE". The question is how to express the other direction, "Send no more from DCE to DTE". There are two parts to this question: What do various DTE-like devices do, and what do various DCE-like devices expect? Electrically, the lines that go that direction are DTR, DCD, and RTS (plus some special-purpose lines that are rarely present). All three devices I work most with respect the DTR lead. On the other hand, the FTDI chips for doing serial over USB provide either (RTS and CTS) or (DTR and DSR) as the two leads. What we're probably seeing is two different approaches, that have propagated separately. That's a problem. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From Pawan.Kharbanda at dot.state.co.us Wed Aug 30 09:07:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 30 Aug 2006 09:07:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0455E5E5@hqexchange3.dot.state.co.us> Trent, Sorry for not responding earlier to your email. I was actually waiting for the release of our software on the new Hardware. As I mentioned in my previous emails, RXTX crashes and locks up serial ports with the older version of Redhat (Linux 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:28:55 EDT 2005 i686 i686 i386 GNU/Linux), it might work ok if you are using one or 2 ports but anything more than that it has issues. I was using JDK1.5.0_06 and older firmwares of Digi boxes. Let me know if you need any more specific information of the older system. Thanks Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Thursday, August 10, 2006 5:40 AM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even > after 10000 operations (now I am trying 100,000 :). This is all with > the original RXTX 2.1.7 (final) api's without any of my fixes that I > have been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying > the RXTX saying the suggested kernel for Redhat Linux is > 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Aug 1 01:11:30 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 1 Aug 2006 09:11:30 +0200 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <34B6BC40-1405-4A13-8054-0FC6CE10466A@buechse.de> This is a problem with lock files. You should find it somewhere in the documentation... On 01.08.2006, at 03:53, Richard P. Welty wrote: > trying to get my app running on a Mac OS X powerbook, when > the following is executed as the first thing inside the > run method of a Thread: > > > try { > port = (SerialPort) selectedPort.open( > this.getClass().getName(), 2000); > } catch ( PortInUseException ex){ > ex.printStackTrace(); > return; > } > > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java: > 354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run > (ScaleWatcher.java:143) > > i've not seen any documentation suggesting that rxtx would be finicky > about application names... > > thanks for any suggestions, > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From rwelty at suespammers.org Tue Aug 1 05:37:53 2006 From: rwelty at suespammers.org (Richard P. Welty) Date: Tue, 01 Aug 2006 07:37:53 -0400 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <44CF3D11.9060108@suespammers.org> Richard P. Welty wrote: > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) Aha, a confusing error message. it's really a lock file problem; the code is trying to fill in the application name but when it's getting "Unknown Application" and filling that in... richard From ajmas at sympatico.ca Tue Aug 1 13:10:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:10:59 -0400 Subject: [Rxtx] Application Name? Message-ID: <20060801191059.HFCD18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> You need the source code in CVS. The forth coming 2.18 will correct this, but currently the only place to find the correction is in CVS. No idea when 2.18 is due. > > From: "Richard P. Welty" > Date: 2006/08/01 Tue AM 07:37:53 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Application Name? > > Richard P. Welty wrote: > > > i get the following: > > > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > at > > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) > > Aha, a confusing error message. it's really a lock file problem; the > code is trying to fill in the application name but when it's getting > "Unknown Application" and filling that in... > > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:15:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:15:57 -0400 Subject: [Rxtx] Do interfaces break backwards compatibility? Message-ID: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> It is the class that decides to add serializable that needs to worry about those issues. For the most part serial ports and their connection states should be considered as transient, since there is no guarantee they will still be present or that their state will be, especially in a USB world. What you can store is the port settings and port id and then simply test for port availability next time. Nothing else should be assumed. > > From: Gregg Wonderly > Date: 2006/07/31 Mon PM 01:21:19 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Do interfaces break backwards compatibility? > > Doug Berkland wrote: > > As far as I can tell, nothing in either RXTX or Sun's JavaCOMM > > implements Serializable. Therefore, there are no worries from that > > either. (I can't think of a reason anything in JavaCOMM should > > implement Serializable either.) > > Any interface in javax.comm can become implemented by a serializable object. > Thus, if someone wants to provide remote access to a serial port, then they > might (and I think this is not wise) choose to subclass and add Serializable to > the interface list. > > It's that kind of Serialization compatibility that I'm talking about. > > Gregg Wonderly > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:18:11 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:18:11 -0400 Subject: [Rxtx] precompiled for Intel Mac? Message-ID: <20060801191811.FLJY27612.tomts16-srv.bellnexxia.net@smtp1.sympatico.ca> > > From: Joachim Buechse > There will be. However not before we have figured out some remaining issues. What issues are remaining? Andre From Pawan.Kharbanda at dot.state.co.us Tue Aug 1 16:55:08 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 1 Aug 2006 16:55:08 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Hi, I am also experiencing occasional JVM crash thru the native code. I am attaching the log from the crash. Any ideas what might be causing it???? Regards Pawan Kharbanda # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # --------------- T H R E A D --------------- Current thread (0x8d000480): JavaThread "Thread-119" [_thread_in_native, id=111 51] siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba Registers: EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 Top of Stack: (sp=0x8d3482b8) 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 0x8d348308: 00000000 00000002 00000000 00000000 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 Instructions: (pc=0xb75e39b2) 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~StubRoutines::call_stub V [libjvm.so+0x2607ec] V [libjvm.so+0x423828] V [libjvm.so+0x260045] V [libjvm.so+0x2600de] V [libjvm.so+0x2d7745] V [libjvm.so+0x4c2ba3] V [libjvm.so+0x424338] C [libpthread.so.0+0x4dd8] 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 ) =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, id=11026] 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, id=11023] From tjarvi at qbang.org Tue Aug 1 18:46:21 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 1 Aug 2006 18:46:21 -0600 (MDT) Subject: [Rxtx] JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Message-ID: On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) > C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] > 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, > id=11034] > 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, > id=11033] > 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, > id=11032] > 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, > id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] > 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, > id=11028] > 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, > id=11027] > 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, > id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] > 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- Index: termios.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/termios.c,v retrieving revision 1.9.2.57 diff -u -r1.9.2.57 termios.c --- termios.c 4 Jun 2006 02:50:01 -0000 1.9.2.57 +++ termios.c 11 Jun 2006 21:51:10 -0000 @@ -1048,26 +1048,29 @@ if ( !first_tl ) { port->prev = NULL; + port->next = NULL; first_tl = port; } else { - while ( index->next ) + while ( ( index->fd < port->fd ) && index->next ) index = index->next; - if ( port == first_tl ) + if ( index->fd > port->fd ) { - port->prev = NULL; - port->next = first_tl; - first_tl->prev = port; - first_tl = port; + /* inserting previously closed fd */ + port->prev = index->prev; + port->next=index + index->prev->next = port; + index->prev = port; } else { + /* adding to end of list */ port->prev = index; + port->next = NULL; index->next = port; } } - port->next = NULL; LEAVE( "add_port" ); return port; From gergg at cox.net Tue Aug 1 23:25:19 2006 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 02 Aug 2006 00:25:19 -0500 Subject: [Rxtx] Do interfaces break backwards compatibility? In-Reply-To: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <44D0373F.7020600@cox.net> Andre-John Mas wrote: > It is the class that decides to add serializable that needs to worry about those issues. > For the most part serial ports and their connection states should be considered as > transient, since there is no guarantee they will still be present or that their state > will be, especially in a USB world. Right, but when you provide an interface as the standard, that opens the doors for a lot more interpretation and variation. An abstract class can indicate a lot more about what the expected implementation is. Gregg Wonderly From lyon at docjava.com Wed Aug 2 06:02:15 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:02:15 -0400 Subject: [Rxtx] jsr spec and license issues Message-ID: Hi All, Trent and I have been discussing the license issues of the JSR spec and code that we develop, as a community. Here is what we have come up with: >During the development, the new JSR spec that we derive >will be >covered under the LGPL license. Since it is >just interfaces, any contributions will come back to me, for inclusion >into the specification. The goal is to provide a detailed set of >interfaces that >document the present state of our reference model. I am using >the RXTX as the reference model. If there is something missing from >the reference model, or if the reference model has something that should >not be there, we will need to discuss it. > >After Sun accepts the JSR, I, as the copyright holder, can issue >a version with a JSR compatible license. > >The goal is to migrate the interfaces into javax.comm. Does this sound like a reasonable plan to everyone? Thanks! - Doug From joachim at buechse.de Wed Aug 2 06:21:03 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 14:21:03 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Good day, quite frankly I think that this is a very bad idea. This specification (!) should be in the public domain and nowhere else. Defining a spec under the (L)GPL makes absolutely no sense. After all it is a specification not an implementation. There is no or only trivial code attached to it. So while nothing can be gained by putting it under the LGPL, a lot can be lost - for example the contribution of companies that do not like to open source their implementations. Furthermore you are plain wrong assuming you will be the copyright holder to additions made by other people. Best regards, Joachim On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for >> inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that >> should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Aug 2 06:39:28 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:39:28 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Hi All, I don't know anything about licensing issues. The below sounds reasonable. If we make this public domain, will that be compatible with Sun's JSR? Thanks! - DL P.S. I really don't care what we do, as long as there is some sort of collective agreement. >Good day, > >quite frankly I think that this is a very bad idea. This specification >(!) should be in the public domain and nowhere else. > >Defining a spec under the (L)GPL makes absolutely no sense. After all? >it is a specification not an implementation. There is no or only? >trivial code attached to it. So while nothing can be gained by? >putting it under the LGPL, a lot can be lost - for example the? >contribution of companies that do not like to open source their? >implementations. > >Furthermore you are plain wrong assuming you will be the copyright? >holder to additions made by other people. > >Best regards, >Joachim > > >On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for? >>> inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that? >>> should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> >> Does this sound like a reasonable plan to everyone? >> >> Thanks! >> - Doug >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 07:50:09 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 10:50:09 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D0AD91.4080103@gmail.com> Hi, I have been searching the web and here it is: http://jcp.org/en/resources/license_reference Here there is a list of the licenses that are compatible with the JCP for JSR submitting. I think that Apache, CDDL, CPL and OSL are the one that are compatible with our needs. But I think that Apache is the best for us, Doug why do not make a votation? Regards, Manuel > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. > >> Good day, >> >> quite frankly I think that this is a very bad idea. This specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From lyon at docjava.com Wed Aug 2 08:10:55 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 10:10:55 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D0AD91.4080103@gmail.com> References: <44D0AD91.4080103@gmail.com> Message-ID: Hi All, I have no objection to an Apache license for the JSR interfaces that we produce. Would anyone care to comment? Joachim: Does this address your public domain concerns? How does this impact the reference implementation (i.e. RXTX)? Thanks! - DL >Hi, >I have been searching the web and here it is: >http://jcp.org/en/resources/license_reference >Here there is a list of the licenses that are compatible with the JCP >for JSR submitting. >I think that Apache, CDDL, CPL and OSL are the one that are compatible >with our needs. >But I think that Apache is the best for us, Doug why do not make a votation? >Regards, >Manuel > >> Hi All, >> I don't know anything about licensing issues. >> The below sounds reasonable. If we make this public domain, >> will that be compatible with Sun's JSR? >> Thanks! >> - DL >> P.S. I really don't care what we do, as long as there is >> some sort of collective agreement. >>?? >>> Good day, >>> >>> quite frankly I think that this is a very bad idea. This specification >>> (!) should be in the public domain and nowhere else. >>> >>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>> it is a specification not an implementation. There is no or only >>> trivial code attached to it. So while nothing can be gained by >>> putting it under the LGPL, a lot can be lost - for example the >>> contribution of companies that do not like to open source their >>> implementations. >>> >>> Furthermore you are plain wrong assuming you will be the copyright >>> holder to additions made by other people. >>> >>> Best regards, > >> Joachim >>> >>> >>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>> >>>???? >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>?????? >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for >>>>> inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that >>>>> should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>>>???????? >>>> Does this sound like a reasonable plan to everyone? >>>> >>>> Thanks! >>>> - Doug >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>?????? >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>???? >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 08:20:29 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 11:20:29 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D0AD91.4080103@gmail.com> Message-ID: <44D0B4AD.2050106@gmail.com> Doug; > How does this impact the reference implementation (i.e. RXTX)? > Fuck I have not thinked about that, we would need that everyone who had colaborated with RXTX and have putted code on it to agree a license chaging. Or start from sractch. I don't know if Trent have the right to do that. Regards, Manuel > > >> Hi, >> I have been searching the web and here it is: >> http://jcp.org/en/resources/license_reference >> Here there is a list of the licenses that are compatible with the JCP >> for JSR submitting. >> I think that Apache, CDDL, CPL and OSL are the one that are compatible >> with our needs. >> But I think that Apache is the best for us, Doug why do not make a votation? >> Regards, >> Manuel >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> >> >> Joachim >> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 08:21:15 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 16:21:15 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Putting something in the public domain means, that it can be used by anyone for whatever (s)he thinks is appropriate. The authors define no restriction regarding it's use. That's how any specification should be. Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From berkland at spamcop.net Wed Aug 2 08:50:50 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 10:50:50 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> You may want to consider making it available under two separate licenses. 1 - LGPL as it is today The LGPL can be used by anyone wanting to extend the current functionality, as long as they provide code for anything they change. 2 - Sun Community Source License (SCSL) http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf The SCSL will allow anyone who wants to do a closed source implementation from the ground up to do so, if I'm reading it correctly, as long as they don't use any of the code from the Reference Implementation. This will satisfy any company that wants to have a closed-source implementation, but not help them out very much. On 8/2/06, Joachim Buechse wrote: > Putting something in the public domain means, that it can be used by > anyone for whatever (s)he thinks is appropriate. The authors define > no restriction regarding it's use. That's how any specification > should be. > > Best regards, > Joachim > > > On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > > > Hi All, > > I don't know anything about licensing issues. > > The below sounds reasonable. If we make this public domain, > > will that be compatible with Sun's JSR? > > Thanks! > > - DL > > P.S. I really don't care what we do, as long as there is > > some sort of collective agreement. > >> Good day, > >> > >> quite frankly I think that this is a very bad idea. This > >> specification > >> (!) should be in the public domain and nowhere else. > >> > >> Defining a spec under the (L)GPL makes absolutely no sense. After all > >> it is a specification not an implementation. There is no or only > >> trivial code attached to it. So while nothing can be gained by > >> putting it under the LGPL, a lot can be lost - for example the > >> contribution of companies that do not like to open source their > >> implementations. > >> > >> Furthermore you are plain wrong assuming you will be the copyright > >> holder to additions made by other people. > >> > >> Best regards, > >> Joachim > >> > >> > >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> > >>> Hi All, > >>> Trent and I have been discussing the license issues of the > >>> JSR spec and code that we develop, as a community. > >>> Here is what we have come up with: > >>> > >>>> During the development, the new JSR spec that we derive > >>>> will be > >>>> covered under the LGPL license. Since it is > >>>> just interfaces, any contributions will come back to me, for > >>>> inclusion > >>>> into the specification. The goal is to provide a detailed set of > >>>> interfaces that > >>>> document the present state of our reference model. I am using > >>>> the RXTX as the reference model. If there is something missing > >>>> from > >>>> the reference model, or if the reference model has something that > >>>> should > >>>> not be there, we will need to discuss it. > >>>> > >>>> After Sun accepts the JSR, I, as the copyright holder, can issue > >>>> a version with a JSR compatible license. > >>>> > >>>> The goal is to migrate the interfaces into javax.comm. > >>> > >>> Does this sound like a reasonable plan to everyone? > >>> > >>> Thanks! > >>> - Doug > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From naranjo.manuel at gmail.com Wed Aug 2 09:03:02 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 12:03:02 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> References: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> Message-ID: <44D0BEA6.2040408@gmail.com> Or even better, you can use Apache v2, which allows both Open Source and Closed Source forms ;-) > You may want to consider making it available under two separate licenses. > > 1 - LGPL as it is today > > The LGPL can be used by anyone wanting to extend the current > functionality, as long as they provide code for anything they change. > > 2 - Sun Community Source License (SCSL) > http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf > > The SCSL will allow anyone who wants to do a closed source > implementation from the ground up to do so, if I'm reading it > correctly, as long as they don't use any of the code from the > Reference Implementation. This will satisfy any company that wants to > have a closed-source implementation, but not help them out very much. > > On 8/2/06, Joachim Buechse wrote: > >> Putting something in the public domain means, that it can be used by >> anyone for whatever (s)he thinks is appropriate. The authors define >> no restriction regarding it's use. That's how any specification >> should be. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This >>>> specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> Joachim >>>> >>>> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing >>>>>> from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 09:46:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 17:46:25 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> I assume that javax.comm/RXTX is to be redefined using Interfaces. In this case we should separate 2 things: 1) The specification and it's incarnation in the form of java classes defining the interfaces. 2) The actual implementation of the functionality. It is possible that 1) may contain some trivial code in abstract or none abstract classes (ie PortFactory, PortRegistry, etc). Doug's original question was regarding 1) - unless I misunderstood. I personally think that 1) should be in the public domain. It should not be covered by any restrictions what-so-ever. Let it be free as in "totally free in any respect". I do not care under which license 2) is released. Why? Because it is in my very interest that all/almost all vendors include implementations with their distributions. Which will only happen if they do not need to respect open source licenses. (javax.comm is not nearly as important as the Apache web server or MySql, so nobody will take licensing risks). Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ssbello at gmail.com Wed Aug 2 10:28:30 2006 From: ssbello at gmail.com (Simone) Date: Wed, 2 Aug 2006 18:28:30 +0200 Subject: [Rxtx] pocketPC 2003 Message-ID: <39ed505d0608020928k6ceb01aen470c2e6a78c5a6b0@mail.gmail.com> Does anyone know if the Rxtx works on PocketPc 2003? If yes, could you, please, give me some suggestion. Thanks, Simone Bell? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/72e0fb87/attachment.html From berkland at spamcop.net Wed Aug 2 13:00:10 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 15:00:10 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> Message-ID: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> How about these for the "Business Terms" of the new JSR: > The specification will be released in accordance with standard terms > as specified by the JCP process. > > The reference implementation (RI) will be delivered in binary form > free of charge from http://rxtx.org. Licensing details are expected to > be under the Binary Code License (BCL). > > The source for the reference implementation is expected to be > delivered via the Limited GNU Public License (LGPL) and available free > of charge. > > The TCK will be made available free of charge to all J2SE and J2EE licensees. > > The TCK will be offered for license at no charge, without support or > any trademark license rights, to qualified not-for-profit entities > (including not-for-profit) academic institutions) and qualified > individuals engaged in efforts to create compatible implementations of > the Specification. From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 13:13:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 13:13:33 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E495@hqexchange3.dot.state.co.us> Trent, I didn't exactly get it. Again I am not a C guy, maybe its very simple for you but I don't see any checks for FD (as written in the patch for termios.c) in the initialise_event_info_struct, I see some checks in the interruptEventLoop call. Second as you explained I open three("/dev/cuf01","/dev/cuf01","/dev/cuf01") ports, I close the 2nd ("/dev/cuf02", the other 2 are still open) , I never try to open the third ("/dev/cuf03") port again if it is already open. Are you planning to have a fix for this in the next release 2.1.8. Its very important for me to have a fix for this, its causing some major headaches for our project. I know you have your regular job too, I will appreciate any help. Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, August 01, 2006 6:46 PM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java > VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic > frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) C [librxtxSerial.so+0x69b2] > initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] > Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" > [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: > /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread > "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 > JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon > [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" > daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread > "AdapterThread" daemon [_thread_blocked, id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, > id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Wed Aug 2 13:14:20 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 16:14:20 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> Message-ID: <44D0F98C.1070600@gmail.com> +1 Agree > How about these for the "Business Terms" of the new JSR: > > >> The specification will be released in accordance with standard terms >> as specified by the JCP process. >> >> The reference implementation (RI) will be delivered in binary form >> free of charge from http://rxtx.org. Licensing details are expected to >> be under the Binary Code License (BCL). >> >> The source for the reference implementation is expected to be >> delivered via the Limited GNU Public License (LGPL) and available free >> of charge. >> >> The TCK will be made available free of charge to all J2SE and J2EE licensees. >> >> The TCK will be offered for license at no charge, without support or >> any trademark license rights, to qualified not-for-profit entities >> (including not-for-profit) academic institutions) and qualified >> individuals engaged in efforts to create compatible implementations of >> the Specification. >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From savagobr at yahoo.com Wed Aug 2 13:40:42 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:40:42 -0700 (PDT) Subject: [Rxtx] jsr spec and license issues Message-ID: <20060802194042.83599.qmail@web53807.mail.yahoo.com> Friends Apache seems ok... if I get it right, does it *almost* equals to BSD? Regarding public domain: I think that the good people that spent so much time on this library will like to keep some rights over its own work, don't you think? Best regards Savago --------------------------------- Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/79abdfd5/attachment.html From savagobr at yahoo.com Wed Aug 2 13:58:04 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:58:04 -0700 (PDT) Subject: [Rxtx] JVM Crashing Message-ID: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago --------------------------------- Groups are talking. We´re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/47d561ae/attachment.html From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 14:09:18 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 14:09:18 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E4AD@hqexchange3.dot.state.co.us> Thank You :) ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adenilson Cavalcanti Sent: Wednesday, August 02, 2006 1:58 PM To: rxtx at qbang.org Subject: Re: [Rxtx] JVM Crashing Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago ________________________________ Groups are talking. We?re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/b4eb22cf/attachment.html From tjarvi at qbang.org Wed Aug 2 20:23:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 20:23:42 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > Hi Doug As mentioned off the list, the important point in my mind is that everyone is on the same base more than what license is decided upon. These things are just best addressed early so there isn't confusion. The Apache license is fairly standard in the Open Source community vs several of the relatively unknown [and obviously redundat even by their descriptions] offerings by Sun. Perhaps one option here that would kill a few birds with one stone is to dual license the interface as Apache and LGPL. This would allow everyone to use the interfaces without needing to do wastefull work for internal license requirements. Projects could choose between the two the license that best suits their needs. If there is a software shop doing Java that isn't familiar with the Apache license, they must be doing some strange Java. I do think it is foolhearty to blindly travel in public domain but nobody is trying to undermine the spec files. The intent is to use the work for a JSR submission that everyone can use without confusion later on down the line. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 21:01:16 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 20:01:16 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D166FC.9090005@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> Does this sound like a reasonable plan to everyone? >> > > Hi Doug > > As mentioned off the list, the important point in my mind is that everyone > is on the same base more than what license is decided upon. These things > are just best addressed early so there isn't confusion. > > The Apache license is fairly standard in the Open Source community vs > several of the relatively unknown [and obviously redundat even by > their descriptions] offerings by Sun. The JCP is a reasonable process for what the RxTx project intends to achieve by evolving the API. There isn't much to lose by going the JSR route. The community will benefit from a fair API like so many other that have undergone the process. Sun isn't going to own the API or manipulate it into anything weird anymore than anyone else is. I think your fears are rather vague and unfounded. Which isn't to say that I am a well-informed representative of the JCP, I've only sat through one JSR process and we ended up with javax.usb, and IBM got what it wanted out of the deal and the community got a very nice standard. Paul > > Perhaps one option here that would kill a few birds with one stone is to > dual license the interface as Apache and LGPL. This would allow everyone > to use the interfaces without needing to do wastefull work for internal > license requirements. Projects could choose between the two the license > that best suits their needs. If there is a software shop doing Java that > isn't familiar with the Apache license, they must be doing some strange > Java. > > I do think it is foolhearty to blindly travel in public domain but nobody > is trying to undermine the spec files. The intent is to use the work for > a JSR submission that everyone can use without confusion later on down the > line. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Aug 2 22:10:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 22:10:48 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D166FC.9090005@sun.com> References: <44D166FC.9090005@sun.com> Message-ID: On Wed, 2 Aug 2006, Paul Klissner wrote: > Trent Jarvi wrote: >> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> Does this sound like a reasonable plan to everyone? >>> >> >> Hi Doug >> >> As mentioned off the list, the important point in my mind is that everyone >> is on the same base more than what license is decided upon. These things >> are just best addressed early so there isn't confusion. >> >> The Apache license is fairly standard in the Open Source community vs >> several of the relatively unknown [and obviously redundat even by >> their descriptions] offerings by Sun. > > The JCP is a reasonable process for what the RxTx project intends > to achieve by evolving the API. > > There isn't much to lose by going the JSR route. The community will > benefit from a fair API like so many other that have undergone > the process. Sun isn't going to own the API or manipulate it > into anything weird anymore than anyone else is. I think your > fears are rather vague and unfounded. > > Which isn't to say that I am a well-informed representative > of the JCP, I've only sat through one JSR process and we ended > up with javax.usb, and IBM got what it wanted out of the deal > and the community got a very nice standard. > Hi Paul The JCP should work fine. As our intentions are in line, licensing so that everyone can use the interface code should not be a problem. Note that the current default right now is that the interfaces are copyrighted and no license for distribution is included. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 22:33:51 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 21:33:51 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D166FC.9090005@sun.com> Message-ID: <44D17CAF.1090802@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Paul Klissner wrote: > >> Trent Jarvi wrote: >>> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>> Does this sound like a reasonable plan to everyone? >>>> >>> Hi Doug >>> >>> As mentioned off the list, the important point in my mind is that everyone >>> is on the same base more than what license is decided upon. These things >>> are just best addressed early so there isn't confusion. >>> >>> The Apache license is fairly standard in the Open Source community vs >>> several of the relatively unknown [and obviously redundat even by >>> their descriptions] offerings by Sun. >> The JCP is a reasonable process for what the RxTx project intends >> to achieve by evolving the API. >> >> There isn't much to lose by going the JSR route. The community will >> benefit from a fair API like so many other that have undergone >> the process. Sun isn't going to own the API or manipulate it >> into anything weird anymore than anyone else is. I think your >> fears are rather vague and unfounded. >> >> Which isn't to say that I am a well-informed representative >> of the JCP, I've only sat through one JSR process and we ended >> up with javax.usb, and IBM got what it wanted out of the deal >> and the community got a very nice standard. >> > > Hi Paul > > The JCP should work fine. As our intentions are in line, licensing so > that everyone can use the interface code should not be a problem. Sorry, looks like my concerns were unfounded. I haven't been following the threads closely this week, as work got busy with an escalated issue and new project. Sorry about that. > > Note that the current default right now is that the interfaces are > copyrighted and no license for distribution is included. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Aug 3 03:45:56 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 03 Aug 2006 05:45:56 -0400 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: Hi All, I have been waiting a day for things to cool down. Licensing appears to be a hot-button topic. I have no objection to dual license the interfaces as both Apache and LGPL. Some thoughts: Goal: developers wish to work together on a common piece of code that the team needs. It makes sense that the code base they work on should be Apache-licensed. That makes it possible for the team to use and develop common code, even if the end result is LGPL'd as a whole. If we combine licenses, we must follow the terms of both licenses when distributing the combined work. Thus, the dual license contains the super set of terms in the licenses of Apached and LGPL. This should address concern about using Apache-licensed code within LGPL projects due to the FSF's claim that they are incompatible. Here is a draft statement for RXSL: The RXTX Specification Library (RXSL) uses a dual license strategy for the source code. These licenses are the GNU Lesser General Public License (LGPL) and the Apache License. I strongly encourage users to use the LGPL license and participate fully in the free software community. Dual licensing of the RXSL source code provides open and free access to the technology both for the GPL community and for other developers or companies that cannot use the GPL. Dual license is common practice in open source projects like OpenOffice, Perl and Mozilla. Through the combined use of LGPL and Apache license, developers will have a high degree of freedom yet compatibility and interoperability will be preserved. You can freely modify, extend, and improve the RXSL source code. The only question is whether or not you must provide the source code and contribute modifications to the community. The GNU and Apache licenses allow different ranges of flexibility in this regard, but in the end, regardless of the license used, any and all incompatible changes must be published openly. Note that there is the RXTX Reference Model that uses the org.rxtx package, which itself is protected by the LGPL. This may be part of the distribution, however, it can not be redistributed using a different license. Is everybody OK with this? Thanks Trent, great idea! - Doug From joachim at buechse.de Thu Aug 3 04:15:44 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 3 Aug 2006 12:15:44 +0200 Subject: [Rxtx] JVM Crashing In-Reply-To: <20060802195804.70935.qmail@web53812.mail.yahoo.com> References: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Message-ID: <6ABA2AB2-CECE-4C4B-A7D6-0CDF8B9C95A8@buechse.de> I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of > rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jvermillard at archean.fr Thu Aug 3 04:26:48 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Thu, 03 Aug 2006 12:26:48 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <1154600808.16732.18.camel@localhost.localdomain> Hi, I'm a developer of the Apache MINA framework. It's a network application framework which helps users develop high performance and high scalability network applications easily. http://directory.apache.org/subprojects/mina/index.html . I would like to integrate serial connection to the framework (actualy supporting TCP, UDP (broadcast) and in VM communications), but LGPL is an issue for me. An Apache License would be pretty usefull for me and integrate rxtx functionnalities easly. Thanks, Julien Le jeudi 03 ao?t 2006 ? 05:45 -0400, Dr. Douglas Lyon a ?crit : > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/755cca7f/smime.bin From pascal at quies.net Thu Aug 3 04:32:35 2006 From: pascal at quies.net (Pascal S. de Kloe) Date: Thu, 3 Aug 2006 12:32:35 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <200608031232.35838.pascal@quies.net> Hi Doug, The Apache license is unnessesary complex. It puts all kinds of limitations on the usage. Is there a particular reason why people chose this or was it just the familiar name? I agree with Joachim (again) that the specification and the interfaces should be public domain. However, if we realy need a license then have a look at the X11 license because that one is compatible with the GPL and suits our needs: http://www.fsf.org/licensing/licenses/index_html http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3 ---- start: implementation Copyright (C) 2006 Sun Microsystems, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Sun Microsystems shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Sun Microsystems. Java is a trademark of Sun Microsystems, Inc. ---- end Op donderdag 3 augustus 2006 11:45, schreef Dr. Douglas Lyon: > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Aug 3 05:17:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 05:17:07 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154600808.16732.18.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: On Thu, 3 Aug 2006, Julien Vermillard wrote: > Hi, > > I'm a developer of the Apache MINA framework. It's a network application > framework which helps users develop high performance and high > scalability network applications easily. > http://directory.apache.org/subprojects/mina/index.html . I would like > to integrate serial connection to the framework (actualy supporting TCP, > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > An Apache License would be pretty usefull for me and integrate rxtx > functionnalities easly. > > Thanks, > > Julien > Hi Julien The rxtx license itself will not change. This is just the interface. You would be free to implement an rxtx replacement if the LGPL low level code is a problem for you. These licensing details would make it possible to take the interface code instead of needing to recode them for a new project. You are probably confusing the license problems with the GPL not the LGPL though you can share links to concerns off the list if you would like to go through them. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 11:59:48 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 11:59:48 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E516@hqexchange3.dot.state.co.us> Joachim, I think my both problems (JVM crashing & Port Locking) are being caused by the corruption of "Event Info Struct / EIS" I have noticed with in EIS my "FD" and "Closing" value being overwritten. The problem is definitely in SerialImp.c file. I am trying to understand what the code does and try to pin point the problem by trying few other options. I will keep everybody posted. Regards Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Joachim Buechse Sent: Thursday, August 03, 2006 4:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Thu Aug 3 13:50:07 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 14:50:07 -0500 Subject: [Rxtx] slow startup Message-ID: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete From brian at mbari.org Thu Aug 3 14:05:57 2006 From: brian at mbari.org (Brian Schlining) Date: Thu, 3 Aug 2006 13:05:57 -0700 Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> References: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Message-ID: Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B > Greetings, > I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/ > qbang.org). > > In testing things out, I ran the list ports example from the Wiki, > and it seems to take quite a while for the library to initialize? > Like on the order of 30+ seconds or so after startup (and the RXTX > banner prints), and before the application starts running. > > Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then > I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ > terminal server) and I'm wondering if they are not responding properly > and this is causing the slow startup? Or is this a known problem of > some kind, or maybe something on my system is screwy? > > Thanks, > Pete > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/6123f730/attachment.html From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 14:13:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 14:13:47 -0600 Subject: [Rxtx] slow startup Message-ID: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Hi Pete, RXTX does open and close the ports in Windows. Try downloading utility like PORTMON(only for windows) and you can see that whenever you load RXTX it tries to register all the available COMM ports in the system. It is a little slow if you have virtual ports, we use digi as a terminal server, Its going to get worst of you have comm ports in 100's Thanks Pawan Kharbanda ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Brian Schlining Sent: Thursday, August 03, 2006 2:06 PM To: RXTX Developers and Users Subject: Re: [Rxtx] slow startup Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/94fd105d/attachment.html From pete.flugstad at gmail.com Thu Aug 3 14:32:04 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 15:32:04 -0500 Subject: [Rxtx] slow startup In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Message-ID: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> On 8/3/06, Kharbanda, Pawan wrote: > RXTX does open and close the ports in Windows. Try downloading utility > like PORTMON(only for windows) and you can see that whenever you load RXTX > it tries to register all the available COMM ports in the system. It is a > little slow if you have virtual ports, we use digi as a terminal server, Its > going to get worst of you have comm ports in 100's Okay, I can understand that, but from the PORTMON output, it looks like it's opening each port TWICE: 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS ... 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS Also, assuming instead of listing the ports I wanted to just open one, I'm still seeing the 30 second delay, so it's scanning at startup regardless of what the Java code is going to do. Probably necessary, but annoying. I know, I know, contribute patches... :-) Thanks, Pete From tjarvi at qbang.org Thu Aug 3 15:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 15:04:42 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: On Thu, 3 Aug 2006, Pete Flugstad wrote: > On 8/3/06, Kharbanda, Pawan wrote: >> RXTX does open and close the ports in Windows. Try downloading utility >> like PORTMON(only for windows) and you can see that whenever you load RXTX >> it tries to register all the available COMM ports in the system. It is a >> little slow if you have virtual ports, we use digi as a terminal server, Its >> going to get worst of you have comm ports in 100's > > Okay, I can understand that, but from the PORTMON output, it looks > like it's opening each port TWICE: > > 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > ... > 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > > Also, assuming instead of listing the ports I wanted to just open one, > I'm still seeing the 30 second delay, so it's scanning at startup > regardless of what the Java code is going to do. Probably necessary, > but annoying. > > I know, I know, contribute patches... :-) > I think this problem is in RXTXCommDriver.java. I've just not tracked it down but it should be in the java code, not the native code so easy enough to track down. -- Trent Jarvi tjarvi at qbang.org From jvermillard at archean.fr Fri Aug 4 03:43:28 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:43:28 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: <1154684608.6181.4.camel@localhost.localdomain> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > Hi, > > > > I'm a developer of the Apache MINA framework. It's a network application > > framework which helps users develop high performance and high > > scalability network applications easily. > > http://directory.apache.org/subprojects/mina/index.html . I would like > > to integrate serial connection to the framework (actualy supporting TCP, > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > An Apache License would be pretty usefull for me and integrate rxtx > > functionnalities easly. > > > > Thanks, > > > > Julien > > > > Hi Julien > > The rxtx license itself will not change. This is just the interface. > You would be free to implement an rxtx replacement if the LGPL low level > code is a problem for you. These licensing details would make it possible > to take the interface code instead of needing to recode them for a new > project. > > You are probably confusing the license problems with the GPL not the LGPL > though you can share links to concerns off the list if you would like to > go through them. > > -- > Trent Jarvi > tjarvi at qbang.org Hi, I'm not a license expert but some guys at ASF said me you can't call LGPLed libs from java. some peoples interprete that as static linking and not dynamic linking (no idea why). So ASF/BSD licensied interface willl solve the license probleme. If you got some questions about the ASL and the way you can dual license LGPL/ASL you can ask it on legal-discuss at apache.org Julien -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/8d46c0aa/smime.bin From jvermillard at archean.fr Fri Aug 4 03:51:30 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:51:30 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <1154685091.6181.6.camel@localhost.localdomain> erm from java -> from ASLed Java code Le vendredi 04 ao?t 2006 ? 11:43 +0200, Julien Vermillard a ?crit : > Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > Hi, > > I'm not a license expert but some guys at ASF said me you can't call > LGPLed libs from java. some peoples interprete that as static linking > and not dynamic linking (no idea why). So ASF/BSD licensied interface > willl solve the license probleme. > > If you got some questions about the ASL and the way you can dual license > LGPL/ASL you can ask it on legal-discuss at apache.org > > Julien > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dcc29d70/smime.bin From guille at sms.nl Fri Aug 4 04:35:24 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Fri, 04 Aug 2006 12:35:24 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <7.0.1.0.0.20060804123322.036dc748@sms.nl> At 11:43 04/08/2006, Julien Vermillard wrote: >Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > >Hi, > >I'm not a license expert but some guys at ASF said me you can't call >LGPLed libs from java. some peoples interprete that as static linking >and not dynamic linking (no idea why). This interpretation is wrong. See the official position of the FSF regarding the LGPL and Java: http://www.gnu.org/licenses/lgpl-java.html http://www.fsf.org/licensing/licenses/lgpl-java.html Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From hambyiii at hotmail.com Fri Aug 4 04:52:47 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 10:52:47 +0000 Subject: [Rxtx] error getting InputStream Message-ID: Hi, I have written a program in Java for Windows xp using RXTX (which is why I am using this mailing list :). However, I am getting a problem. I am connecting to a serial port, like so: private CommPortIdentifier portID; private boolean openPort(String selectedPort) { boolean portFound = false; Enumeration portList; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portID.getName().equals(selectedPort)) { portFound = true; break; } } } return portFound; } and then I try and get the serial port input stream (leaving out the try and catch for the sake of space): SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); InputStream inputStream = serialPort.getInputStream(); but on the getInputStream() I get the following error message: Bad file descriptor in nativeavailable I cannot figure out where it is going wrong...anyone any ideas. A quick answer would be wonderful, as I am kinda under the hammer to get this fixed quickly Thanks in Advance Keith From tjarvi at qbang.org Fri Aug 4 05:13:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 05:13:19 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <7.0.1.0.0.20060804123322.036dc748@sms.nl> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> <7.0.1.0.0.20060804123322.036dc748@sms.nl> Message-ID: On Fri, 4 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 11:43 04/08/2006, Julien Vermillard wrote: >> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : >>> On Thu, 3 Aug 2006, Julien Vermillard wrote: >>> >>>> Hi, >>>> >>>> I'm a developer of the Apache MINA framework. It's a network application >>>> framework which helps users develop high performance and high >>>> scalability network applications easily. >>>> http://directory.apache.org/subprojects/mina/index.html . I would like >>>> to integrate serial connection to the framework (actualy supporting TCP, >>>> UDP (broadcast) and in VM communications), but LGPL is an issue for me. >>>> >>>> An Apache License would be pretty usefull for me and integrate rxtx >>>> functionnalities easly. >>>> >>>> Thanks, >>>> >>>> Julien >>>> >>> >>> Hi Julien >>> >>> The rxtx license itself will not change. This is just the interface. >>> You would be free to implement an rxtx replacement if the LGPL low level >>> code is a problem for you. These licensing details would make it possible >>> to take the interface code instead of needing to recode them for a new >>> project. >>> >>> You are probably confusing the license problems with the GPL not the LGPL >>> though you can share links to concerns off the list if you would like to >>> go through them. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >> >> Hi, >> >> I'm not a license expert but some guys at ASF said me you can't call >> LGPLed libs from java. some peoples interprete that as static linking >> and not dynamic linking (no idea why). > > This interpretation is wrong. See the official position of the FSF regarding > the LGPL and Java: > > http://www.gnu.org/licenses/lgpl-java.html > > http://www.fsf.org/licensing/licenses/lgpl-java.html > What I do with legal groups that go down that rat hole is give them a copy of the rxtx 2.0 license. Since the confused legal folks are going in a direction that does not represent the intent of the license or authors at that point and are confused about basic things in our industry that most consider facts, the discussions are very short. The rxtx 2.0 license just adds the following and has for 6 years or so. Not because the lawyers are right. They get confused about intent and even facts. The following is added to make confused lawyers that cant understand intent go far away and never come back. period. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. From hambyiii at hotmail.com Fri Aug 4 05:42:21 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 11:42:21 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Okay, I made a little mistake in my last message. The error is not occuring where I thought it was. Instead it is occuring when I do the following: byte[] readBuffer = new byte[128]; try { int numBytes = 0; try { Thread.sleep(500); } catch (InterruptedException e) {} while (inputStream.available() > 0) { numBytes = inputStream.read(readBuffer); } processReceivedData(readBuffer, numBytes); } catch (IOException e) { System.out.println(e.getMessage()); } So I guess the error is happening on the inputStream.read(readBuffer) again, any help is appreciated and again, thanks in advance Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 10:52:47 +0000 > >Hi, > >I have written a program in Java for Windows xp using RXTX (which is why I >am using this mailing list :). However, I am getting a problem. I am >connecting to a serial port, like so: > private CommPortIdentifier portID; > > private boolean openPort(String selectedPort) > { > boolean portFound = false; > Enumeration portList; > > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portID.getName().equals(selectedPort)) > { > portFound = true; > break; > } > } > } > > return portFound; > } > >and then I try and get the serial port input stream (leaving out the try >and >catch for the sake of space): > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >InputStream inputStream = serialPort.getInputStream(); > >but on the getInputStream() I get the following error message: > >Bad file descriptor in nativeavailable > >I cannot figure out where it is going wrong...anyone any ideas. A quick >answer would be wonderful, as I am kinda under the hammer to get this fixed >quickly > >Thanks in Advance >Keith > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From hambyiii at hotmail.com Fri Aug 4 07:08:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:08:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Hi, I know I am replying to myself a lot at the moment, but more information has come to light (These errors are actually happening on a client machine, on software that has worked for the past month, and only now has started to fail, which is why I am a little slow finding things out) The errors I have already written about are only symptoms of an orignal error. The original error occurs the first time I try to WRITE thte OutputStream: OutputStream oStream = serialPort.getOutputStream(); serialPort.notifyOnOutputEmpty(true); byte[] bs = encodeMessage(configString.toString()); oStream.write(bs); oStream.flush(); The error occurs on oStream.write(bs); and is: Input/output error in writeArray Now writeArray is native code, so I have no idea what is going on there. Any help would be appreciated Thanks Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 11:42:21 +0000 > >Okay, I made a little mistake in my last message. > >The error is not occuring where I thought it was. Instead it is occuring >when I do the following: > >byte[] readBuffer = new byte[128]; > >try { > > int numBytes = 0; > try { > Thread.sleep(500); > } > catch (InterruptedException e) > {} > > while (inputStream.available() > 0) > { > numBytes = inputStream.read(readBuffer); > } > > processReceivedData(readBuffer, numBytes); >} >catch (IOException e) >{ > System.out.println(e.getMessage()); >} > >So I guess the error is happening on the inputStream.read(readBuffer) > >again, any help is appreciated and again, thanks in advance >Keith > > >From: "Keith Thorne" > >Reply-To: RXTX Developers and Users > >To: rxtx at qbang.org > >Subject: [Rxtx] error getting InputStream > >Date: Fri, 04 Aug 2006 10:52:47 +0000 > > > >Hi, > > > >I have written a program in Java for Windows xp using RXTX (which is why >I > >am using this mailing list :). However, I am getting a problem. I am > >connecting to a serial port, like so: > > private CommPortIdentifier portID; > > > > private boolean openPort(String selectedPort) > > { > > boolean portFound = false; > > Enumeration portList; > > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > > while (portList.hasMoreElements()) > > { > > portID = (CommPortIdentifier) portList.nextElement(); > > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > > { > > if (portID.getName().equals(selectedPort)) > > { > > portFound = true; > > break; > > } > > } > > } > > > > return portFound; > > } > > > >and then I try and get the serial port input stream (leaving out the try > >and > >catch for the sake of space): > > > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); > >InputStream inputStream = serialPort.getInputStream(); > > > >but on the getInputStream() I get the following error message: > > > >Bad file descriptor in nativeavailable > > > >I cannot figure out where it is going wrong...anyone any ideas. A quick > >answer would be wonderful, as I am kinda under the hammer to get this >fixed > >quickly > > > >Thanks in Advance > >Keith > > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Aug 4 07:26:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: Hi Keith Can you tell us more about the physical serial port? Might it be 'vanishing?' On Fri, 4 Aug 2006, Keith Thorne wrote: > Hi, > > I know I am replying to myself a lot at the moment, but more information has > come to light (These errors are actually happening on a client machine, on > software that has worked for the past month, and only now has started to > fail, which is why I am a little slow finding things out) > > The errors I have already written about are only symptoms of an orignal > error. The original error occurs the first time I try to WRITE thte > OutputStream: > > OutputStream oStream = serialPort.getOutputStream(); > serialPort.notifyOnOutputEmpty(true); > > byte[] bs = encodeMessage(configString.toString()); > > oStream.write(bs); > oStream.flush(); > > The error occurs on oStream.write(bs); and is: > > Input/output error in writeArray > > Now writeArray is native code, so I have no idea what is going on there. Any > help would be appreciated > Thanks > Keith > > >> From: "Keith Thorne" >> Reply-To: RXTX Developers and Users >> To: rxtx at qbang.org >> Subject: Re: [Rxtx] error getting InputStream >> Date: Fri, 04 Aug 2006 11:42:21 +0000 >> >> Okay, I made a little mistake in my last message. >> >> The error is not occuring where I thought it was. Instead it is occuring >> when I do the following: >> >> byte[] readBuffer = new byte[128]; >> >> try { >> >> int numBytes = 0; >> try { >> Thread.sleep(500); >> } >> catch (InterruptedException e) >> {} >> >> while (inputStream.available() > 0) >> { >> numBytes = inputStream.read(readBuffer); >> } >> >> processReceivedData(readBuffer, numBytes); >> } >> catch (IOException e) >> { >> System.out.println(e.getMessage()); >> } >> >> So I guess the error is happening on the inputStream.read(readBuffer) >> >> again, any help is appreciated and again, thanks in advance >> Keith >> >>> From: "Keith Thorne" >>> Reply-To: RXTX Developers and Users >>> To: rxtx at qbang.org >>> Subject: [Rxtx] error getting InputStream >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 >>> >>> Hi, >>> >>> I have written a program in Java for Windows xp using RXTX (which is why >> I >>> am using this mailing list :). However, I am getting a problem. I am >>> connecting to a serial port, like so: >>> private CommPortIdentifier portID; >>> >>> private boolean openPort(String selectedPort) >>> { >>> boolean portFound = false; >>> Enumeration portList; >>> >>> portList = CommPortIdentifier.getPortIdentifiers(); >>> >>> while (portList.hasMoreElements()) >>> { >>> portID = (CommPortIdentifier) portList.nextElement(); >>> if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) >>> { >>> if (portID.getName().equals(selectedPort)) >>> { >>> portFound = true; >>> break; >>> } >>> } >>> } >>> >>> return portFound; >>> } >>> >>> and then I try and get the serial port input stream (leaving out the try >>> and >>> catch for the sake of space): >>> >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >>> InputStream inputStream = serialPort.getInputStream(); >>> >>> but on the getInputStream() I get the following error message: >>> >>> Bad file descriptor in nativeavailable >>> >>> I cannot figure out where it is going wrong...anyone any ideas. A quick >>> answer would be wonderful, as I am kinda under the hammer to get this >> fixed >>> quickly >>> >>> Thanks in Advance >>> Keith >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From hambyiii at hotmail.com Fri Aug 4 07:52:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:52:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more information >has > > come to light (These errors are actually happening on a client machine, >on > > software that has worked for the past month, and only now has started to > > fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an orignal > > error. The original error occurs the first time I try to WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); > >> } > >> catch (IOException e) > >> { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance > >> Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I am > >>> connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Fri Aug 4 08:21:07 2006 From: gergg at cox.net (Gregg Wonderly) Date: Fri, 04 Aug 2006 09:21:07 -0500 Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: <44D357D3.40303@cox.net> Keith Thorne wrote: > Okay, I made a little mistake in my last message. > > The error is not occuring where I thought it was. Instead it is occuring > when I do the following: > > byte[] readBuffer = new byte[128]; > > try { > > } > catch (IOException e) > { > System.out.println(e.getMessage()); > } > > So I guess the error is happening on the inputStream.read(readBuffer) This is one of the most frustrating things to see over and over. The exception tells you exactly which line the error is occuring on, if you will use it to see where. In Java, these days, every class should do the following. import java.util.logging.*; public class MyClass { Logger log = Logger.getLogger( getClass().getName() ); ...in some method... { String data = ...; // any extra data like addresses or // ports which might be wrong and // cause an exception. try { ... } catch( SomeException ex ) { log.log( Level.SEVERE, ex.toString()+": "+data, ex ); } } } By default, you will see all of the appropriate details of any exception logged at the WARNING or SEVERE level. You can read the javadocs about logging to get more information too. Once you do this, people can then turn up logging and get more information, or otherwise manage it with a logging configuration file or other tools such as JMX or my http://logman.dev.java.net project. Gregg Wonderly From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 09:15:24 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 09:15:24 -0600 Subject: [Rxtx] error getting InputStream Message-ID: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Keith, Please send the full stack trace of the exception, may be I can help you. On Trent's question regarding physical 'Serial Port', do you mean you have a USB(Connected to Client Machine) to 9 Pin Serial cable(Connected to H/W device)? Also please mention which java version you are using? Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Keith Thorne Sent: Friday, August 04, 2006 7:52 AM To: rxtx at qbang.org Subject: Re: [Rxtx] error getting InputStream The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more > > information >has > > come to light (These errors are actually happening on a client > > machine, >on > > software that has worked for the past month, and only now has > > started to fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an > > orignal error. The original error occurs the first time I try to > > WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); } catch (IOException > >> e) { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the > >> inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which > >>> is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I > >>> am connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out > >>> the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get > >>> this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 14:36:16 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 14:36:16 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Trent, As discussed over the phone yesterday, I am emailing you all the details of the bugs I have been experiencing. We do not use Serial Ports like most of the applications. Our application uses approx 80 -100 serial ports (attached thru Digi boxes) which are opened and closed every 20 sec to 1 minute depending upon the type of device. Some Serial ports are left opened all the time and receive event based serial calls while other devices uses polling (request and reply) to collect data. So the opening and closing of the Serial Ports is not really in a sequential order as you mentioned in our conversation yesterday. Also 2 same serial ports can never be opened at one time we have business locks to prevent that from happening. Our findings so far (of course with the help of RXTX user group): The real culprit is in the SerialImp.c file, somehow the other the Event Info Structure in the Linked List gets damaged and loses references to the original EIS structure. I believe both the problems are caused because of the corruption of EIS packet. I have noticed that the link list traversal of EIS in the following methods under SerialImp.c : 1)initialise_event_info_struct 2)finalize_event_info_struct 3)interruptEventLoop So culprit code might be in one of these methods. I am currently using JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and Fedora Core 5). I am also attaching a Test Class to replicate the problem. You need to modify the class and add your systems Serial ports into the code and execute. java TestOpenClosePort 100 It will open and close all the serial ports 100 times in there own thread. Please let me know, I will be available thru out this weekend and can help you as much as I can with testing. Regards Pawan Kharbanda CDOT-ITS 303-478-2991 (cell) 303-985-4350 (home) -------------- next part -------------- A non-text attachment was scrubbed... Name: TestOpenClosePort.java Type: application/octet-stream Size: 6139 bytes Desc: TestOpenClosePort.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dd3754d9/TestOpenClosePort.obj From tjarvi at qbang.org Fri Aug 4 15:43:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 15:43:09 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: Thanks, I'll look at it tomorrow morning. I don't know when I'll find the solution but you may check email tomorrow afternoon to see if I think I found it. On Fri, 4 Aug 2006, Kharbanda, Pawan wrote: > Trent, > As discussed over the phone yesterday, I am emailing you all the > details of the bugs I have been experiencing. We do not use Serial Ports > like most of the applications. Our application uses approx 80 -100 > serial ports (attached thru Digi boxes) which are opened and closed > every 20 sec to 1 minute depending upon the type of device. Some Serial > ports are left opened all the time and receive event based serial calls > while other devices uses polling (request and reply) to collect data. So > the opening and closing of the Serial Ports is not really in a > sequential order as you mentioned in our conversation yesterday. Also 2 > same serial ports can never be opened at one time we have business locks > to prevent that from happening. > > Our findings so far (of course with the help of RXTX user group): > > The real culprit is in the SerialImp.c file, somehow the other the Event > Info Structure in the Linked List gets damaged and loses references to > the original EIS structure. I believe both the problems are caused > because of the corruption of EIS packet. I have noticed that the link > list traversal of EIS in the following methods under SerialImp.c : > > 1)initialise_event_info_struct > 2)finalize_event_info_struct > 3)interruptEventLoop > > So culprit code might be in one of these methods. I am currently using > JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and > Fedora Core 5). > > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > > Regards > Pawan Kharbanda > CDOT-ITS > 303-478-2991 (cell) > 303-985-4350 (home) > > > > > > > > > > From tjarvi at qbang.org Sat Aug 5 12:32:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:32:40 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:34:27 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:34:27 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> You need to run it few times. More the number of ports, more frequently you can reproduce. With just 2 ports it will be hard to reproduce frequently. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:33 PM To: Kharbanda, Pawan Cc: tjarvi at qbang.org; RXTX Developers and Users Subject: Re: Port Locking / JVM Crashing > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Aug 5 12:52:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:52:26 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> Message-ID: Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more frequently > you can reproduce. With just 2 ports it will be hard to reproduce > frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:57:49 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:57:49 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Trent, I have 5 ports of Digi and I can reproduce almost every time. Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX version -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:52 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more > frequently you can reproduce. With just 2 ports it will be hard to > reproduce frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need >> to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From tjarvi at qbang.org Sat Aug 5 13:06:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:06:07 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Message-ID: You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few thousand > iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:07:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:07:33 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E659@hqexchange3.dot.state.co.us> We use our own locks but I haven't turned off the RXTX locks. I am still using the RXTX locks that might be the difference. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:13:22 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:13:22 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Trent, How can you turn off the lock files? I can try using that. I never tried that, I thought you can't turn off the file locking. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From tjarvi at qbang.org Sat Aug 5 13:18:53 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:18:53 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Message-ID: Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java > -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except lockfiles > are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:31:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:31:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Trent, I am able to constantly replicate almost everytime even when I have locks disabled. Don't know the reason why you are not able to on your environment. Any suggestions??????? Cycle No (Thread ::: /dev/cuf04) ::::::: 7 Cycle No (Thread ::: /dev/cuf01) ::::::: 7 Cycle No (Thread ::: /dev/cuf02) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) Exiting Thread ::: /dev/cuf03 Cycle No (Thread ::: /dev/cuf03) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent Port /dev/cuf01 is Opened 0x01 Sent Port /dev/cub01 is Opened 0x01 Sent Port /dev/cuf01 is Closed Port /dev/cuf02 is Closed Port /dev/cuf03 is Closed Port /dev/cuf04 is Closed Port /dev/cub01 is Closed Exiting Thread ::: /dev/cuf03 Exiting Thread ::: /dev/cuf02 Cycle No (Thread ::: /dev/cuf03) ::::::: 8 Cycle No (Thread ::: /dev/cuf02) ::::::: 8 Exiting Thread ::: /dev/cuf04 Exiting Thread ::: /dev/cuf01 Cycle No (Thread ::: /dev/cuf01) ::::::: 8 Cycle No (Thread ::: /dev/cuf04) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened 0x01 Sent Port /dev/cuf01 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 # # An error report file with more information is saved as hs_err_pid21386.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:19 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) > 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux > java -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except > lockfiles are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code >>>> and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm >>> running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From tjarvi at qbang.org Sat Aug 5 14:14:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 14:14:49 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: I'd stick a couple $15 dual port serial boards in the machine to see if its kernel driver specific. I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more problematic. They do not get the same number of eyes looking for problems. You could try putting #undef TIOCSERGETLSR #undef TIOCGICOUNT in the very top of SerialImp.h or one or the other to flip bits of code off and on. The kernel here is 2.6.11.4-20a-smp from Suse. glibc is 2.3.4-23.4 from Suse the jre is 1.5.0_06-b05 from Sun. The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC ram. You should be able to reproduce what I'm seeing then go from there. I don't think I'm going to see this problem without having the same cornercase hardware you have. Maybe we can work that out off the list but I doubt I'm going to find it in rxtx at this point. I have seen problems in the past were kernel structs don't match user space struct and bad things happen but I was including a kernel struct to get functionality that had not made its way into user space at the time. The only thing I may be missing is that when I write 0x01 out the port, nothing comes back. That was not specified but you could easily disconnect anything connected to the ports to see if that changes anything. rxtx is far from bug free but I do not see anything yet. On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I am able to constantly replicate almost everytime even when I have > locks disabled. Don't know the reason why you are not able to on your > environment. Any suggestions??????? > > > Cycle No (Thread ::: /dev/cuf04) ::::::: 7 > Cycle No (Thread ::: /dev/cuf01) ::::::: 7 > Cycle No (Thread ::: /dev/cuf02) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > Exiting Thread ::: /dev/cuf03 > Cycle No (Thread ::: /dev/cuf03) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > Port /dev/cuf01 is Opened > 0x01 Sent > Port /dev/cub01 is Opened > 0x01 Sent > Port /dev/cuf01 is Closed > Port /dev/cuf02 is Closed > Port /dev/cuf03 is Closed > Port /dev/cuf04 is Closed > Port /dev/cub01 is Closed > Exiting Thread ::: /dev/cuf03 > Exiting Thread ::: /dev/cuf02 > Cycle No (Thread ::: /dev/cuf03) ::::::: 8 > Cycle No (Thread ::: /dev/cuf02) ::::::: 8 > Exiting Thread ::: /dev/cuf04 > Exiting Thread ::: /dev/cuf01 > Cycle No (Thread ::: /dev/cuf01) ::::::: 8 > Cycle No (Thread ::: /dev/cuf04) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > 0x01 Sent > Port /dev/cuf01 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 > # > # An error report file with more information is saved as > hs_err_pid21386.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > Aborted > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:19 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Lockfiles are a compile time option. I've turned them on now, corrected > a mistake resulting in only 3 ports being used and now have it going > through a few hundred iterations again without a crash. > > To disable lockfiles.. > > ./configure --disable-lockfiles && make install > > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > Port /dev/ttyS5 is Closed > Exiting Thread ::: /dev/ttyS1 > Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: > /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting > Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port > /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS1 is Closed > Port /dev/ttyS4 is Closed > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > > > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, How can you turn off the lock files? I can try using that. I >> never tried that, I thought you can't turn off the file locking. >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:06 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> You may try 4 ports instead of 5 to make sure thats not the issue. >> >> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >> 2.6.11.4-20a-smp >> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >> java -version java version "1.5.0_06" >> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >> >> I'm using rxtx 2.1-7 (final) with default configuration except >> lockfiles are disabled. I gathered that you are doing your own > resource locking. >> >> ... >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> ... >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>> version >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:52 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> Whats a few times? I've got 4 ports here and have run it a few >>> thousand iterations. >>> >>> Is that true for you if you run it with just four of your DIGI ports? >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> You need to run it few times. More the number of ports, more >>>> frequently you can reproduce. With just 2 ports it will be hard to >>>> reproduce frequently. >>>> >>>> ~pk >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:33 PM >>>> To: Kharbanda, Pawan >>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>> Subject: Re: Port Locking / JVM Crashing >>>> >>>>> I am also attaching a Test Class to replicate the problem. You need > >>>>> to >>>> >>>>> modify the class and add your systems Serial ports into the code >>>>> and >> >>>>> execute. >>>>> >>>>> java TestOpenClosePort 100 >>>>> >>>>> It will open and close all the serial ports 100 times in there own >>>>> thread. >>>>> >>>>> Please let me know, I will be available thru out this weekend and >>>>> can >>> >>>>> help you as much as I can with testing. >>>>> >>>> >>>> How reproducable is the problem with the above testcase? I'm >>>> running >> >>>> 100's of iterations without reproducing the problem. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> >>> >> > From rtlane01 at comcast.net Tue Aug 1 19:22:03 2006 From: rtlane01 at comcast.net (Randall T. Lane) Date: Tue, 01 Aug 2006 21:22:03 -0400 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] Message-ID: <44CFFE3B.90001@comcast.net> Rxtx Community: Please see my e-mail to Trent. Does anyone have any experience using rxtx to successfully communicate with hardware via USB? Thanks. Randy Lane -------------- next part -------------- An embedded message was scrubbed... From: Trent Jarvi Subject: Re: Help with RxTx for USB Communication Date: Tue, 1 Aug 2006 18:49:13 -0600 (MDT) Size: 3300 Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060801/9bbbc255/HelpwithRxTxforUSBCommunication.mht From naranjo.manuel at gmail.com Sun Aug 6 16:59:28 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Sun, 06 Aug 2006 19:59:28 -0300 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44CFFE3B.90001@comcast.net> References: <44CFFE3B.90001@comcast.net> Message-ID: <44D67450.8010100@gmail.com> Randy: I have been able to communicate to AIRcable USB Bluetooth Dongle, with success. I'm not sure which are the options that you have to send to RXTX library, but you can indeed. Check that you do not have the port avaible for much long. I have heard of a problem with WinXP that it simply turn off virtual ports when they are too much long with out activity. If you want I can send you my code, because it is avaible under GPL, the new release is not avaible at AIRcable web site, but it should in short time. Regards, Manu > Rxtx Community: > > Please see my e-mail to Trent. Does anyone have any experience using > rxtx to successfully communicate with hardware via USB? > > Thanks. > > Randy Lane > > ------------------------------------------------------------------------ > > Asunto: > Re: Help with RxTx for USB Communication > De: > Trent Jarvi > Fecha: > Tue, 1 Aug 2006 18:49:13 -0600 (MDT) > Para: > "Randall T. Lane" > > Para: > "Randall T. Lane" > CC: > taj at www.linux.org.uk > > > On Tue, 1 Aug 2006, Randall T. Lane wrote: > >> Trent, >> >> I am working on a project written in Java (1.5) and need to >> communicate to an external device via a USB port. >> >> I have downloaded rxtx-2.1-7-bins-r2.zip from www.rxtx.org and setup >> a Java test project to learn how to use rxtx. I am able to list the >> serial ports available, however rxtx does not recognize my USB port. >> I am running on Windows XP. Here is some output from my test project >> ... >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> COM1 - Serial >> COM3 - Serial >> LPT1 - Parallel >> >> I would appreciate any help you could provide in getting rxtx to >> allow me to communicate via my USB port. >> >> Here is my code, if that would help. >> >> public static void main(String[] args) { >> listPorts(); >> // The listPorts() and getPortTypeName() methods are used for >> port identification. >> static void listPorts() >> { >> Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); >> while ( portEnum.hasMoreElements() ) >> { >> CommPortIdentifier portIdentifier = (CommPortIdentifier) >> portEnum.nextElement(); >> System.out.println(portIdentifier.getName() + " - " + >> getPortTypeName(portIdentifier.getPortType()) ); >> } } >> static String getPortTypeName ( int portType ) >> { >> switch ( portType ) >> { >> case CommPortIdentifier.PORT_I2C: >> return "I2C"; >> case CommPortIdentifier.PORT_PARALLEL: >> return "Parallel"; >> case CommPortIdentifier.PORT_RAW: >> return "Raw"; >> case CommPortIdentifier.PORT_RS485: >> return "RS485"; >> case CommPortIdentifier.PORT_SERIAL: >> return "Serial"; >> default: >> return "unknown type"; >> } >> } >> >> Thanks. >> >> Randy Lane >> > > Hi Randy > > The rxtx mail list is a better place to ask as there are more eyes. > I'm swamped with work. > > Be sure to look to see that your serial port dongle shows up as a > serial port in device manager and no other applications have it open. > USB serial dongles do work with rxtx. Some are less complete than > others. > > -- > Trent Jarvi > tjarvi at qbang.org > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From eddythejekyll at gmail.com Sun Aug 6 23:31:45 2006 From: eddythejekyll at gmail.com (Ed) Date: Sun, 6 Aug 2006 23:31:45 -0600 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? Message-ID: I have written a simple client server (RMI) application without using RxTx where the server controls a parallel port simply by addressing the port and banging the bits in order to drive a relay. It also reads the port's. I am doing this by making Runtime.exec calls to a binary that actually does the parallel port bit banging and reading. However, I'd like to use RxTx so it is a pure Java application, and I've so far installed and figured out how to discover the ports, but I'm having trouble finding good examples or some howto type documentation for this. I did find the two examples on the Wiki: one for serial IO and the other to discover the ports on a system. As I said, I have so far installed RxTx and gotten it to compile and run and I can identify the ports. When I run the server I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found Ports! Found port COM1 Found port COM3 Found port LPT1 LPT1 Not Currently owned EASSwitch Server starting. EASSwitch is bound. Server Ready. So it looks like thing are installed and working, but I feel all dressed up and no idea how to proceed. Basically, I just want to be able to toggle the data lines on the parallel port and read them. Very simple. No parallel printer type usage. Are there any examples I can work off of? If so, please advise. Thank you. -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060806/c7e39898/attachment.html From hambyiii at hotmail.com Sun Aug 6 23:53:54 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Mon, 07 Aug 2006 05:53:54 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Message-ID: Hi, sorry I took the weekend to reply, but I was away for the last couple of days. Unfortunately I cannot send the full stack trace yet. The problem is not, unfortunately, happening on my computer, but on a clients computer, which I will go and visit today. I will hopefully be able to get a stack trace then. As to the physical connection, tt is indeed a USB from the computer, connected to a 9 pin serial device that connects to the hard-ware. My java version is 1.5.06 >From: "Kharbanda, Pawan" >Reply-To: RXTX Developers and Users >To: "RXTX Developers and Users" >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 09:15:24 -0600 > >Keith, > Please send the full stack trace of the exception, may be I can help >you. On Trent's question regarding physical 'Serial Port', do you mean >you have a USB(Connected to Client Machine) to 9 Pin Serial >cable(Connected to H/W device)? > >Also please mention which java version you are using? > >Thanks >Pawan Kharbanda > > >-----Original Message----- >From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >Of Keith Thorne >Sent: Friday, August 04, 2006 7:52 AM >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream > >The physical serial port is actually a USB connection that is then >changed to a "virtual serial port", so I can use the serial port >protocols to connect to it. The other end of the connection is a >hardware device that is constantly turned on. I am not sure about the >port 'vanishing'...we have another piece of software that came with the >hardware device, which we can test the device (and with it the virtual >serial port) with. This has no problem connecting to the serial port or >writing to/reading from the device. >It is only when my software is run, that the error occurs. Like I have >said, my software (using rxtx) is connecting to the serial port >successfully, but it is when I try and write to the serial port that I >get the error. > >Although to be truthful, I am not absolutely certain if the error is >happening on the oStream.write() or the oStream.flush(). I only think it >is the write(), because that is where the writeArray() function is >called. > >thanks >Keith > > > >From: Trent Jarvi > >Reply-To: RXTX Developers and Users > >To: RXTX Developers and Users > >Subject: Re: [Rxtx] error getting InputStream > >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > > > > >Hi Keith > > > >Can you tell us more about the physical serial port? Might it be > >'vanishing?' > > > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > > > Hi, > > > > > > I know I am replying to myself a lot at the moment, but more > > > information > >has > > > come to light (These errors are actually happening on a client > > > machine, > >on > > > software that has worked for the past month, and only now has > > > started to fail, which is why I am a little slow finding things out) > > > > > > The errors I have already written about are only symptoms of an > > > orignal error. The original error occurs the first time I try to > > > WRITE thte > > > OutputStream: > > > > > > OutputStream oStream = serialPort.getOutputStream(); > > > serialPort.notifyOnOutputEmpty(true); > > > > > > byte[] bs = encodeMessage(configString.toString()); > > > > > > oStream.write(bs); > > > oStream.flush(); > > > > > > The error occurs on oStream.write(bs); and is: > > > > > > Input/output error in writeArray > > > > > > Now writeArray is native code, so I have no idea what is going on >there. > >Any > > > help would be appreciated > > > Thanks > > > Keith > > > > > > > > >> From: "Keith Thorne" > > >> Reply-To: RXTX Developers and Users > > >> To: rxtx at qbang.org > > >> Subject: Re: [Rxtx] error getting InputStream > > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > > >> > > >> Okay, I made a little mistake in my last message. > > >> > > >> The error is not occuring where I thought it was. Instead it is > >occuring > > >> when I do the following: > > >> > > >> byte[] readBuffer = new byte[128]; > > >> > > >> try { > > >> > > >> int numBytes = 0; > > >> try { > > >> Thread.sleep(500); > > >> } > > >> catch (InterruptedException e) > > >> {} > > >> > > >> while (inputStream.available() > 0) > > >> { > > >> numBytes = inputStream.read(readBuffer); > > >> } > > >> > > >> processReceivedData(readBuffer, numBytes); } catch (IOException > > >> e) { > > >> System.out.println(e.getMessage()); > > >> } > > >> > > >> So I guess the error is happening on the > > >> inputStream.read(readBuffer) > > >> > > >> again, any help is appreciated and again, thanks in advance Keith > > >> > > >>> From: "Keith Thorne" > > >>> Reply-To: RXTX Developers and Users > > >>> To: rxtx at qbang.org > > >>> Subject: [Rxtx] error getting InputStream > > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > > >>> > > >>> Hi, > > >>> > > >>> I have written a program in Java for Windows xp using RXTX (which > > >>> is > >why > > >> I > > >>> am using this mailing list :). However, I am getting a problem. I > > >>> am connecting to a serial port, like so: > > >>> private CommPortIdentifier portID; > > >>> > > >>> private boolean openPort(String selectedPort) > > >>> { > > >>> boolean portFound = false; > > >>> Enumeration portList; > > >>> > > >>> portList = CommPortIdentifier.getPortIdentifiers(); > > >>> > > >>> while (portList.hasMoreElements()) > > >>> { > > >>> portID = (CommPortIdentifier) portList.nextElement(); > > >>> if (portID.getPortType() == > >CommPortIdentifier.PORT_SERIAL) > > >>> { > > >>> if (portID.getName().equals(selectedPort)) > > >>> { > > >>> portFound = true; > > >>> break; > > >>> } > > >>> } > > >>> } > > >>> > > >>> return portFound; > > >>> } > > >>> > > >>> and then I try and get the serial port input stream (leaving out > > >>> the > >try > > >>> and > > >>> catch for the sake of space): > > >>> > > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", > >2000); > > >>> InputStream inputStream = serialPort.getInputStream(); > > >>> > > >>> but on the getInputStream() I get the following error message: > > >>> > > >>> Bad file descriptor in nativeavailable > > >>> > > >>> I cannot figure out where it is going wrong...anyone any ideas. A > >quick > > >>> answer would be wonderful, as I am kinda under the hammer to get > > >>> this > > >> fixed > > >>> quickly > > >>> > > >>> Thanks in Advance > > >>> Keith > > >>> > > >>> > > >>> _______________________________________________ > > >>> Rxtx mailing list > > >>> Rxtx at qbang.org > > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > > >> > > >> > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Aug 7 06:22:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:22:03 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: Hmm.. I left the test running went I went home Saturday. It looks like something did show up after ~30k iterations. I'll look at it more in my free time. Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS5 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 29417 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 29417 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 29417 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00002aab14c2ec63, pid=20573, tid=1095125344 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6c63] initialise_event_info_struct+0x63 # [thread 1087756640 also had an error] Port /dev/ttyS5 is Opened 0x01 Sent [thread 1089861984 also had an error] Port /dev/ttyS4 is Opened 0x01 Sent [thread 1090914656 also had an error] # An error report file with more information is saved as [thread 1090914656 also had an error] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted On Sat, 5 Aug 2006, Trent Jarvi wrote: > > I'd stick a couple $15 dual port serial boards in the machine to see if its > kernel driver specific. > > I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more > problematic. They do not get the same number of eyes looking for problems. > > You could try putting > > #undef TIOCSERGETLSR > #undef TIOCGICOUNT > > in the very top of SerialImp.h or one or the other to flip bits of code off > and on. > > The kernel here is 2.6.11.4-20a-smp from Suse. > glibc is 2.3.4-23.4 from Suse > the jre is 1.5.0_06-b05 from Sun. > > The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC > ram. > > You should be able to reproduce what I'm seeing then go from there. I don't > think I'm going to see this problem without having the same cornercase > hardware you have. Maybe we can work that out off the list but I doubt I'm > going to find it in rxtx at this point. > > I have seen problems in the past were kernel structs don't match user space > struct and bad things happen but I was including a kernel struct to get > functionality that had not made its way into user space at the time. > > The only thing I may be missing is that when I write 0x01 out the port, > nothing comes back. That was not specified but you could easily disconnect > anything connected to the ports to see if that changes anything. > > rxtx is far from bug free but I do not see anything yet. > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, >> I am able to constantly replicate almost everytime even when I have >> locks disabled. Don't know the reason why you are not able to on your >> environment. Any suggestions??????? >> >> >> Cycle No (Thread ::: /dev/cuf04) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> Exiting Thread ::: /dev/cuf03 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> Port /dev/cuf01 is Opened >> 0x01 Sent >> Port /dev/cub01 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Closed >> Port /dev/cuf02 is Closed >> Port /dev/cuf03 is Closed >> Port /dev/cuf04 is Closed >> Port /dev/cub01 is Closed >> Exiting Thread ::: /dev/cuf03 >> Exiting Thread ::: /dev/cuf02 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 8 >> Exiting Thread ::: /dev/cuf04 >> Exiting Thread ::: /dev/cuf01 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf04) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 >> # >> # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 >> # >> # An error report file with more information is saved as >> hs_err_pid21386.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> Aborted >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:19 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Lockfiles are a compile time option. I've turned them on now, corrected >> a mistake resulting in only 3 ports being used and now have it going >> through a few hundred iterations again without a crash. >> >> To disable lockfiles.. >> >> ./configure --disable-lockfiles && make install >> >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> Port /dev/ttyS5 is Closed >> Exiting Thread ::: /dev/ttyS1 >> Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: >> /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting >> Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port >> /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> >> >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, How can you turn off the lock files? I can try using that. I >>> never tried that, I thought you can't turn off the file locking. >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 1:06 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> You may try 4 ports instead of 5 to make sure thats not the issue. >>> >>> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >>> 2.6.11.4-20a-smp >>> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >>> java -version java version "1.5.0_06" >>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >>> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >>> >>> I'm using rxtx 2.1-7 (final) with default configuration except >>> lockfiles are disabled. I gathered that you are doing your own >> resource locking. >>> >>> ... >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> Port /dev/ttyS4 is Closed >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> ... >>> >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>>> version >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:52 PM >>>> To: Kharbanda, Pawan >>>> Cc: Trent Jarvi; RXTX Developers and Users >>>> Subject: RE: Port Locking / JVM Crashing >>>> >>>> >>>> Whats a few times? I've got 4 ports here and have run it a few >>>> thousand iterations. >>>> >>>> Is that true for you if you run it with just four of your DIGI ports? >>>> >>>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>>> >>>>> You need to run it few times. More the number of ports, more >>>>> frequently you can reproduce. With just 2 ports it will be hard to >>>>> reproduce frequently. >>>>> >>>>> ~pk >>>>> >>>>> -----Original Message----- >>>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>>> Sent: Saturday, August 05, 2006 12:33 PM >>>>> To: Kharbanda, Pawan >>>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>>> Subject: Re: Port Locking / JVM Crashing >>>>> >>>>>> I am also attaching a Test Class to replicate the problem. You need >> >>>>>> to >>>>> >>>>>> modify the class and add your systems Serial ports into the code >>>>>> and >>> >>>>>> execute. >>>>>> >>>>>> java TestOpenClosePort 100 >>>>>> >>>>>> It will open and close all the serial ports 100 times in there own >>>>>> thread. >>>>>> >>>>>> Please let me know, I will be available thru out this weekend and >>>>>> can >>>> >>>>>> help you as much as I can with testing. >>>>>> >>>>> >>>>> How reproducable is the problem with the above testcase? I'm >>>>> running >>> >>>>> 100's of iterations without reproducing the problem. >>>>> >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> >>>> >>> >> > From iinjlv01 at gmail.com Mon Aug 7 06:22:07 2006 From: iinjlv01 at gmail.com (J LV) Date: Mon, 7 Aug 2006 14:22:07 +0200 Subject: [Rxtx] Data lost or Slow sampling Message-ID: Hello I am using RXTX to comm with a motion controller using Serial Port and i can write the commands using SerialPort or RXTXPort without problems, but when i try write and read at high sampling rate, for example to know the position and speed at every moment of a trajectory, i obtain a very irregular response times. I am using the most simple algorimth: 1-Write the command "is trajectory finished?" and wait for SerialPortEvent.DATA_AVAILABLE 2-Read the InputStreamReader of serial port while not empty 3-If trajectory finished then stop program, else, continue 4-Read actual time using System.currentTimeMillis() (t0) 5-Write the command "give me position" and wait for SerialPortEvent.DATA_AVAILABLE 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) 7-Read the InputStreamReader of serial port while not empty 8-Save position in Vector or ArrayList and repeat from 1 I don't know if the problem is the RXTX, my program or the motion controller hardware but i have response times from 16 millis to 78 millis at 19200 bauds!. I am using SwingWorked to threading SerialPort reading/writing process. Any idea or similar data leak problem? Thanks for RXTX project and sorry for my badde english! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/909a4cb3/attachment.html From tjarvi at qbang.org Mon Aug 7 06:50:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:50:10 -0600 (MDT) Subject: [Rxtx] Data lost or Slow sampling In-Reply-To: References: Message-ID: On Mon, 7 Aug 2006, J LV wrote: > Hello > > I am using RXTX to comm with a motion controller using Serial Port and i can > write the commands using SerialPort or RXTXPort without problems, but when i > try write and read at high sampling rate, for example to know the position > and speed at every moment of a trajectory, i obtain a very irregular > response times. I am using the most simple algorimth: > 1-Write the command "is trajectory finished?" and wait for > SerialPortEvent.DATA_AVAILABLE > 2-Read the InputStreamReader of serial port while not empty > 3-If trajectory finished then stop program, else, continue > 4-Read actual time using System.currentTimeMillis() (t0) > 5-Write the command "give me position" and wait for > SerialPortEvent.DATA_AVAILABLE > 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) > 7-Read the InputStreamReader of serial port while not empty > 8-Save position in Vector or ArrayList and repeat from 1 > > > I don't know if the problem is the RXTX, my program or the motion controller > hardware but i have response times from 16 millis to 78 millis at 19200 > bauds!. I am using SwingWorked to threading SerialPort reading/writing > process. > > Any idea or similar data leak problem? > > Thanks for RXTX project and sorry for my badde english! > This can be platform dependant. What you may do for a starting point is use a loopback connection and time the same thing at 19200. Write the date, wait for data available, read the data. I would expect from write to data available to take around 10 ms from past experiences. You can experiment with turning on and off buffering in the port settings of the OS, if the OS supports more realtime like interrupts, that could help. You have a java schedual and the kernel schedual. Serial interrupts traditionally have very high priority but modern OSs tend to realize thats not good for GUIs, ... and delay responding to the interrupts. You should be able to have usec response times in a realtime OS. Windows and Linux are not typically setup as realtime OSs. For comparison, the last time I looked which was about 5 years ago, windows NT4 came back with data available in 8 ms and Linux came back in 10 ms. I would be interested in seeing what you get today. -- Trent Jarvi tjarvi at qbang.org From gergg at cox.net Mon Aug 7 09:21:56 2006 From: gergg at cox.net (Gregg Wonderly) Date: Mon, 07 Aug 2006 10:21:56 -0500 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? In-Reply-To: References: Message-ID: <44D75A94.9030205@cox.net> Ed wrote: > Are there any examples I can work off of? If so, please advise. Just read the javax.comm javadocs. You need to take the parallel port and write values to it based on which bits of which lines you want on and off. Gregg Wonderly From pete.flugstad at gmail.com Mon Aug 7 09:36:19 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 7 Aug 2006 10:36:19 -0500 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44D67450.8010100@gmail.com> References: <44CFFE3B.90001@comcast.net> <44D67450.8010100@gmail.com> Message-ID: <84d4a6d50608070836v97e9a29q96e98441ea903ac7@mail.gmail.com> FYI, I'm talking to a USB<->Serial dongle just fine under Windows XP Pro. I did have to install a driver for the thing - Windows XP by default, did not recognize it. Once installed, it just showed up as another COM port, and I've been pushing data over it with no problems. Pete From savagobr at yahoo.com Mon Aug 7 10:13:06 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Mon, 7 Aug 2006 09:13:06 -0700 (PDT) Subject: [Rxtx] Port Locking / JVM Crashing: 2 ports (Serial + usb) Message-ID: <20060807161306.9648.qmail@web53803.mail.yahoo.com> Trent This is curious, since I did reproduced the aformentioned bug using only 2 ports: /dev/ttyS0 and /dev/ttyUSB0. It only need to run for 500 times: $ java -cp . TestOpenClosePort 500 500 Port /dev/ttyS0 is Closed Excpetion ::: Thread ::: /dev/ttyUSB0null Exiting Thread ::: /dev/ttyUSB0 Cycle No (Thread ::: /dev/ttyUSB0) ::::::: 227 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 184 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x203d2044, pid=32368, tid=2986859424 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing) # Problematic frame: # C 0x203d2044 # # An error report file with more information is saved as /tmp/hs_err_pid32368.log # # If you would like to submit a bug report, please visit: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Best regards Savago ps: Test environment $ uname -a Linux localhost.localdomain 2.6.15-1.2054_FC5 #1 Tue Mar 14 15:48:33 EST 2006 i686 i686 i386 GNU/Linux $ java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) $gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.1 20060525 (Red Hat 4.1.1-1) --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/c6ca8094/attachment.html From Pawan.Kharbanda at dot.state.co.us Mon Aug 7 17:23:25 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 7 Aug 2006 17:23:25 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Trent, I think I got the problem fixed after some code changes in the C (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the staging environment (with 10 devices) with real time data and haven't seen a JVM lock/ Port locking since last night. I am going to do further stress testing and will send all my code changes and my findings in next few days. I believe the problem was causing due to the digi drivers and how the Linux kernel talked to it, so after making some code changes and synchronization fixes, I got it to work. I am keeping my fingers crossed :) Thanks for all your help. You have been a great help. Will keep you posted. Cheers ~pk PS : We are going to test my new RXTX changes with the 2.6 Red Hat kernel (currently using 2.4.21-37.ELsmp) too. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 5:08 PM To: Kharbanda, Pawan Subject: RE: Port Locking / JVM Crashing Hi Pawan As mentioned I did reproduce the error but after several hours of cycles. I'm looking at RXTXPort.java and thinking about what may be happening. The error is in the C layer but it may be preventable in the java code. lets say two closes are overlapping or an operation is trying to happen while another port is closing. The structure may be out of sync by the time the code using the structure in another thread gets to the event info struct. So I'm wondering if synchronization in RXTXPort() and close() may help you. A second thing that may help is you can put printf("got here\n"); in each of the lines in initialize event info struct to verify that the problem is in walking the linked list. Thats my suspicion. So a properly timed close() while calling the constructor may be catching rxtx off guard. You can synchronize to test that and it may do away with the problem. From tjarvi at qbang.org Mon Aug 7 18:01:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 18:01:54 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Message-ID: Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do further > stress testing and will send all my code changes and my findings in next > few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to happen > while another port is closing. The structure may be out of sync by the > time the code using the structure in another thread gets to the event > info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may do > away with the problem. > From Pawan.Kharbanda at dot.state.co.us Tue Aug 8 13:49:14 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 8 Aug 2006 13:49:14 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Trent, I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and have absolutely no problem with JVM crashing or Port Locking even after 10000 operations (now I am trying 100,000 :). This is all with the original RXTX 2.1.7 (final) api's without any of my fixes that I have been trying for last 2-3 weeks. I will suggest that we update the INSTALL or Readme file accompnying the RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: 82000685_G 02/02/2006). This should helped everybody using the RXTX API's with RedHat Linux atleast. Regards Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 6:02 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do > further stress testing and will send all my code changes and my > findings in next few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers > crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to > happen while another port is closing. The structure may be out of > sync by the time the code using the structure in another thread gets > to the event info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may > do away with the problem. > From jimo at earthlink.net Wed Aug 9 21:21:00 2006 From: jimo at earthlink.net (Jim Owen) Date: Wed, 9 Aug 2006 20:21:00 -0700 Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat Message-ID: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Hi All, I've run into some difficulties with rxtx that have me baffled and need some help. I have an application that has used earlier versions of rxtx successfully and on a variety of platforms. We recently needed to deploy this application into an environment where we could not utilize lock files. I pulled down the 2.0.7 pre1 source distribution and executed configure with --disable-lockfiles. I then executed make and make install. When I execute the program, as root, I get the following error: ************************************************************************ Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) # Problematic frame: # C 0x00001004 # # An error report file with more information is saved as hs_err_pid20151.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # **************************************************************************** If I execute as a normal user, I get no errors, but no ports listed: (Using an earlier version, I get a serial and parallel port listed.) **************************************************************************** [jim at linuxDev ingenicoApp]$ java VerifyCommBuild Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Some ports appear to have been found, let's try to enumerate them. Complete. **************************************************************************** When I built rxtx, there was a warning given of the following: **************************************************************************** conftest.c: In function 'main': conftest.c:6: warning: incompatible implicit declaration of built-in function 'printf' conftest.c:7: warning: incompatible implicit declaration of built-in function 'exit' WARNING: Kernel include files do not match the current kernel **************************************************************************** uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux JAVA_HOME=/usr/java/j2sdk1.4.2_11 javax.comm.properties: Driver=gnu.io.RXTXCommDriver Here's the code for VerifyCommBuild.java that I'm using to test: **************************************************************************** import javax.comm.*; import java.util.Enumeration; /** * A quick app to check that the javax.comm (Serial) Communications extension has been properly * installed and configured on this machine. * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. */ public class VerifyCommBuild { public static void main(String args[]) { Enumeration ports; System.out.println("Verifying Comm Build Environment"); try { ports = CommPortIdentifier.getPortIdentifiers(); if (ports == null) { System.out.println("No comm ports found!"); return; } System.out.println("Some ports appear to have been found, let's try to enumerate them."); while (ports.hasMoreElements()) { System.out.println("Here is a port [" + ((CommPortIdentifier)ports.nextElement()).getName() + "]"); } } catch (Exception e) { System.out.println("Failed to enumerate ports [" + e.getMessage() + "]"); e.printStackTrace(); } System.out.println("Complete."); } } **************************************************************************** Any suggestions as to what I'm missing? Thanks, Jim Owen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060809/92503a81/attachment.html From tjarvi at qbang.org Thu Aug 10 05:39:36 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 05:39:36 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Message-ID: On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even after > 10000 operations (now I am trying 100,000 :). This is all with the > original RXTX 2.1.7 (final) api's without any of my fixes that I have > been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying the > RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp > and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From oliver.archner at bayceer.uni-bayreuth.de Wed Aug 9 06:13:36 2006 From: oliver.archner at bayceer.uni-bayreuth.de (Oliver Archner) Date: Wed, 09 Aug 2006 14:13:36 +0200 Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() Message-ID: <44D9D170.5020806@bayceer.uni-bayreuth.de> Dear Users, i would like to send a byte to a parallel device. The following piece of code works well but throws an IOException in LPRPort$ParallelOutputStream.write() saying that everything is ok ?! Oliver import java.io.*; import gnu.io.*; public class Test { public static void main(String[] args) { RXTXCommDriver TxPort = new RXTXCommDriver(); ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", CommPortIdentifier.PORT_PARALLEL); OutputStream oStream = null; try { oStream = pPort.getOutputStream(); oStream.write((byte)0x51); } catch (IOException e) { e.printStackTrace(); } finally { try { if (oStream != null) oStream.close(); } catch (IOException e) { e.printStackTrace(); } } } } Output: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Der Vorgang wurde erfolgreich beendet. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at Test.main(Test.java:12) From tjarvi at qbang.org Thu Aug 10 18:12:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 18:12:27 -0600 (MDT) Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() In-Reply-To: <44D9D170.5020806@bayceer.uni-bayreuth.de> References: <44D9D170.5020806@bayceer.uni-bayreuth.de> Message-ID: On Wed, 9 Aug 2006, Oliver Archner wrote: > Dear Users, > > i would like to send a byte to a parallel device. > The following piece of code works well but throws an IOException in > LPRPort$ParallelOutputStream.write() saying that everything is ok ?! > > Oliver > > > import java.io.*; > import gnu.io.*; > > public class Test { > > public static void main(String[] args) { > RXTXCommDriver TxPort = new RXTXCommDriver(); > ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", > CommPortIdentifier.PORT_PARALLEL); > OutputStream oStream = null; > try { > oStream = pPort.getOutputStream(); > oStream.write((byte)0x51); > } catch (IOException e) { > e.printStackTrace(); > } finally { > try { > if (oStream != null) oStream.close(); > } catch (IOException e) { > e.printStackTrace(); > > } > } > > } > } > > Output: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Der Vorgang wurde erfolgreich beendet. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at Test.main(Test.java:12) WriteFile is returning a negative value or 0. I do not know what that exception is saying but it should be an IO Exception. The native code in question is line 405 in ParallelImp.c. If you find the documentation pointing out how the code is wrong, we can fix it. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 08:12:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 09:12:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question Message-ID: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Hello, I'm trying to send data over a serial port using the RXTX libraries. I've got the binaries for Windows XP from qbang.org. On the receiving side, I'm using event notification (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial Ports InputStream. Similarly on the transmist side, I use SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. First question: does this make sense? The code was largely adopted from an existing Windows C++ program and that's more or less how it operated (overlapped io using ReadFile, WriteFile, GetOverlappedResult, Events, etc). Second question: in a small standalone test program I wrote, everything seems to work just fine - whenever SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good chunk of data available (I explicitly set the in/out buffers to 1024 bytes) to read. However, when I pull my "library" into a much larger environment (OSGI framework based, but same JVM/OS/etc), whenever SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a byte or two available. Needless to say, this really kills performance. Everything appears to still operate properly, just really, really slowly. So, has anyone seen this problem before? I haven't dived into the details of RXTX library, and I'm wondering what the mechanism is here? How does the RXTX thread determine when to issue the SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to tweak in RXTX or the JVM to get this to operate more like the small test program? Seems like I want RXTX to call me back _less_ often. Thanks, Pete From tjarvi at qbang.org Fri Aug 11 09:55:23 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 09:55:23 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Hello, > > I'm trying to send data over a serial port using the RXTX > libraries. I've got the binaries for Windows XP from qbang.org. > > On the receiving side, I'm using event notification > (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial > Ports InputStream. Similarly on the transmist side, I use > SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. > > First question: does this make sense? The code was largely adopted > from an existing Windows C++ program and that's more or less how it > operated (overlapped io using ReadFile, WriteFile, > GetOverlappedResult, Events, etc). > > Second question: in a small standalone test program I wrote, > everything seems to work just fine - whenever > SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good > chunk of data available (I explicitly set the in/out buffers to 1024 > bytes) to read. > > However, when I pull my "library" into a much larger environment > (OSGI framework based, but same JVM/OS/etc), whenever > SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a > byte or two available. Needless to say, this really kills > performance. Everything appears to still operate properly, just > really, really slowly. > > So, has anyone seen this problem before? I haven't dived into the > details of RXTX library, and I'm wondering what the mechanism is here? > How does the RXTX thread determine when to issue the > SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to > tweak in RXTX or the JVM to get this to operate more like the small > test program? > Seems like I want RXTX to call me back _less_ often. > Hi Pete RXTX is doing overlapped IO in termios.c. In this file we map the windows functionality to termios (mostly POSIX). From there, we just talk termios to all platforms. What I guess is happening is the eventloop is waiting a specified amount of time. As you application uses more cpu cycles, you observe the difference in behavior. You could go into the C code and change this after looking at the eventLoop() code in serialImp.c and following that to the serial_ioctl() and serial_select() in termios.c Another option is to go into RXTXPort.java and put a sleep in the sendEvent() code. This way you would not have to recompile the native code (not very easy at this point). -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 13:27:36 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:27:36 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > Another option is to go into RXTXPort.java and put a sleep in the > sendEvent() code. This way you would not have to recompile the native > code (not very easy at this point). Are the instructions in the INSTALL file still valid? If so, it wasn't very hard to build it (I already had MinGW installed). Everything seemed to build just fine. Haven't tried to install/use it yet, but it wasn't a big deal (assuming those instructions were correct. Thanks, Pete From pete.flugstad at gmail.com Fri Aug 11 13:42:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:42:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, but there doesn't appear to be a way to select that via RXTX (which appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control is selected). Is there a way I'm not seeing? Thanks, Pete From eddythejekyll at gmail.com Fri Aug 11 15:20:44 2006 From: eddythejekyll at gmail.com (Ed) Date: Fri, 11 Aug 2006 15:20:44 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion Message-ID: I'm trying to read and write a parallel port on a standard (Dell) pc running RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. I'm having problems getting rxtx to return a port enumeration from getPortIdentifiers. I'm using a file PortChooser.java as a test file to get things going. This is from the Java CookBook 2nd edition (Chapter 12). The call // get list of ports available on this particular computer, // by calling static method in CommPortIdentifier. Enumeration pList = CommPortIdentifier.getPortIdentifiers(); returns a null pList; I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and compile without --disable-lockfiles I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ... When I compile with --disable-lockfiles the call to getPortIdentifiers simply returns a null Enumeration. I've read the documention and threads about this issue and I feel like I've tried everything, so at the moment I'm stumped. I can supply any further info that may help. Thanks in advance. Ed -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060811/80c4eeec/attachment.html From tjarvi at qbang.org Fri Aug 11 18:29:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:29:48 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > On 8/11/06, Trent Jarvi wrote: >> Another option is to go into RXTXPort.java and put a sleep in the >> sendEvent() code. This way you would not have to recompile the native >> code (not very easy at this point). > > Are the instructions in the INSTALL file still valid? If so, it > wasn't very hard to build it > (I already had MinGW installed). Everything seemed to build just > fine. Haven't tried to install/use it yet, but it wasn't a big deal > (assuming those instructions were correct. > Hi Pete The instructions are correct. You will want to make sure that the exports worked. If the library does not work properly, then the exports failed. The exports are currently generated with nm, sed and grep in the Makefile which is often commented out. If the def file is old, it will cause problems. You should be good to go then. Look at the serial_select and eventLoop code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:33:32 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:33:32 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > but there doesn't appear to be a way to select that via RXTX (which > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > is selected). > > Is there a way I'm not seeing? > Hi Pete I'm guessing I didn't know the difference. At the time, I really didn't have windows API documentation. I just had some pages I found with altivista/google. Later microsoft made their documentation available on msdn or I learned about it. For rxtx, the calls need to be platform neutral. So if you see how to do each in termios, then we can get it going. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:45:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:45:24 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Fri, 11 Aug 2006, Ed wrote: > I'm trying to read and write a parallel port on a standard (Dell) pc running > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. > > I'm having problems getting rxtx to return a port enumeration from > getPortIdentifiers. I'm using a file > PortChooser.java as a test file to get things going. This is from the Java > CookBook 2nd edition (Chapter 12). The call > > // get list of ports available on this particular computer, > // by calling static method in CommPortIdentifier. > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > returns a null pList; > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and > compile without --disable-lockfiles I get: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > ... > > When I compile with --disable-lockfiles the call to getPortIdentifiers > simply returns a null Enumeration. > > I've read the documention and threads about this issue and I feel like I've > tried everything, so at the moment I'm stumped. > > I can supply any further info that may help. > > Thanks in advance. > > Ed > Hi Ed You may want to check the permissions of /dev/lp*. Also make sure lp or your kernel support for lp is loaded. It should show up in dmesg and lsmod. For my laptop with no printer port enabled in BIOS is see: lp: driver loaded but no devices found in desg |grep lp [] $ ls -l /dev/lp* crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 here root and group lp can read and write. Normal users cannot. Try a simple read as a user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: Permission denied Fix as root [] chmod 666 /dev/lp* [] $ ls -l /dev/lp* crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 Now as user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: No such device or address So this is saying there is no lp0 on my laptop. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:58:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:58:31 -0600 (MDT) Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat In-Reply-To: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> References: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Message-ID: On Wed, 9 Aug 2006, Jim Owen wrote: > Hi All, > > I've run into some difficulties with rxtx that have me baffled and need > some help. > > I have an application that has used earlier versions of rxtx > successfully and on a variety of platforms. We recently needed to deploy > this application into an environment where we could not utilize lock files. > > I pulled down the 2.0.7 pre1 source distribution and executed configure > with --disable-lockfiles. I then executed make and make install. > > When I execute the program, as root, I get the following error: > > ************************************************************************ > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) > # Problematic frame: > # C 0x00001004 > # > # An error report file with more information is saved as hs_err_pid20151.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > **************************************************************************** > > If I execute as a normal user, I get no errors, but no ports listed: > (Using an earlier version, I get a serial and parallel port listed.) > > **************************************************************************** > [jim at linuxDev ingenicoApp]$ java VerifyCommBuild > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Some ports appear to have been found, let's try to enumerate them. > Complete. > **************************************************************************** > > When I built rxtx, there was a warning given of the following: > > **************************************************************************** > conftest.c: In function 'main': > conftest.c:6: warning: incompatible implicit declaration of built-in > function 'printf' > conftest.c:7: warning: incompatible implicit declaration of built-in > function 'exit' > > WARNING: Kernel include files do not match the current kernel > **************************************************************************** > > > uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 > Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux > > JAVA_HOME=/usr/java/j2sdk1.4.2_11 > > javax.comm.properties: Driver=gnu.io.RXTXCommDriver > > Here's the code for VerifyCommBuild.java that I'm using to test: > > > **************************************************************************** > import javax.comm.*; > import java.util.Enumeration; > /** > * A quick app to check that the javax.comm (Serial) Communications > extension has been properly > * installed and configured on this machine. > * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. > */ > public class VerifyCommBuild > { > public static void main(String args[]) > { > Enumeration ports; > System.out.println("Verifying Comm Build Environment"); > try > { > ports = CommPortIdentifier.getPortIdentifiers(); > if (ports == null) > { > System.out.println("No comm ports found!"); > return; > } > System.out.println("Some ports appear to have been found, let's > try to enumerate them."); > while (ports.hasMoreElements()) > { > System.out.println("Here is a port [" + > ((CommPortIdentifier)ports.nextElement()).getName() > + "]"); > } > } catch (Exception e) > { > System.out.println("Failed to enumerate ports [" + > e.getMessage() + "]"); > e.printStackTrace(); > } > System.out.println("Complete."); > } > } > Hi Jim This is a new one to me. Have you tried it on another system. Maybe something isnt sane in your toolchain. -- Trent Jarvi tarvi at qbang.org From eddythejekyll at gmail.com Sat Aug 12 11:45:39 2006 From: eddythejekyll at gmail.com (Ed) Date: Sat, 12 Aug 2006 11:45:39 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Trent, Right after I sent the results indicated below I re-ran the app and it apparently found the parallel port. The difference was that I set the permissions to : /dev: wildcard lp* crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 I'm still not sure how to interpret the dmesg and lsmod before. However I'm thinking that since the user now has permission to access the lp* port, a request to access it loaded the lp and parport modules automatically and allowed me access. Here's the output of lsmod now: ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp lp 5540 0 (autoclean) parport 21608 1 (autoclean) [parport_pc lp] and dmesg: ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp On node 0 totalpages: 161776 lp0: using parport0 (polling). So I think I'm good, and ready to move on the next steps. Thanks Trent! Ed On 8/12/06, Ed wrote: > > Thanks for the reply Trent. > > I'm on a different system today but am trying your suggestons. This is a > debian 3.1r2 system and I'm running jdk 1.5.0_04. > > Take a look below, but I think I have no parallel port support on this > kernel, however I never get the "No such device or address" return from the > cat call as you did so I'm not sure how to interpret the results. > > When I run the test program (PortChooser.java), the getPortIdentifiers > call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is > more than I found on the RedHat system. Incidently --disable-lockfiles has > no effect. > > It looks as though there is no parallel support in this kernel: > falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > On node 0 totalpages: 161776 > falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > > I'm a little confused by the results when I cat to the lp0 device. It > seems from the dmesg output that I don't have parallel printer support, but > when I cat to the lp0 device, I get permission denied if I'm non-root user > and input/output error if I'm root. Apparently this means I have the device, > but no support in the kernel? > > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > ed at falcon:~/src/workspace/EASServer/src$ su > Password: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > > Here's my lp* device permissions. > /dev: > wildcard lp* > crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > If I change it to > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I get: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > falcon:/home/ed/src/workspace/EASServer/src# exit > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > cat: /dev/lp0: Input/output error > ed at falcon:~/src/workspace/EASServer/src$ > > What do you think? Should I recompile the kernel or is it something else? > > By the way, I added the user ed to the lp and uucp groups on this system. > > Thanks again, > > Ed > > On 8/11/06, Trent Jarvi wrote: > > > > On Fri, 11 Aug 2006, Ed wrote: > > > > > I'm trying to read and write a parallel port on a standard (Dell) pc > > running > > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > > gates. > > > > > > I'm having problems getting rxtx to return a port enumeration from > > > getPortIdentifiers. I'm using a file > > > PortChooser.java as a test file to get things going. This is from the > > Java > > > CookBook 2nd edition (Chapter 12). The call > > > > > > // get list of ports available on this particular computer, > > > // by calling static method in CommPortIdentifier. > > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > > > > > returns a null pList; > > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure > > and > > > compile without --disable-lockfiles I get: > > > > > > Stable Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7 > > > Java lib Version = RXTX-2.1-7 > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > ... > > > > > > When I compile with --disable-lockfiles the call to getPortIdentifiers > > > > > simply returns a null Enumeration. > > > > > > I've read the documention and threads about this issue and I feel like > > I've > > > tried everything, so at the moment I'm stumped. > > > > > > I can supply any further info that may help. > > > > > > Thanks in advance. > > > > > > Ed > > > > > > > Hi Ed > > > > You may want to check the permissions of /dev/lp*. Also make sure lp or > > your kernel support for lp is loaded. It should show up in dmesg and > > lsmod. > > > > For my laptop with no printer port enabled in BIOS is see: > > > > lp: driver loaded but no devices found > > > > in desg |grep lp > > > > [] $ ls -l /dev/lp* > > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > here root and group lp can read and write. Normal users cannot. > > > > Try a simple read as a user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > > > > Fix as root > > > > [] chmod 666 /dev/lp* > > [] $ ls -l /dev/lp* > > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > Now as user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: No such device or address > > > > So this is saying there is no lp0 on my laptop. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > > > -- > > Ed > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060812/c2afe1f8/attachment.html From tjarvi at qbang.org Sat Aug 12 14:01:52 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 12 Aug 2006 14:01:52 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Remember that the lp code expects a printer - or something like it. There is a line that specifies the printer is online. If you are doing hobby work, you will need to raise that line or loop it back to something that is raised. If you just try reading a port with no device connected and online, there will be an error while trying to read. This should be addressed in the mail-list archives. On Sat, 12 Aug 2006, Ed wrote: > Trent, > Right after I sent the results indicated below I re-ran the app and it > apparently found the parallel port. The difference was that I set the > permissions to : > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I'm still not sure how to interpret the dmesg and lsmod before. However I'm > thinking that since the user now has permission to access the lp* port, a > request to access it loaded the lp and parport modules automatically and > allowed me access. Here's the output of lsmod now: > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > lp 5540 0 (autoclean) > parport 21608 1 (autoclean) [parport_pc lp] > > and dmesg: > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > On node 0 totalpages: 161776 > lp0: using parport0 (polling). > > So I think I'm good, and ready to move on the next steps. > > Thanks Trent! > > Ed > > > On 8/12/06, Ed wrote: >> >> Thanks for the reply Trent. >> >> I'm on a different system today but am trying your suggestons. This is a >> debian 3.1r2 system and I'm running jdk 1.5.0_04. >> >> Take a look below, but I think I have no parallel port support on this >> kernel, however I never get the "No such device or address" return from the >> cat call as you did so I'm not sure how to interpret the results. >> >> When I run the test program (PortChooser.java), the getPortIdentifiers >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is >> more than I found on the RedHat system. Incidently --disable-lockfiles has >> no effect. >> >> It looks as though there is no parallel support in this kernel: >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp >> On node 0 totalpages: 161776 >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp >> >> I'm a little confused by the results when I cat to the lp0 device. It >> seems from the dmesg output that I don't have parallel printer support, but >> when I cat to the lp0 device, I get permission denied if I'm non-root user >> and input/output error if I'm root. Apparently this means I have the >> device, >> but no support in the kernel? >> >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> >> cat: /dev/lp0: Permission denied >> ed at falcon:~/src/workspace/EASServer/src$ su >> Password: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> >> Here's my lp* device permissions. >> /dev: >> wildcard lp* >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> If I change it to >> /dev: >> wildcard lp* >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> I get: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> falcon:/home/ed/src/workspace/EASServer/src# exit >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> ed at falcon:~/src/workspace/EASServer/src$ >> >> What do you think? Should I recompile the kernel or is it something else? >> >> By the way, I added the user ed to the lp and uucp groups on this system. >> >> Thanks again, >> >> Ed >> >> On 8/11/06, Trent Jarvi wrote: >> > >> > On Fri, 11 Aug 2006, Ed wrote: >> > >> > > I'm trying to read and write a parallel port on a standard (Dell) pc >> > running >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the >> > gates. >> > > >> > > I'm having problems getting rxtx to return a port enumeration from >> > > getPortIdentifiers. I'm using a file >> > > PortChooser.java as a test file to get things going. This is from the >> > Java >> > > CookBook 2nd edition (Chapter 12). The call >> > > >> > > // get list of ports available on this particular computer, >> > > // by calling static method in CommPortIdentifier. >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); >> > > >> > > returns a null pList; >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure >> > and >> > > compile without --disable-lockfiles I get: >> > > >> > > Stable Library >> > > ========================================= >> > > Native lib Version = RXTX-2.1-7 >> > > Java lib Version = RXTX-2.1-7 >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > ... >> > > >> > > When I compile with --disable-lockfiles the call to getPortIdentifiers >> > >> > > simply returns a null Enumeration. >> > > >> > > I've read the documention and threads about this issue and I feel like >> > I've >> > > tried everything, so at the moment I'm stumped. >> > > >> > > I can supply any further info that may help. >> > > >> > > Thanks in advance. >> > > >> > > Ed >> > > >> > >> > Hi Ed >> > >> > You may want to check the permissions of /dev/lp*. Also make sure lp or >> > your kernel support for lp is loaded. It should show up in dmesg and >> > lsmod. >> > >> > For my laptop with no printer port enabled in BIOS is see: >> > >> > lp: driver loaded but no devices found >> > >> > in desg |grep lp >> > >> > [] $ ls -l /dev/lp* >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > here root and group lp can read and write. Normal users cannot. >> > >> > Try a simple read as a user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: Permission denied >> > >> > Fix as root >> > >> > [] chmod 666 /dev/lp* >> > [] $ ls -l /dev/lp* >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > Now as user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: No such device or address >> > >> > So this is saying there is no lp0 on my laptop. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > >> >> >> >> -- >> >> Ed >> > > > > From pete.flugstad at gmail.com Mon Aug 14 07:51:41 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 08:51:41 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: <84d4a6d50608140651h3cb2266ap90c47780abace00@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > On Fri, 11 Aug 2006, Pete Flugstad wrote: > > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > > but there doesn't appear to be a way to select that via RXTX (which > > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > > is selected). > > I'm guessing I didn't know the difference. At the time, I really didn't > have windows API documentation. I just had some pages I found with > altivista/google. Later microsoft made their documentation available on > msdn or I learned about it. > > For rxtx, the calls need to be platform neutral. So if you see how to do > each in termios, then we can get it going. so, RTSCTS_IN/OUT at the COMM API is mapped to HARDWARE_FLOW_CONTROL in the POSIX layer. Which termios.c maps to RTS_CONTROL_HANDSHAKE and fOutxCtsFlow = true. Since termios.c is Windows only anway... Would it work to change the mapping in termios.c to map hardware flow control to RTS_CONTROL_TOGGLE? I just wondering (I'm going to go look, but there's a lot of code in there) if the code does anything special playing with flow control signals? Thanks, Pete From pete.flugstad at gmail.com Mon Aug 14 09:42:48 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 10:42:48 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> On 8/3/06, Trent Jarvi wrote: > On Thu, 3 Aug 2006, Pete Flugstad wrote: > > Okay, I can understand that, but from the PORTMON output, it looks > > like it's opening each port TWICE: > > I think this problem is in RXTXCommDriver.java. I've just not tracked it > down but it should be in the java code, not the native code so easy > enough to track down. Okay, I'm trying to track this down... Looks like the CommPortIdentifier static initializer loads RXTXCommDriver, and then calls RXTXDriver.initialize. But then CommPortIdentifier.getPortIdentifiers does the exact same thing. So that's where the two scans are coming from. I would guess that one or the other can be removed? Probably the one in the CommPortIdentifier.getPortIdentifiers? Doing so removes the 2nd scan. Pete PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) val = System.getProperty("gnu.io.SerialPorts"); Shouldn't the comparison be != null? getProperty returns null if the variable is NOT found, and you only want to assign to val if it IS found, right? Same thing for the parallel port case. End result is the same I guess, since you check for null later, but probably should be fixed. From eddythejekyll at gmail.com Mon Aug 14 11:55:17 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 11:55:17 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: When I try to get the mode with int mode = pPort.getMode(); it returns 0 which isn't any of the valid modes. I tried setting it explicitely with pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced the requested mode in nativeSetSerialPortParams at gnu.io.LPRPort.setLPRMode(Native Method) at gnu.io.LPRPort.setMode(LPRPort.java:87) Except for LPT_MODE_ANY, but the getMode call still failed out with an invalid state. I'm wondering if it's because I don't have the line pulled high like you said. This isn't a printer connected. It's a relay board with pins 2-9 tied to data, and 18-25 to gnd. The rest are open. I looked at a DB25 pinout diagram and I'm not sure which pin I need to tie high, and I looked through the archives, but didn't find a reference to something definitive. Can someone help me with which pin is the "online" pin as Trent mentioned? DB25 spec has ( I hope this formats correctly in this email) BUSY (11), SEL (13) or INIT (16) are candidates, but I'm guessing. Any clues? *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Thanks, Ed On 8/12/06, Trent Jarvi wrote: > > > Remember that the lp code expects a printer - or something like it. There > is a line that specifies the printer is online. If you are doing hobby > work, you will need to raise that line or loop it back to something that > is raised. > > If you just try reading a port with no device connected and online, there > will be an error while trying to read. This should be addressed in the > mail-list archives. > > On Sat, 12 Aug 2006, Ed wrote: > > > Trent, > > Right after I sent the results indicated below I re-ran the app and it > > apparently found the parallel port. The difference was that I set the > > permissions to : > > /dev: > > wildcard lp* > > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > > > I'm still not sure how to interpret the dmesg and lsmod before. However > I'm > > thinking that since the user now has permission to access the lp* port, > a > > request to access it loaded the lp and parport modules automatically and > > allowed me access. Here's the output of lsmod now: > > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > > lp 5540 0 (autoclean) > > parport 21608 1 (autoclean) [parport_pc lp] > > > > and dmesg: > > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > > On node 0 totalpages: 161776 > > lp0: using parport0 (polling). > > > > So I think I'm good, and ready to move on the next steps. > > > > Thanks Trent! > > > > Ed > > > > > > On 8/12/06, Ed wrote: > >> > >> Thanks for the reply Trent. > >> > >> I'm on a different system today but am trying your suggestons. This is > a > >> debian 3.1r2 system and I'm running jdk 1.5.0_04. > >> > >> Take a look below, but I think I have no parallel port support on this > >> kernel, however I never get the "No such device or address" return from > the > >> cat call as you did so I'm not sure how to interpret the results. > >> > >> When I run the test program (PortChooser.java), the getPortIdentifiers > >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this > is > >> more than I found on the RedHat system. Incidently --disable-lockfiles > has > >> no effect. > >> > >> It looks as though there is no parallel support in this kernel: > >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > >> On node 0 totalpages: 161776 > >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > >> > >> I'm a little confused by the results when I cat to the lp0 device. It > >> seems from the dmesg output that I don't have parallel printer support, > but > >> when I cat to the lp0 device, I get permission denied if I'm non-root > user > >> and input/output error if I'm root. Apparently this means I have the > >> device, > >> but no support in the kernel? > >> > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> > >> cat: /dev/lp0: Permission denied > >> ed at falcon:~/src/workspace/EASServer/src$ su > >> Password: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> > >> Here's my lp* device permissions. > >> /dev: > >> wildcard lp* > >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> If I change it to > >> /dev: > >> wildcard lp* > >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> I get: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> falcon:/home/ed/src/workspace/EASServer/src# exit > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> ed at falcon:~/src/workspace/EASServer/src$ > >> > >> What do you think? Should I recompile the kernel or is it something > else? > >> > >> By the way, I added the user ed to the lp and uucp groups on this > system. > >> > >> Thanks again, > >> > >> Ed > >> > >> On 8/11/06, Trent Jarvi wrote: > >> > > >> > On Fri, 11 Aug 2006, Ed wrote: > >> > > >> > > I'm trying to read and write a parallel port on a standard (Dell) > pc > >> > running > >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > >> > gates. > >> > > > >> > > I'm having problems getting rxtx to return a port enumeration from > >> > > getPortIdentifiers. I'm using a file > >> > > PortChooser.java as a test file to get things going. This is from > the > >> > Java > >> > > CookBook 2nd edition (Chapter 12). The call > >> > > > >> > > // get list of ports available on this particular computer, > >> > > // by calling static method in CommPortIdentifier. > >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > >> > > > >> > > returns a null pList; > >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I > configure > >> > and > >> > > compile without --disable-lockfiles I get: > >> > > > >> > > Stable Library > >> > > ========================================= > >> > > Native lib Version = RXTX-2.1-7 > >> > > Java lib Version = RXTX-2.1-7 > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > ... > >> > > > >> > > When I compile with --disable-lockfiles the call to > getPortIdentifiers > >> > > >> > > simply returns a null Enumeration. > >> > > > >> > > I've read the documention and threads about this issue and I feel > like > >> > I've > >> > > tried everything, so at the moment I'm stumped. > >> > > > >> > > I can supply any further info that may help. > >> > > > >> > > Thanks in advance. > >> > > > >> > > Ed > >> > > > >> > > >> > Hi Ed > >> > > >> > You may want to check the permissions of /dev/lp*. Also make sure lp > or > >> > your kernel support for lp is loaded. It should show up in dmesg and > >> > lsmod. > >> > > >> > For my laptop with no printer port enabled in BIOS is see: > >> > > >> > lp: driver loaded but no devices found > >> > > >> > in desg |grep lp > >> > > >> > [] $ ls -l /dev/lp* > >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > here root and group lp can read and write. Normal users cannot. > >> > > >> > Try a simple read as a user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: Permission denied > >> > > >> > Fix as root > >> > > >> > [] chmod 666 /dev/lp* > >> > [] $ ls -l /dev/lp* > >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > Now as user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: No such device or address > >> > > >> > So this is saying there is no lp0 on my laptop. > >> > > >> > -- > >> > Trent Jarvi > >> > tjarvi at qbang.org > >> > > >> > >> > >> > >> -- > >> > >> Ed > >> > > > > > > > > > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/59164078/attachment.html From eddythejekyll at gmail.com Mon Aug 14 14:19:58 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 14:19:58 -0600 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? Message-ID: I'm using the ParallelPort class to drive a relay board. According to Mr. Jarvi, since this board isn't a printer, there will be a read error unless I hold the "printer online" line high in order to make the API think I'm talking to a printer. The problem is, I can't figure out which line is the "printer online". My DB25 spec lists the following: *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Anyone know which one I should tie high? I tried the busy line and it still errored out on the read. Thanks in advance, -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/66cf3c3e/attachment.html From tjarvi at qbang.org Mon Aug 14 18:06:29 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:06:29 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Mon, 14 Aug 2006, Ed wrote: > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > which isn't any of the valid modes. I tried setting it explicitely with > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced > the requested mode in nativeSetSerialPortParams > at gnu.io.LPRPort.setLPRMode(Native Method) > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > invalid state. This is because rxtx only supports the basics. JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } One could program in more support. When I did that I just had a daisy wheel printer to test with and doing any more would have been blind. So that behavior is expected. I'll look to see if the Parallel Complete book mentions which pins you need to raise. If you look in the source code [ParallelImp.c] you can see this code isn't well tested. It has worked for hobby use in the past as I'd guess you are trying to do. But my experience with the code is as is mentioned in the top of the source: /* fear he who enter here. It appears that things have changed. An attempt has been made to put things the way the should be. It compiles and ParallelBlackBox runs. No further guarantees. Well... One.. it will print "Hello World!" on an epson DX 10 printer. you know.. the 10 character per second daisy wheel printer ;) - Trent Jarvi */ That comment is from 1997 or so. Since then some windows support was contributed but it is still very green code. We get about four requests for parallel support a year so its just not a well traveled area. It would be nice to have some documentation for the people trying to hook parallel ports to electronic projects. That appears to be the exclusive use of the Parallel support. The wiki pages are intended to let people share information like this to help each other in their projects as they figure out the details. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Aug 14 18:40:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:40:40 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: > PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): > > if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) > val = System.getProperty("gnu.io.SerialPorts"); > > Shouldn't the comparison be != null? getProperty returns null if the > variable is NOT found, and you only want to assign to val if it IS > found, right? Same thing for the > parallel port case. End result is the same I guess, since you check > for null later, > but probably should be fixed. I think this is just a fallback to the second property. gnu.io.SerialPorts isn't documented but perhaps it is used. It should behave properly as documented in INSTALL. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 14 18:56:55 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 19:56:55 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: <44E11BD7.5030102@gmail.com> Trent Jarvi wrote: >> PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): >> >> if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) >> val = System.getProperty("gnu.io.SerialPorts"); >> > > I think this is just a fallback to the second property. > gnu.io.SerialPorts isn't documented but perhaps it is used. It should > behave properly as documented in INSTALL. Doh - yup, I missed the fact that the property names were different... Pete From berkland at spamcop.net Mon Aug 14 19:58:21 2006 From: berkland at spamcop.net (Doug Berkland) Date: Mon, 14 Aug 2006 21:58:21 -0400 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? In-Reply-To: References: Message-ID: <269e40090608141858g698c2579v8d962deca3f4df53@mail.gmail.com> Based on memory and this page as confirmation, I would say pin 13 is the "Online" pin for SPP (standard parallel port). http://www.quatech.com/support/comm-over-parallel.php On 8/14/06, Ed wrote: > > I'm using the ParallelPort class to drive a relay board. According to Mr. > Jarvi, since this board isn't a printer, there will be a read error unless I > hold the "printer online" line high in order to make the API think I'm > talking to a printer. The problem is, I can't figure out which line is the > "printer online". My DB25 spec lists the following: > > *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and > Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data > Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 > D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select > 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select > In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit > 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 > Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and > Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground > > Anyone know which one I should tie high? I tried the busy line and it > still errored out on the read. > > Thanks in advance, > > -- > Ed > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/842bb770/attachment.html From eddythejekyll at gmail.com Mon Aug 14 20:25:42 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 20:25:42 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Ah, I see. I've seen the caveats about limited Parallel support, but I thought it was mainly about the javax.comm package. The gnu.io is derived from javax.comm package right? That is, is the parallel support in rxtx is a superset of what's in javax.comm? I'm using this not for hobby usage, but for some simple instrumenation and control. If the project mandates it, I'll gladly work on extending the support. In the meantime, I need to get some sanity checks working, and repair my relay board (I smoked the ULN2803 chip, apparently by tying the BUSY (pin 11) to vcc). I guess I'll try the SEL pin next (and a supply of 2803s) with a ~1K pullup. The caveat in the comment block isn't very encouraging (!), but I borrowed an old Epson Stylus Color 600 printer to see what I can do. If I can write out characters to it I'll be happy. Parallel printers aren't easy to find these days. I haven't yet looked at the native source, yet, but I've just imported it into eclipse and I'll surf around a bit. Ed On 8/14/06, Trent Jarvi wrote: > > On Mon, 14 Aug 2006, Ed wrote: > > > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > > which isn't any of the valid modes. I tried setting it explicitely with > > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to > proced > > the requested mode in nativeSetSerialPortParams > > at gnu.io.LPRPort.setLPRMode(Native Method) > > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > > invalid state. > > This is because rxtx only supports the basics. > > JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > jclass jclazz, jint mode) > { > switch(mode) > { > case LPT_MODE_ANY: > break; > case LPT_MODE_SPP: > case LPT_MODE_PS2: > case LPT_MODE_EPP: > case LPT_MODE_ECP: > case LPT_MODE_NIBBLE: > default: > throw_java_exception( env, > UNSUPPORTED_COMM_OPERATION, > "nativeSetSerialPortParams", > "setLPRMode was unable to proced the > requested \ > mode" > ); > } > return(JNI_TRUE); > } > > One could program in more support. When I did that I just had a daisy > wheel printer to test with and doing any more would have been blind. > > So that behavior is expected. I'll look to see if the Parallel Complete > book mentions which pins you need to raise. If you look in the source > code [ParallelImp.c] you can see this code isn't well tested. It has > worked for hobby use in the past as I'd guess you are trying to do. But > my experience with the code is as is mentioned in the top of the source: > > /* > fear he who enter here. It appears that things have changed. An > attempt > has been made to put things the way the should be. > > It compiles and ParallelBlackBox runs. No further guarantees. > > Well... One.. it will print "Hello World!" on an epson DX 10 > printer. > you know.. the 10 character per second daisy wheel printer ;) > > - Trent Jarvi > */ > > That comment is from 1997 or so. > > Since then some windows support was contributed but it is still very green > code. We get about four requests for parallel support a year so its just > not a well traveled area. > > It would be nice to have some documentation for the people trying to hook > parallel ports to electronic projects. That appears to be the exclusive > use of the Parallel support. The wiki pages are intended to let people > share information like this to help each other in their projects as they > figure out the details. > > -- > Trent Jarvi > tjarvi at qbang.org > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/fbb5ddb4/attachment.html From lyon at docjava.com Tue Aug 15 06:06:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 15 Aug 2006 08:06:27 -0400 Subject: [Rxtx] smoking is bad for your health In-Reply-To: References: Message-ID: Hi All, If you are connecting to the parallel port and smoking chips, it is time for extra stuff to buffer the parallel port. You may be want more current, in which case driver transistors are needed, or, if you are using the port as an output only device, you may like to add your own bus transceiver (e.g., 74245), set for output. Do be careful to design this properly; http://www.beyondlogic.org/spp/parallel.htm Some people like to use Octal D-type F.F's with OC outputs, like a 74374, http://upgrade.cntc.ac.kr/data/ttl/74374.html I like this one, as it has the D FF's and can latch the outputs for presentation to slower electronics (like relays). But careful! A relay that needs more current than the family of the device you have selected will look like a short to ground, and you will smoke your bug! And MOBO's do NOT come with the ability to drive any load you like. Check the power specs on your relay and be sure to protect the chip against back EMF with a diode. It is best to smoke test this on a bread board BEFORE hooking it to the computer. And be sure you smoke test the corner points in the ckt for a while, lest it fail in the field. - Doug >Ah, I see. I've seen the caveats about limited >Parallel support, but I thought it was mainly >about the javax.comm package. The >gnu.io is derived from javax.comm >package right? That is, is the parallel support >in rxtx is a superset of what's in javax.comm? > >I'm using this not for hobby usage, but for some >simple instrumenation and control. If the >project mandates it, I'll gladly work on >extending the support. In the meantime, I need >to get some sanity checks working, and repair my >relay board (I smoked the ULN2803 chip, >apparently by tying the BUSY (pin 11) to vcc). I >guess I'll try the SEL pin next (and a supply of >2803s) with a ~1K pullup. > >The caveat in the comment block isn't very >encouraging (!), ?but?I borrowed an old Epson >Stylus Color 600 printer to see what I can do. >?If I can write out characters to it I'll be >happy. Parallel printers aren't easy to find >these days. > > I haven't yet looked at the native source, yet, >but I've just imported it into eclipse and I'll >surf around a bit. > >Ed > >On 8/14/06, Trent Jarvi <tjarvi at qbang.org> wrote: > >On Mon, 14 Aug 2006, Ed wrote: > >> When I try to get the mode with int mode = pPort.getMode(); it returns 0 >> which isn't any of the valid modes. I tried setting it explicitely with >> pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with >> >> gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced >> the requested mode in nativeSetSerialPortParams >> at gnu.io.LPRPort.setLPRMode(Native Method) >> at gnu.io.LPRPort.setMode(LPRPort.java:87) >> >> Except for LPT_MODE_ANY, but the getMode call still failed out with an >> invalid state. > >This is because rxtx only supports the basics. > >JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > ???????jclass jclazz, jint mode) >{ > ???????switch(mode) > ???????{ > ???????????????case LPT_MODE_ANY: > ???????????????????????break; > ???????????????case LPT_MODE_SPP: > ???????????????case LPT_MODE_PS2: > ???????????????case LPT_MODE_EPP: > ???????????????case LPT_MODE_ECP: > ???????????????case LPT_MODE_NIBBLE: > ???????????????default: > ???????????????????????throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, > ???????????????????????????????"nativeSetSerialPortParams", > ???????????????????????????????"setLPRMode was >unable to proced the requested \ > ???????????????????????????????mode" > ???????????????????????); > ???????} > ???????return(JNI_TRUE); >} > >One could program in more support.??When I did that I just had a daisy >wheel printer to test with and doing any more would have been blind. > >So that behavior is expected.??I'll look to see if the Parallel Complete >book mentions which pins you need to raise.??If you look in the source >code [ParallelImp.c] you can see this code isn't well tested.??It has >worked for hobby use in the past as I'd guess you are trying to do.??But >my experience with the code is as is mentioned in the top of the source: > >/* > fear he who enter here.??It appears that things have changed.??An attempt > has been made to put things the way the should be. > > ???????It compiles and ParallelBlackBox runs.??No further guarantees. > > ???????Well... One.. it will print "Hello World!" on an epson DX 10 printer. > ???????you know.. the 10 character per second daisy wheel printer ;) > > ???????- Trent Jarvi >*/ > >That comment is from 1997 or so. > >Since then some windows support was contributed but it is still very green >code.??We get about four requests for parallel support a year so its just >not a well traveled area. > >It would be nice to have some documentation for the people trying to hook >parallel ports to electronic projects.??That appears to be the exclusive >use of the Parallel support.??The wiki pages are intended to let people >share information like this to help each other in their projects as they >figure out the details. > >-- >Trent Jarvi >tjarvi at qbang.org > > > > >-- >Ed > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 15 13:26:16 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 15 Aug 2006 14:26:16 -0500 Subject: [Rxtx] crash with too much memory Message-ID: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded from qbang.org. I'm exercising the RXTX COMM serial interface, both in a small standalone test and with the same code pulled into a large OSGI framework setup. If I use the stock .jar/.dll's, then everything works correctly in both situations. I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 (mingw-special)). If I use my locally built version, then my small test case works just fine, both when run inside Eclipse and when run standalone on the command line. However, when I try and use my locally built .jar/.dll's in the large framework environment, then I get a JVM crash with the attached log. Normally this would lead me to think that I was running out of memory or something in the large environment, and when I try and play with the JVM memory args, some interesting things show up. In our large environment, we have -Xms32M/-Xmx1024M - this appears to be the problem. If I set max to something like 64M, then things work. The cross over point from working to failing seems to be around 32M/110M (works) and 32M/111M (fails). But 128M/128M works while 128M/129M fails. So it seems to have to do with how much memory is actually available, or something like that. The thing that occurs to me is if my GCC is somehow generating something like "near" calls. But when the JVM has a lot of RAM available, it puts the DLL up somehwere in the address space and then the near calls fail - far calls are needed. So, I'm thinking this is probably a difference in the MinGW GCC I'm using and the one that was used to build the stock binaries from qbang, or maybe some command line args were changed? So, I'm hoping someone will have an idea of what's going on here... Thanks, Pete From tjarvi at qbang.org Tue Aug 15 18:54:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 15 Aug 2006 18:54:04 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: On Tue, 15 Aug 2006, Pete Flugstad wrote: > I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded > from qbang.org. > > I'm exercising the RXTX COMM serial interface, both in a small > standalone test and with the same code pulled into a large OSGI > framework setup. > > If I use the stock .jar/.dll's, then everything works correctly in > both situations. > > I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 > (mingw-special)). > > If I use my locally built version, then my small test case works just > fine, both when run inside Eclipse and when run standalone on the > command line. However, when I try and use my locally built > .jar/.dll's in the large framework environment, then I get a JVM crash > with the attached log. > > Normally this would lead me to think that I was running out of memory > or something in the large environment, and when I try and play with > the JVM memory args, some interesting things show up. > > In our large environment, we have -Xms32M/-Xmx1024M - this appears to > be the problem. If I set max to something like 64M, then things work. > The cross over point from working to failing seems to be around > 32M/110M (works) and 32M/111M (fails). > But 128M/128M works while 128M/129M fails. So it seems to have to do > with how much memory is actually available, or something like that. > > The thing that occurs to me is if my GCC is somehow generating > something like "near" calls. But when the JVM has a lot of RAM > available, it puts the DLL up somehwere in the address space and then > the near calls fail - far calls are needed. > > So, I'm thinking this is probably a difference in the MinGW GCC I'm > using and the one that was used to build the stock binaries from > qbang, or maybe some command line args were changed? > > So, I'm hoping someone will have an idea of what's going on here... > Hi Pete The binaries are from the src. They should be reproducable. I did extensive testing of rxtx several years ago using mingw as the compiler. The version was 2.95. I have not changed versions since. There are way too many variables as it is. I have a linux->mingw cross compiler rpm I use for all windows use. If you want a copy of it you can have it. It isn't anything 'special' :) -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Thu Aug 17 11:49:24 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 17 Aug 2006 12:49:24 -0500 Subject: [Rxtx] crash with too much memory In-Reply-To: References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> On 8/15/06, Trent Jarvi wrote: > I did extensive testing of rxtx several years ago using mingw as the > compiler. The version was 2.95. I have not changed versions since. > There are way too many variables as it is. FYI, I believe I've solved this problem by changing how the dll's were built. The original mingw makefile was generating Serial.def, then performing various operations with dlltool and ld. I modified the makefile to create the dll using this page: as a guide. With that, there's no longer any need to deal with Serial.def and the makefile becomes _much_ simpler. This appears to have addressed my problems with crashing. FWIW, GCC 2.95 is _really_ old - you should consider investigating upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is supposed to generate a native binary (i.e. just like MinGW). Thanks, Pete From claretlc at yahoo.com Thu Aug 17 12:34:48 2006 From: claretlc at yahoo.com (Clare Cooley) Date: Thu, 17 Aug 2006 11:34:48 -0700 (PDT) Subject: [Rxtx] parallel port communication Message-ID: <20060817183448.76911.qmail@web53908.mail.yahoo.com> Hi, I'm trying to write a 1 to a bit 15 on a parallel port cable that isn't attached to a printer.(It's a control box for eye-tracking equipment.)I need to do this in Java. I looked at the javax.comm documentation, and it said, "Application programs should not directly create ParallelPortEvent objects." So is there a way to do this with your package? If not, do you have any suggestions of where to look? It really needs to be done in Java. Thanks, Clare Cooley __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From pat at xvalheru.org Thu Aug 17 13:13:52 2006 From: pat at xvalheru.org (pat) Date: Thu, 17 Aug 2006 21:13:52 +0200 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060817190751.M5586@xvalheru.org> Hi there, I've question(s) for you. I need to communicate with scale, I've used the Sun's direver. Now I've switched to Rxtx and the speed of the communication is perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, but the difference between the crash time is 5 second ... . My question is: Is there a stable driver ??? Or what I have to do to have stable enough serial port driver ??? OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. Thanks to all for the help. Pat From tjarvi at qbang.org Fri Aug 18 05:13:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 05:13:42 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> Message-ID: On Thu, 17 Aug 2006, Pete Flugstad wrote: > On 8/15/06, Trent Jarvi wrote: >> I did extensive testing of rxtx several years ago using mingw as the >> compiler. The version was 2.95. I have not changed versions since. >> There are way too many variables as it is. > > FWIW, GCC 2.95 is _really_ old - you should consider investigating > upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is > supposed to generate a native binary (i.e. just like MinGW). > It is really old but also well known like C itself. I have considered upgrading. The ToyBox builds should be gcc 3* cross-compiled. I'm not going to be validating gcc 3* w32 binaries though. It's looking like we will need to focus support on MSFT's toolchain for 64 bit windows support until it is possible for gcc to support w64. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Aug 18 05:32:10 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 07:32:10 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: Hi All, Does anyone know how to produce mac intel binaries on a Fedora Linux box? Thanks! - Doug From tjarvi at qbang.org Fri Aug 18 06:42:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 06:42:05 -0600 (MDT) Subject: [Rxtx] cross compilation for the mac In-Reply-To: References: Message-ID: On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Does anyone know how to produce > mac intel binaries on a Fedora Linux > box? > > Thanks! > - Doug Hi Doug You need to build the cross toolchain which means copying the Darwin/Mac binaries over to fedora. It would be nontrivial but possible. Do the Darwin libraries work with Mac in general? I'm not aware of the licensing issues associated with grabbing Mac binaries. Same with OpenSolaris/Solaris. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Aug 18 08:15:26 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 10:15:26 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> In theory building against Darwin would be sufficient to getting things working on MacOS X. You need to remember that Darwin is the low-level OS, while MacOS X adds the everything else on top. IOKit, which is the I/O API, is available as part of Darwin. The only thing you will need extra are the Java libraries. One thing is that I would recommend that when producing binaries for the Mac, is to ensure they are Universal binaries (PPC+Intel). Andre > > From: Trent Jarvi > Date: 2006/08/18 Fri AM 08:42:05 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] cross compilation for the mac > > On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > > > Hi All, > > Does anyone know how to produce > > mac intel binaries on a Fedora Linux > > box? > > > > Thanks! > > - Doug > > Hi Doug > > You need to build the cross toolchain which means copying the Darwin/Mac > binaries over to fedora. It would be nontrivial but possible. > > Do the Darwin libraries work with Mac in general? I'm not aware of the > licensing issues associated with grabbing Mac binaries. > > Same with OpenSolaris/Solaris. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Aug 18 13:43:16 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 15:43:16 -0400 Subject: [Rxtx] cross compilation for the mac In-Reply-To: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: >In theory building against Darwin would be sufficient to getting >things working on MacOS X. You need to remember that Darwin is the >low-level OS, while MacOS X adds the everything else on top. IOKit, >which is the I/O API, is available as part of Darwin. The only thing >you will need extra are the Java libraries. > >One thing is that I would recommend that when producing binaries for >the Mac, is to ensure they are Universal binaries (PPC+Intel). > >Andre I find the xcode ide for generating a mix of universal binaries and java very difficult to make work. Is there a way to do this with make files? Thanks! - Doug From ajmas at sympatico.ca Fri Aug 18 13:54:55 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 15:54:55 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818195455.PGAP29052.tomts13-srv.bellnexxia.net@smtp1.sympatico.ca> It should be doable. XCode hands off the compilation process to gcc et al, for the compilation of C/C++ code and to javac et al. for the Java side. While ant is the favoured tool for 'automated' Java compilation, make can easily be used. All is needed is someone to volounteer to do the work. Andre "Dr. Douglas Lyon" wrote > > >In theory building against Darwin would be sufficient to getting > >things working on MacOS X. You need to remember that Darwin is the > >low-level OS, while MacOS X adds the everything else on top. IOKit, > >which is the I/O API, is available as part of Darwin. The only thing > >you will need extra are the Java libraries. > > > >One thing is that I would recommend that when producing binaries for > >the Mac, is to ensure they are Universal binaries (PPC+Intel). > > > >Andre > > I find the xcode ide for generating a mix of universal binaries > and java very difficult to make work. Is there a way to do this > with make files? > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Fri Aug 18 16:34:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 16:34:46 -0600 (MDT) Subject: [Rxtx] serial driver newbe question and problem In-Reply-To: <20060817190751.M5586@xvalheru.org> References: <20060817190751.M5586@xvalheru.org> Message-ID: On Thu, 17 Aug 2006, pat wrote: > Hi there, > > I've question(s) for you. I need to communicate with scale, I've used the > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > but the difference between the crash time is 5 second ... . > > My question is: Is there a stable driver ??? Or what I have to do to have > stable enough serial port driver ??? > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > Thanks to all for the help. > > Pat > Could you describe the hardware you have, the version of rxtx and provide the log of the crash? Did you download binaries? I've not been seeing a jvm crash with rxtx -- Trent Jarvi tjarvi at qbang.org From lunareclipse03 at web.de Sat Aug 19 12:11:48 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 19 Aug 2006 20:11:48 +0200 Subject: [Rxtx] Problem solved! Message-ID: <920065539@web.de> Hi everybody, I posted some months ago and asked about some help on my very special problem concerning my win32 port of a communications library. Now I just want to inform you that no further "mindstorming" is needed because I solved the problem by completely rewriting the win32 port of the library. Now everything works fine. Thank you all for your time and patience. --Sven Ahlemann __________________________________________________________________________ Erweitern Sie FreeMail zu einem noch leistungsst?rkeren E-Mail-Postfach! Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131 From ajmas at sympatico.ca Mon Aug 21 09:58:23 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 21 Aug 2006 11:58:23 -0400 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060821155823.TLSM18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Next time that happens, including a copy of the crash log, produced by Windows could probably help too. Andre Trent Jarvi wrote: > > On Thu, 17 Aug 2006, pat wrote: > > > Hi there, > > > > I've question(s) for you. I need to communicate with scale, I've used the > > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > > but the difference between the crash time is 5 second ... . > > > > My question is: Is there a stable driver ??? Or what I have to do to have > > stable enough serial port driver ??? > > > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > > > Thanks to all for the help. > > > > Pat > > > > Could you describe the hardware you have, the version of rxtx and > provide the log of the crash? Did you download binaries? > > I've not been seeing a jvm crash with rxtx > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From adrian.l.parker at gmail.com Thu Aug 24 09:10:39 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Thu, 24 Aug 2006 11:10:39 -0400 Subject: [Rxtx] Portability issues Message-ID: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use RXTX 2.0? Does it provide system librairies that javax.comm does not? I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, or 2000, or server 2003). Can this be done with a single implementation of RXTX? I don't want to have different versions of Java code that have different package names. References: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Message-ID: On Thu, 24 Aug 2006, Adrian Parker wrote: > Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use > RXTX 2.0? Does it provide system librairies that javax.comm does not? > > I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's > OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, > or 2000, or server 2003). Can this be done with a single implementation of > RXTX? I don't want to have different versions of Java code that have > different package names. > Hi Adrian. The native code can support all of the platforms you mention. I've never compiled for unixware or openunix but the patches are in the code. So you would need to compile for that target. >From there you would probably be best off going with rxtx 2.1 so you have all the classes in one package. You can opt to use rxtx 2.0 with Sun's commapi for Solaris v 2. The main differences are rxtx 2.1 comes with all the source/classes and is in package gnu.io while Sun's requires rxtx for some platforms but is in package javax.comm. The low level code is the same in either case as far as rxtx is concerned. -- Trent Jarvi tarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 04:12:52 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 06:12:52 -0400 Subject: [Rxtx] Serial.addEventListener bug? Message-ID: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on OpenServer 5.0.7). Its what Sun packages. I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an exception. It seems to throw the exception if no listener was previously declared (although I've not had chance to verify). Is this desireable behaviour? Sun's original API doesn't mention anything about an exception on this function, http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) Of course this is an old version of RXTX, so perhaps this has been changed. -- Adrian Parker Simulation Software Developer DLCSPM 4-4-3 (c) Building A31, CFB Kingston Tel: (613) 541-5010 x3020 CSN: 271-3020 Email: parker at lsec.dnd.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/22e2ea57/attachment.html From tjarvi at qbang.org Fri Aug 25 05:15:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 25 Aug 2006 05:15:44 -0600 (MDT) Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: On Fri, 25 Aug 2006, Adrian Parker wrote: > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > OpenServer 5.0.7). Its what Sun packages. > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > exception. It seems to throw the exception if no listener was previously > declared (although I've not had chance to verify). > > Is this desireable behaviour? Sun's original API doesn't mention anything > about an exception on this function, > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > Of course this is an old version of RXTX, so perhaps this has been changed. > > > What exception was thrown? You can replace 1.4-8 with 2.0 for testing purposes. They are the same package. I doubt Sun shipped or packaged that. I think Caldera/SCOx/... did at one point. There may still be updates on their pages. I recall them sending patches here which are in current rxtx. -- Trent Jarvi tjarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 05:28:32 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 07:28:32 -0400 Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: <7da71e910608250428q32b86632g9a67b1b4efe69830@mail.gmail.com> On 8/25/06, Trent Jarvi wrote: > > On Fri, 25 Aug 2006, Adrian Parker wrote: > > > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > > OpenServer 5.0.7). Its what Sun packages. > > > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > > exception. It seems to throw the exception if no listener was > previously > > declared (although I've not had chance to verify). > > > > Is this desireable behaviour? Sun's original API doesn't mention > anything > > about an exception on this function, > > > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > > > Of course this is an old version of RXTX, so perhaps this has been > changed. > > > > > > > > What exception was thrown? Its weird. I catch an Exception. But when on that exception I call getClass().getName() I end up with a NullPointerException. You can replace 1.4-8 with 2.0 for testing > purposes. They are the same package. > > I doubt Sun shipped or packaged that. Doh! I meant to say SCO sorry. I was surfing Sun's site when I wrote that :) Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/e43aed3a/attachment.html From sjudd at seas.upenn.edu Sat Aug 26 16:42:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Sat, 26 Aug 2006 18:42:09 -0400 Subject: [Rxtx] Mac commapi Message-ID: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? If so, where do I get it? Sun has various versions at http://www.sun.com/download/products.xml?id=43208d3d but they are for SolarisSparc, SolarisX86, Linux, and Generic. Do I use the Generic one? If so, read on; otherwise redirect me. While using the Generic version, my attempt to run the BlackBox sample program elicits a message saying it "can't find javax.comm.properties". I found a note in the rxtx.org HowTo (for Linux) saying to create this thing in /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties but where should it go on the Mac? After reading many versions of documentation around, and updates and revisions and re-authorings, I have worked my way into a state of confusion and high uncertainty. Please release me. sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060826/02d6b163/attachment.html From tod at todbot.com Sat Aug 26 17:08:33 2006 From: tod at todbot.com (Tod E. Kurt) Date: Sat, 26 Aug 2006 16:08:33 -0700 Subject: [Rxtx] Mac commapi In-Reply-To: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Message-ID: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> You don't need Sun's CommAPI. You just need RXTX. Once you download RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and the native library is ("librxtxSerial.jnilib" on Mac OS X) via the standard methods. For instance, if you've placed those two files in a directory called 'rxtxlib' and you want to run a Java class called HelloWorld in the current directory, do the following: % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar HelloWorld On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? > If so, where do I get it? Sun has various versions at > http://www.sun.com/download/products.xml?id=43208d3d > but they are for SolarisSparc, SolarisX86, Linux, and Generic. > Do I use the Generic one? > If so, read on; otherwise redirect me. > > While using the Generic version, my attempt to run the BlackBox > sample program > elicits a message saying it "can't find javax.comm.properties". > I found a note in the rxtx.org HowTo (for Linux) saying to create > this thing in > /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties > but where should it go on the Mac? > > After reading many versions of documentation around, and updates > and revisions > and re-authorings, I have worked my way into a state of confusion > and high > uncertainty. Please release me. > > sj > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From sjudd at seas.upenn.edu Sun Aug 27 22:55:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Mon, 28 Aug 2006 00:55:09 -0400 Subject: [Rxtx] Mac commapi In-Reply-To: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> Message-ID: This was immensely helpful. Thank you, Tod. I wish it had been explicit somewhere in the documentation; it would have saved me 2 days of grief. One hugely valuable thing like this little set of instructions is that it implicitly lists all the hundreds of things you DON"T have to do. I know it seems obvious to those in the know, but every little bit of help on an arcane topic like this opens up the product to an exponentially wider group of dilettantes. I managed to get the SerialDemo program (from Sun) to work too. Hurrah! However, it required changing all the javax.comm references to gnu.io which I had heard of due to all my rambling readings. Is there not a demo program on rxtx.org already available that would not have needed this? BTW, the link on the Projects page for jPIC[Source] sends a *.hex file to a PIC 16F877 or similar chip... takes me to nowhere useful. I do not understand what the name "Toybox" is meant to imply. Thanks, sj On 2006 Aug 26, at 7:08 PM, Tod E. Kurt wrote: > You don't need Sun's CommAPI. You just need RXTX. Once you download > RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and > the native library is ("librxtxSerial.jnilib" on Mac OS X) via the > standard methods. > > For instance, if you've placed those two files in a directory called > 'rxtxlib' and you want to run a Java class called HelloWorld in the > current directory, do the following: > > % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar > HelloWorld > > > On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > >> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? >> If so, where do I get it? Sun has various versions at >> http://www.sun.com/download/products.xml?id=43208d3d >> but they are for SolarisSparc, SolarisX86, Linux, and Generic. >> Do I use the Generic one? >> If so, read on; otherwise redirect me. >> >> While using the Generic version, my attempt to run the BlackBox >> sample program >> elicits a message saying it "can't find javax.comm.properties". >> I found a note in the rxtx.org HowTo (for Linux) saying to create >> this thing in >> /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties >> but where should it go on the Mac? >> >> After reading many versions of documentation around, and updates >> and revisions and re-authorings, I have worked my way into a state >> of confusion and high uncertainty. Please release me. >> >> sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060827/b80d6389/attachment.html From pete.flugstad at gmail.com Mon Aug 28 12:38:27 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 13:38:27 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE Message-ID: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Okay, my understanding is that originally, RTS meant "Request to Send" - the DTE (the PC) would assert this and the DCE (modem) would assert "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send data. This really only provided uni-directional flow control, from the PC to the modem. Now, as I understand it, the more modern usage of RTS is that it is used for the DTE to assert flow control back to the DCE - basically it means "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) raises this, then the DCE(modem) is free to send data to the DTE - this allows the DTE(PC) to exert flow control back towards the DCE(modem). This discussion is based on the Serial HOWTO from: and lots of other reading... Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which is defined as: > Enables RTS flow-control handshaking. The driver raises the RTS line, > enabling the DCE to send, when the input buffer has enough room to > receive data. The driver lowers the RTS line, preventing the DCE to > send, when the input buffer does not have enough room to receive > data. If this value is used, it is an error for the application to adjust > the line with EscapeCommFunction. which clearly reflects the newer usage style - it keeps the RTS line high as long as there is space to _receive_ data. And takes it low when the receive/input buffer is getting full to stop the modem from sending it data. Does this jive with other peoples understanding of RTS usage? Unfortunately, the hardware I'm trying to talk to wants to use the OLD style of RTS line usage. An existing Windows C++ program uses RTS_CONTROL_TOGGLE, which documentation states: > Specifies that the RTS line will be high if bytes are available for transmission. > After all buffered bytes have been sent, the RTS line will be low. If this value is > set, it would be an error for an application to adjust the line with > EscapeCommFunction. This value is ignored in Windows 95; it causes the > driver to act as if RTS_CONTROL_ENABLE were specified. This seems to be the OLD RTS behavior, right? So, what I seem to need is to be able to control the RTS line, either using TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS when getting ready to TX and clear it when the output buffer is empty). Does this make sense, or am I off in the weeds? Thanks, Pete From tjarvi at qbang.org Mon Aug 28 18:21:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 28 Aug 2006 18:21:10 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: On Mon, 28 Aug 2006, Pete Flugstad wrote: > Okay, my understanding is that originally, RTS meant "Request to Send" > - the DTE (the PC) would assert this and the DCE (modem) would assert > "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send > data. This really only provided uni-directional flow control, from the PC to > the modem. > > Now, as I understand it, the more modern usage of RTS is that it is used > for the DTE to assert flow control back to the DCE - basically it means > "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) > raises this, then the DCE(modem) is free to send data to the DTE - this > allows the DTE(PC) to exert flow control back towards the DCE(modem). > > This discussion is based on the Serial HOWTO from: > > > > and lots of other reading... > > Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > is defined as: > >> Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > > which clearly reflects the newer usage style - it keeps the RTS line high > as long as there is space to _receive_ data. And takes it low when the > receive/input buffer is getting full to stop the modem from sending it data. > > Does this jive with other peoples understanding of RTS usage? > > Unfortunately, the hardware I'm trying to talk to wants to use the OLD > style of RTS line usage. An existing Windows C++ program uses > RTS_CONTROL_TOGGLE, which documentation states: > >> Specifies that the RTS line will be high if bytes are available for transmission. >> After all buffered bytes have been sent, the RTS line will be low. If this value is >> set, it would be an error for an application to adjust the line with >> EscapeCommFunction. This value is ignored in Windows 95; it causes the >> driver to act as if RTS_CONTROL_ENABLE were specified. > > This seems to be the OLD RTS behavior, right? > > So, what I seem to need is to be able to control the RTS line, either using > TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS > when getting ready to TX and clear it when the output buffer is empty). > > Does this make sense, or am I off in the weeds? > Hi Pete OK. That sounds right. I do not know how you would communicate the difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through CommAPI as it stands. I take it you did not find anything either? Perhaps the best thing to do for your code is to toggle the RTS yourself. This could be a feature in the future JSR API perhaps. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 28 20:54:34 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 21:54:34 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <44F3AC6A.10908@gmail.com> Trent Jarvi wrote: > OK. That sounds right. I do not know how you would communicate the > difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through > CommAPI as it stands. I take it you did not find anything either? > > Perhaps the best thing to do for your code is to toggle the > RTS yourself. This could be a feature in the future JSR API perhaps. Yeah, this is what I ended up doing. I had to modify the dll in order to be able to set hardware flow control (which I do want), but leave the RTS flow control at RS_CONTROL_ENABLE. After that I just toggle setRTS(true) when I'm ready to send and setRTS(false) when I get a OUTPUT_BUFFER_EMPTY notification. Haven't tested with real hardware yet, but it seems to work OK. Thanks for the feedback! Pete From Bob_Jacobsen at lbl.gov Tue Aug 29 08:49:02 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 29 Aug 2006 07:49:02 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >is defined as: > > > Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > >which clearly reflects the newer usage style - it keeps the RTS line high >as long as there is space to _receive_ data. And takes it low when the >receive/input buffer is getting full to stop the modem from sending it data. > >Does this jive with other peoples understanding of RTS usage? Can you point to any devices that actually implement this "new" understanding? I think the person who wrote that documentation paragraph is just confused. The original "RTS/CTS" handshaking was extended to input (from DCE to DTE) handshaking via the DTR (Data Terminal Ready) line. I think the person who wrote the double-quoted paragraph above was just confused between the directions, and mixed them up. If you change "RTS" to "DTR" in that paragraph, you get: > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > enabling the DCE to send, when the input buffer has enough room to > > receive data. The driver lowers the DTR line, preventing the DCE to > > send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. which describes how dozens of devices actually work for controlling flow into the DTE (computer). This then leaves RTS/CTS (with RTS usually just stuck high) for controlling flow into the DCE (peripheral). Again, lots of hardware devices actually do this. I don't work on Windows, so can't be sure of what happens. But on the MacOS X version of RXTX, CTS low stops transmission, exactly as the "old" style would expect. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From mschned at basis.com Tue Aug 29 12:57:45 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 12:57:45 -0600 Subject: [Rxtx] Porting to AIX Message-ID: <01f201c6cb9d$034d4f20$341416ac@basis.com> Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar From mschned at basis.com Tue Aug 29 13:58:05 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 13:58:05 -0600 Subject: [Rxtx] Porting to AIX References: <01f201c6cb9d$034d4f20$341416ac@basis.com> Message-ID: <024901c6cba5$714c3560$341416ac@basis.com> After looking through the build messages closer, there is an error building SerialImp.c: gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type Looks like B57600 is not defined and there are no definitions for DEVICEDIR and LOCKDIR on AIX. Can I just a the following to SerialImp.h? #if defined(__aix__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __aix__ */ Mark Schnedar ----- Original Message ----- From: "Mark E. Schnedar" To: Sent: Tuesday, August 29, 2006 12:57 PM Subject: [Rxtx] Porting to AIX Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 29 15:25:35 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 29 Aug 2006 16:25:35 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <84d4a6d50608291425i1fb819d3i615cf9b85b1e9617@mail.gmail.com> On 8/29/06, Bob Jacobsen wrote: > Can you point to any devices that actually implement this "new" understanding? > > I think the person who wrote that documentation paragraph is just confused. The paragraph is from the Windows documentation of its DCB structure which is used to configure the Serial Device. This is what RXTX uses internally. My version is from MSDN, and Google finds the same text here: (search for fRtsControl). I have not seen any mention anywhere of it being incorrect (and yes, I did look, because I thought the same thing). My discussion is based on trying to use RXTX to talk to a device that used the old style of one-way flow control (RTS is raised to SEND data from the PC to the device). An existing VC++ app use the old-style RTS_CONTROL_TOGGLE. RXTX did not - it used the newer style RTS_CONTROL_HANDSHAKE, so things didn't work - the device was seeing RTS HIGH all the time, so it was thinking that the PC was ready to TX all the time. When I switch RXTX to using RTS_CONTROL_ENABLED and manually control RTS, then things work correctly. The behavior is consistent with this understanding if I hook two serial ports on Windows XP in lookback (via null modem). I'd be very surprised if this had not been corrected by M$ by this time. The same structure has been around since WinNT (mid 1990's) - their documentation is typically pretty good. > > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > > enabling the DCE to send, when the input buffer has enough room to > > > receive data. The driver lowers the DTR line, preventing the DCE to > > > send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. There is a seperate field, fDtrControl, which you can set to DTR_CONTROL_HANDSHAKE, that appears to do exactly this. > This then leaves RTS/CTS (with RTS usually just stuck high) for > controlling flow into the DCE (peripheral). Again, lots of hardware > devices actually do this. > > I don't work on Windows, so can't be sure of what happens. But on > the MacOS X version of RXTX, CTS low stops transmission, exactly as > the "old" style would expect. Well, the Linux Serial HOWTO is where I got most of my information. And yes, I thought it was wrong as well, but it's apparently how things are implemented: Donno - but it works for me... Pete From tjarvi at qbang.org Tue Aug 29 19:11:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 29 Aug 2006 19:11:40 -0600 (MDT) Subject: [Rxtx] Porting to AIX In-Reply-To: <024901c6cba5$714c3560$341416ac@basis.com> References: <01f201c6cb9d$034d4f20$341416ac@basis.com> <024901c6cba5$714c3560$341416ac@basis.com> Message-ID: Hi Mark That should do it. You can put ifdef around the B57600 as we did with higher baudrates. You may want to use tip, minicom, kermit or some other serial application on the AIX to confirm that the lockfiles created are correct. Neat stuff. On Tue, 29 Aug 2006, Mark E. Schnedar wrote: > After looking through the build messages closer, > there is an error building SerialImp.c: > > gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o > /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type > > Looks like B57600 is not defined and there are no > definitions for DEVICEDIR and LOCKDIR on AIX. > > Can I just a the following to SerialImp.h? > > #if defined(__aix__) > # define DEVICEDIR "/dev/" > # define LOCKDIR "/var/lock" > # define LOCKFILEPREFIX "LCK.." > # define FHS > #endif /* __aix__ */ > > Mark Schnedar > > > ----- Original Message ----- > From: "Mark E. Schnedar" > To: > Sent: Tuesday, August 29, 2006 12:57 PM > Subject: [Rxtx] Porting to AIX > > > Hi, > > I'm new to rxtx. Currently my company has an interpreter product > that uses rxtx on Windows and Linux. I am trying to get rxtx to > build on AIX. I downloaded rxtx, ran ./configure and make. When > I run make I get the following error: > > libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object > make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 > > Do you have any suggestions on how to fix this problem? > > I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error > on both systems). I did have our system administrator load > automake, autoconf, make (gnu), and gcc. Here are the versions: > > AIX 4.3.3 AIX 5.3.0 > rxtx: 2.1-7r2 2.1-7r2 > autoconf: 2.53 2.59 > automake: 1.5 1.8.5 > make: 3.79.1 3.80 > gcc: (used native cc) 4.0.0 > > Any help would be appreciated. > > Mark Schnedar > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From guille at sms.nl Wed Aug 30 01:14:32 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 09:14:32 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <7.0.1.0.0.20060830091204.03652de0@sms.nl> At 16:49 29/08/2006, Bob Jacobsen wrote: >At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > > > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >is defined as: > > > > > Enables RTS flow-control handshaking. The driver raises the RTS line, > >> enabling the DCE to send, when the input buffer has enough room to > >> receive data. The driver lowers the RTS line, preventing the DCE to > >> send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. > > > >which clearly reflects the newer usage style - it keeps the RTS line high > >as long as there is space to _receive_ data. And takes it low when the > >receive/input buffer is getting full to stop the modem from sending it data. > > > >Does this jive with other peoples understanding of RTS usage? > >Can you point to any devices that actually implement this "new" understanding? Many (most) of the embedded devices we work with implement this kind of flow control. The host (DTE) raises RTS when it can receive data, and lowers it when the input buffers are full. In turn it watches the CTS line to see whether it can send data to the DCE. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From tjarvi at qbang.org Wed Aug 30 01:23:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 30 Aug 2006 01:23:46 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830091204.03652de0@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 16:49 29/08/2006, Bob Jacobsen wrote: >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: >>> >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >>> is defined as: >>> >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, >>>> enabling the DCE to send, when the input buffer has enough room to >>>> receive data. The driver lowers the RTS line, preventing the DCE to >>>> send, when the input buffer does not have enough room to receive >>>> data. If this value is used, it is an error for the application to adjust >>>> the line with EscapeCommFunction. >>> >>> which clearly reflects the newer usage style - it keeps the RTS line high >>> as long as there is space to _receive_ data. And takes it low when the >>> receive/input buffer is getting full to stop the modem from sending it data. >>> >>> Does this jive with other peoples understanding of RTS usage? >> >> Can you point to any devices that actually implement this "new" understanding? > > Many (most) of the embedded devices we work with implement this kind of flow > control. The host (DTE) raises RTS when it can receive data, and lowers it > when the input buffers are full. In turn it watches the CTS line to see > whether it can send data to the DCE. > I think this explains some hardware control 'bugs' I've seen. -- Trent Jarvi tjarvi at qbang.org From guille at sms.nl Wed Aug 30 02:01:35 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 10:01:35 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> At 09:23 30/08/2006, Trent Jarvi wrote: >On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > > > At 16:49 29/08/2006, Bob Jacobsen wrote: > >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >>> > >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >>> is defined as: > >>> > >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, > >>>> enabling the DCE to send, when the input buffer has enough room to > >>>> receive data. The driver lowers the RTS line, preventing the DCE to > >>>> send, when the input buffer does not have enough room to receive > >>>> data. If this value is used, it is an error for the > application to adjust > >>>> the line with EscapeCommFunction. > >>> > >>> which clearly reflects the newer usage style - it keeps the RTS line high > >>> as long as there is space to _receive_ data. And takes it low when the > >>> receive/input buffer is getting full to stop the modem from > sending it data. > >>> > >>> Does this jive with other peoples understanding of RTS usage? > >> > >> Can you point to any devices that actually implement this "new" > understanding? > > > > Many (most) of the embedded devices we work with implement this > kind of flow > > control. The host (DTE) raises RTS when it can receive data, and lowers it > > when the input buffers are full. In turn it watches the CTS line to see > > whether it can send data to the DCE. > > > >I think this explains some hardware control 'bugs' I've seen. I think the above is the most widespread use, but that may just mean it is the most widespread use in our specific segment (embedded systems). Some UART chips (e.g. from Exar) implement this kind of flow control directly in hardware. For example the Exar can be configured to suspend transmission when it sees CTS low, and resume transmission when it sees CTS high. This is also consistent with our experience. Maybe this helps clarify: http://www.tldp.org/HOWTO/Text-Terminal-HOWTO-10.html#ss10.7 Note the "Old RTS/CTS handshaking is different" section, which refers to "older terminals" whereas newer equipment would use RTS/CTS flow control (or equivalently DTR/DTS) as described above. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From Bob_Jacobsen at lbl.gov Wed Aug 30 07:55:31 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 30 Aug 2006 06:55:31 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> <7.0.1.0.0.20060830095557.0374ff28@sms.nl> Message-ID: I think we all agree that CTS inactive means "Send no more from DTE to DCE". The question is how to express the other direction, "Send no more from DCE to DTE". There are two parts to this question: What do various DTE-like devices do, and what do various DCE-like devices expect? Electrically, the lines that go that direction are DTR, DCD, and RTS (plus some special-purpose lines that are rarely present). All three devices I work most with respect the DTR lead. On the other hand, the FTDI chips for doing serial over USB provide either (RTS and CTS) or (DTR and DSR) as the two leads. What we're probably seeing is two different approaches, that have propagated separately. That's a problem. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From Pawan.Kharbanda at dot.state.co.us Wed Aug 30 09:07:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 30 Aug 2006 09:07:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0455E5E5@hqexchange3.dot.state.co.us> Trent, Sorry for not responding earlier to your email. I was actually waiting for the release of our software on the new Hardware. As I mentioned in my previous emails, RXTX crashes and locks up serial ports with the older version of Redhat (Linux 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:28:55 EDT 2005 i686 i686 i386 GNU/Linux), it might work ok if you are using one or 2 ports but anything more than that it has issues. I was using JDK1.5.0_06 and older firmwares of Digi boxes. Let me know if you need any more specific information of the older system. Thanks Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Thursday, August 10, 2006 5:40 AM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even > after 10000 operations (now I am trying 100,000 :). This is all with > the original RXTX 2.1.7 (final) api's without any of my fixes that I > have been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying > the RXTX saying the suggested kernel for Redhat Linux is > 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Aug 1 01:11:30 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 1 Aug 2006 09:11:30 +0200 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <34B6BC40-1405-4A13-8054-0FC6CE10466A@buechse.de> This is a problem with lock files. You should find it somewhere in the documentation... On 01.08.2006, at 03:53, Richard P. Welty wrote: > trying to get my app running on a Mac OS X powerbook, when > the following is executed as the first thing inside the > run method of a Thread: > > > try { > port = (SerialPort) selectedPort.open( > this.getClass().getName(), 2000); > } catch ( PortInUseException ex){ > ex.printStackTrace(); > return; > } > > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java: > 354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run > (ScaleWatcher.java:143) > > i've not seen any documentation suggesting that rxtx would be finicky > about application names... > > thanks for any suggestions, > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From rwelty at suespammers.org Tue Aug 1 05:37:53 2006 From: rwelty at suespammers.org (Richard P. Welty) Date: Tue, 01 Aug 2006 07:37:53 -0400 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <44CF3D11.9060108@suespammers.org> Richard P. Welty wrote: > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) Aha, a confusing error message. it's really a lock file problem; the code is trying to fill in the application name but when it's getting "Unknown Application" and filling that in... richard From ajmas at sympatico.ca Tue Aug 1 13:10:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:10:59 -0400 Subject: [Rxtx] Application Name? Message-ID: <20060801191059.HFCD18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> You need the source code in CVS. The forth coming 2.18 will correct this, but currently the only place to find the correction is in CVS. No idea when 2.18 is due. > > From: "Richard P. Welty" > Date: 2006/08/01 Tue AM 07:37:53 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Application Name? > > Richard P. Welty wrote: > > > i get the following: > > > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > at > > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) > > Aha, a confusing error message. it's really a lock file problem; the > code is trying to fill in the application name but when it's getting > "Unknown Application" and filling that in... > > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:15:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:15:57 -0400 Subject: [Rxtx] Do interfaces break backwards compatibility? Message-ID: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> It is the class that decides to add serializable that needs to worry about those issues. For the most part serial ports and their connection states should be considered as transient, since there is no guarantee they will still be present or that their state will be, especially in a USB world. What you can store is the port settings and port id and then simply test for port availability next time. Nothing else should be assumed. > > From: Gregg Wonderly > Date: 2006/07/31 Mon PM 01:21:19 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Do interfaces break backwards compatibility? > > Doug Berkland wrote: > > As far as I can tell, nothing in either RXTX or Sun's JavaCOMM > > implements Serializable. Therefore, there are no worries from that > > either. (I can't think of a reason anything in JavaCOMM should > > implement Serializable either.) > > Any interface in javax.comm can become implemented by a serializable object. > Thus, if someone wants to provide remote access to a serial port, then they > might (and I think this is not wise) choose to subclass and add Serializable to > the interface list. > > It's that kind of Serialization compatibility that I'm talking about. > > Gregg Wonderly > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:18:11 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:18:11 -0400 Subject: [Rxtx] precompiled for Intel Mac? Message-ID: <20060801191811.FLJY27612.tomts16-srv.bellnexxia.net@smtp1.sympatico.ca> > > From: Joachim Buechse > There will be. However not before we have figured out some remaining issues. What issues are remaining? Andre From Pawan.Kharbanda at dot.state.co.us Tue Aug 1 16:55:08 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 1 Aug 2006 16:55:08 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Hi, I am also experiencing occasional JVM crash thru the native code. I am attaching the log from the crash. Any ideas what might be causing it???? Regards Pawan Kharbanda # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # --------------- T H R E A D --------------- Current thread (0x8d000480): JavaThread "Thread-119" [_thread_in_native, id=111 51] siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba Registers: EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 Top of Stack: (sp=0x8d3482b8) 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 0x8d348308: 00000000 00000002 00000000 00000000 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 Instructions: (pc=0xb75e39b2) 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~StubRoutines::call_stub V [libjvm.so+0x2607ec] V [libjvm.so+0x423828] V [libjvm.so+0x260045] V [libjvm.so+0x2600de] V [libjvm.so+0x2d7745] V [libjvm.so+0x4c2ba3] V [libjvm.so+0x424338] C [libpthread.so.0+0x4dd8] 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 ) =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, id=11026] 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, id=11023] From tjarvi at qbang.org Tue Aug 1 18:46:21 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 1 Aug 2006 18:46:21 -0600 (MDT) Subject: [Rxtx] JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Message-ID: On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) > C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] > 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, > id=11034] > 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, > id=11033] > 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, > id=11032] > 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, > id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] > 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, > id=11028] > 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, > id=11027] > 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, > id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] > 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- Index: termios.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/termios.c,v retrieving revision 1.9.2.57 diff -u -r1.9.2.57 termios.c --- termios.c 4 Jun 2006 02:50:01 -0000 1.9.2.57 +++ termios.c 11 Jun 2006 21:51:10 -0000 @@ -1048,26 +1048,29 @@ if ( !first_tl ) { port->prev = NULL; + port->next = NULL; first_tl = port; } else { - while ( index->next ) + while ( ( index->fd < port->fd ) && index->next ) index = index->next; - if ( port == first_tl ) + if ( index->fd > port->fd ) { - port->prev = NULL; - port->next = first_tl; - first_tl->prev = port; - first_tl = port; + /* inserting previously closed fd */ + port->prev = index->prev; + port->next=index + index->prev->next = port; + index->prev = port; } else { + /* adding to end of list */ port->prev = index; + port->next = NULL; index->next = port; } } - port->next = NULL; LEAVE( "add_port" ); return port; From gergg at cox.net Tue Aug 1 23:25:19 2006 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 02 Aug 2006 00:25:19 -0500 Subject: [Rxtx] Do interfaces break backwards compatibility? In-Reply-To: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <44D0373F.7020600@cox.net> Andre-John Mas wrote: > It is the class that decides to add serializable that needs to worry about those issues. > For the most part serial ports and their connection states should be considered as > transient, since there is no guarantee they will still be present or that their state > will be, especially in a USB world. Right, but when you provide an interface as the standard, that opens the doors for a lot more interpretation and variation. An abstract class can indicate a lot more about what the expected implementation is. Gregg Wonderly From lyon at docjava.com Wed Aug 2 06:02:15 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:02:15 -0400 Subject: [Rxtx] jsr spec and license issues Message-ID: Hi All, Trent and I have been discussing the license issues of the JSR spec and code that we develop, as a community. Here is what we have come up with: >During the development, the new JSR spec that we derive >will be >covered under the LGPL license. Since it is >just interfaces, any contributions will come back to me, for inclusion >into the specification. The goal is to provide a detailed set of >interfaces that >document the present state of our reference model. I am using >the RXTX as the reference model. If there is something missing from >the reference model, or if the reference model has something that should >not be there, we will need to discuss it. > >After Sun accepts the JSR, I, as the copyright holder, can issue >a version with a JSR compatible license. > >The goal is to migrate the interfaces into javax.comm. Does this sound like a reasonable plan to everyone? Thanks! - Doug From joachim at buechse.de Wed Aug 2 06:21:03 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 14:21:03 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Good day, quite frankly I think that this is a very bad idea. This specification (!) should be in the public domain and nowhere else. Defining a spec under the (L)GPL makes absolutely no sense. After all it is a specification not an implementation. There is no or only trivial code attached to it. So while nothing can be gained by putting it under the LGPL, a lot can be lost - for example the contribution of companies that do not like to open source their implementations. Furthermore you are plain wrong assuming you will be the copyright holder to additions made by other people. Best regards, Joachim On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for >> inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that >> should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Aug 2 06:39:28 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:39:28 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Hi All, I don't know anything about licensing issues. The below sounds reasonable. If we make this public domain, will that be compatible with Sun's JSR? Thanks! - DL P.S. I really don't care what we do, as long as there is some sort of collective agreement. >Good day, > >quite frankly I think that this is a very bad idea. This specification >(!) should be in the public domain and nowhere else. > >Defining a spec under the (L)GPL makes absolutely no sense. After all? >it is a specification not an implementation. There is no or only? >trivial code attached to it. So while nothing can be gained by? >putting it under the LGPL, a lot can be lost - for example the? >contribution of companies that do not like to open source their? >implementations. > >Furthermore you are plain wrong assuming you will be the copyright? >holder to additions made by other people. > >Best regards, >Joachim > > >On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for? >>> inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that? >>> should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> >> Does this sound like a reasonable plan to everyone? >> >> Thanks! >> - Doug >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 07:50:09 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 10:50:09 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D0AD91.4080103@gmail.com> Hi, I have been searching the web and here it is: http://jcp.org/en/resources/license_reference Here there is a list of the licenses that are compatible with the JCP for JSR submitting. I think that Apache, CDDL, CPL and OSL are the one that are compatible with our needs. But I think that Apache is the best for us, Doug why do not make a votation? Regards, Manuel > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. > >> Good day, >> >> quite frankly I think that this is a very bad idea. This specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From lyon at docjava.com Wed Aug 2 08:10:55 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 10:10:55 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D0AD91.4080103@gmail.com> References: <44D0AD91.4080103@gmail.com> Message-ID: Hi All, I have no objection to an Apache license for the JSR interfaces that we produce. Would anyone care to comment? Joachim: Does this address your public domain concerns? How does this impact the reference implementation (i.e. RXTX)? Thanks! - DL >Hi, >I have been searching the web and here it is: >http://jcp.org/en/resources/license_reference >Here there is a list of the licenses that are compatible with the JCP >for JSR submitting. >I think that Apache, CDDL, CPL and OSL are the one that are compatible >with our needs. >But I think that Apache is the best for us, Doug why do not make a votation? >Regards, >Manuel > >> Hi All, >> I don't know anything about licensing issues. >> The below sounds reasonable. If we make this public domain, >> will that be compatible with Sun's JSR? >> Thanks! >> - DL >> P.S. I really don't care what we do, as long as there is >> some sort of collective agreement. >>?? >>> Good day, >>> >>> quite frankly I think that this is a very bad idea. This specification >>> (!) should be in the public domain and nowhere else. >>> >>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>> it is a specification not an implementation. There is no or only >>> trivial code attached to it. So while nothing can be gained by >>> putting it under the LGPL, a lot can be lost - for example the >>> contribution of companies that do not like to open source their >>> implementations. >>> >>> Furthermore you are plain wrong assuming you will be the copyright >>> holder to additions made by other people. >>> >>> Best regards, > >> Joachim >>> >>> >>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>> >>>???? >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>?????? >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for >>>>> inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that >>>>> should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>>>???????? >>>> Does this sound like a reasonable plan to everyone? >>>> >>>> Thanks! >>>> - Doug >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>?????? >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>???? >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 08:20:29 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 11:20:29 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D0AD91.4080103@gmail.com> Message-ID: <44D0B4AD.2050106@gmail.com> Doug; > How does this impact the reference implementation (i.e. RXTX)? > Fuck I have not thinked about that, we would need that everyone who had colaborated with RXTX and have putted code on it to agree a license chaging. Or start from sractch. I don't know if Trent have the right to do that. Regards, Manuel > > >> Hi, >> I have been searching the web and here it is: >> http://jcp.org/en/resources/license_reference >> Here there is a list of the licenses that are compatible with the JCP >> for JSR submitting. >> I think that Apache, CDDL, CPL and OSL are the one that are compatible >> with our needs. >> But I think that Apache is the best for us, Doug why do not make a votation? >> Regards, >> Manuel >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> >> >> Joachim >> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 08:21:15 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 16:21:15 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Putting something in the public domain means, that it can be used by anyone for whatever (s)he thinks is appropriate. The authors define no restriction regarding it's use. That's how any specification should be. Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From berkland at spamcop.net Wed Aug 2 08:50:50 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 10:50:50 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> You may want to consider making it available under two separate licenses. 1 - LGPL as it is today The LGPL can be used by anyone wanting to extend the current functionality, as long as they provide code for anything they change. 2 - Sun Community Source License (SCSL) http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf The SCSL will allow anyone who wants to do a closed source implementation from the ground up to do so, if I'm reading it correctly, as long as they don't use any of the code from the Reference Implementation. This will satisfy any company that wants to have a closed-source implementation, but not help them out very much. On 8/2/06, Joachim Buechse wrote: > Putting something in the public domain means, that it can be used by > anyone for whatever (s)he thinks is appropriate. The authors define > no restriction regarding it's use. That's how any specification > should be. > > Best regards, > Joachim > > > On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > > > Hi All, > > I don't know anything about licensing issues. > > The below sounds reasonable. If we make this public domain, > > will that be compatible with Sun's JSR? > > Thanks! > > - DL > > P.S. I really don't care what we do, as long as there is > > some sort of collective agreement. > >> Good day, > >> > >> quite frankly I think that this is a very bad idea. This > >> specification > >> (!) should be in the public domain and nowhere else. > >> > >> Defining a spec under the (L)GPL makes absolutely no sense. After all > >> it is a specification not an implementation. There is no or only > >> trivial code attached to it. So while nothing can be gained by > >> putting it under the LGPL, a lot can be lost - for example the > >> contribution of companies that do not like to open source their > >> implementations. > >> > >> Furthermore you are plain wrong assuming you will be the copyright > >> holder to additions made by other people. > >> > >> Best regards, > >> Joachim > >> > >> > >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> > >>> Hi All, > >>> Trent and I have been discussing the license issues of the > >>> JSR spec and code that we develop, as a community. > >>> Here is what we have come up with: > >>> > >>>> During the development, the new JSR spec that we derive > >>>> will be > >>>> covered under the LGPL license. Since it is > >>>> just interfaces, any contributions will come back to me, for > >>>> inclusion > >>>> into the specification. The goal is to provide a detailed set of > >>>> interfaces that > >>>> document the present state of our reference model. I am using > >>>> the RXTX as the reference model. If there is something missing > >>>> from > >>>> the reference model, or if the reference model has something that > >>>> should > >>>> not be there, we will need to discuss it. > >>>> > >>>> After Sun accepts the JSR, I, as the copyright holder, can issue > >>>> a version with a JSR compatible license. > >>>> > >>>> The goal is to migrate the interfaces into javax.comm. > >>> > >>> Does this sound like a reasonable plan to everyone? > >>> > >>> Thanks! > >>> - Doug > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From naranjo.manuel at gmail.com Wed Aug 2 09:03:02 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 12:03:02 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> References: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> Message-ID: <44D0BEA6.2040408@gmail.com> Or even better, you can use Apache v2, which allows both Open Source and Closed Source forms ;-) > You may want to consider making it available under two separate licenses. > > 1 - LGPL as it is today > > The LGPL can be used by anyone wanting to extend the current > functionality, as long as they provide code for anything they change. > > 2 - Sun Community Source License (SCSL) > http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf > > The SCSL will allow anyone who wants to do a closed source > implementation from the ground up to do so, if I'm reading it > correctly, as long as they don't use any of the code from the > Reference Implementation. This will satisfy any company that wants to > have a closed-source implementation, but not help them out very much. > > On 8/2/06, Joachim Buechse wrote: > >> Putting something in the public domain means, that it can be used by >> anyone for whatever (s)he thinks is appropriate. The authors define >> no restriction regarding it's use. That's how any specification >> should be. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This >>>> specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> Joachim >>>> >>>> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing >>>>>> from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 09:46:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 17:46:25 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> I assume that javax.comm/RXTX is to be redefined using Interfaces. In this case we should separate 2 things: 1) The specification and it's incarnation in the form of java classes defining the interfaces. 2) The actual implementation of the functionality. It is possible that 1) may contain some trivial code in abstract or none abstract classes (ie PortFactory, PortRegistry, etc). Doug's original question was regarding 1) - unless I misunderstood. I personally think that 1) should be in the public domain. It should not be covered by any restrictions what-so-ever. Let it be free as in "totally free in any respect". I do not care under which license 2) is released. Why? Because it is in my very interest that all/almost all vendors include implementations with their distributions. Which will only happen if they do not need to respect open source licenses. (javax.comm is not nearly as important as the Apache web server or MySql, so nobody will take licensing risks). Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ssbello at gmail.com Wed Aug 2 10:28:30 2006 From: ssbello at gmail.com (Simone) Date: Wed, 2 Aug 2006 18:28:30 +0200 Subject: [Rxtx] pocketPC 2003 Message-ID: <39ed505d0608020928k6ceb01aen470c2e6a78c5a6b0@mail.gmail.com> Does anyone know if the Rxtx works on PocketPc 2003? If yes, could you, please, give me some suggestion. Thanks, Simone Bell? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/72e0fb87/attachment-0001.html From berkland at spamcop.net Wed Aug 2 13:00:10 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 15:00:10 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> Message-ID: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> How about these for the "Business Terms" of the new JSR: > The specification will be released in accordance with standard terms > as specified by the JCP process. > > The reference implementation (RI) will be delivered in binary form > free of charge from http://rxtx.org. Licensing details are expected to > be under the Binary Code License (BCL). > > The source for the reference implementation is expected to be > delivered via the Limited GNU Public License (LGPL) and available free > of charge. > > The TCK will be made available free of charge to all J2SE and J2EE licensees. > > The TCK will be offered for license at no charge, without support or > any trademark license rights, to qualified not-for-profit entities > (including not-for-profit) academic institutions) and qualified > individuals engaged in efforts to create compatible implementations of > the Specification. From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 13:13:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 13:13:33 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E495@hqexchange3.dot.state.co.us> Trent, I didn't exactly get it. Again I am not a C guy, maybe its very simple for you but I don't see any checks for FD (as written in the patch for termios.c) in the initialise_event_info_struct, I see some checks in the interruptEventLoop call. Second as you explained I open three("/dev/cuf01","/dev/cuf01","/dev/cuf01") ports, I close the 2nd ("/dev/cuf02", the other 2 are still open) , I never try to open the third ("/dev/cuf03") port again if it is already open. Are you planning to have a fix for this in the next release 2.1.8. Its very important for me to have a fix for this, its causing some major headaches for our project. I know you have your regular job too, I will appreciate any help. Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, August 01, 2006 6:46 PM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java > VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic > frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) C [librxtxSerial.so+0x69b2] > initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] > Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" > [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: > /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread > "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 > JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon > [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" > daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread > "AdapterThread" daemon [_thread_blocked, id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, > id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Wed Aug 2 13:14:20 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 16:14:20 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> Message-ID: <44D0F98C.1070600@gmail.com> +1 Agree > How about these for the "Business Terms" of the new JSR: > > >> The specification will be released in accordance with standard terms >> as specified by the JCP process. >> >> The reference implementation (RI) will be delivered in binary form >> free of charge from http://rxtx.org. Licensing details are expected to >> be under the Binary Code License (BCL). >> >> The source for the reference implementation is expected to be >> delivered via the Limited GNU Public License (LGPL) and available free >> of charge. >> >> The TCK will be made available free of charge to all J2SE and J2EE licensees. >> >> The TCK will be offered for license at no charge, without support or >> any trademark license rights, to qualified not-for-profit entities >> (including not-for-profit) academic institutions) and qualified >> individuals engaged in efforts to create compatible implementations of >> the Specification. >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From savagobr at yahoo.com Wed Aug 2 13:40:42 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:40:42 -0700 (PDT) Subject: [Rxtx] jsr spec and license issues Message-ID: <20060802194042.83599.qmail@web53807.mail.yahoo.com> Friends Apache seems ok... if I get it right, does it *almost* equals to BSD? Regarding public domain: I think that the good people that spent so much time on this library will like to keep some rights over its own work, don't you think? Best regards Savago --------------------------------- Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/79abdfd5/attachment-0001.html From savagobr at yahoo.com Wed Aug 2 13:58:04 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:58:04 -0700 (PDT) Subject: [Rxtx] JVM Crashing Message-ID: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago --------------------------------- Groups are talking. We´re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/47d561ae/attachment-0001.html From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 14:09:18 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 14:09:18 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E4AD@hqexchange3.dot.state.co.us> Thank You :) ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adenilson Cavalcanti Sent: Wednesday, August 02, 2006 1:58 PM To: rxtx at qbang.org Subject: Re: [Rxtx] JVM Crashing Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago ________________________________ Groups are talking. We?re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/b4eb22cf/attachment-0001.html From tjarvi at qbang.org Wed Aug 2 20:23:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 20:23:42 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > Hi Doug As mentioned off the list, the important point in my mind is that everyone is on the same base more than what license is decided upon. These things are just best addressed early so there isn't confusion. The Apache license is fairly standard in the Open Source community vs several of the relatively unknown [and obviously redundat even by their descriptions] offerings by Sun. Perhaps one option here that would kill a few birds with one stone is to dual license the interface as Apache and LGPL. This would allow everyone to use the interfaces without needing to do wastefull work for internal license requirements. Projects could choose between the two the license that best suits their needs. If there is a software shop doing Java that isn't familiar with the Apache license, they must be doing some strange Java. I do think it is foolhearty to blindly travel in public domain but nobody is trying to undermine the spec files. The intent is to use the work for a JSR submission that everyone can use without confusion later on down the line. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 21:01:16 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 20:01:16 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D166FC.9090005@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> Does this sound like a reasonable plan to everyone? >> > > Hi Doug > > As mentioned off the list, the important point in my mind is that everyone > is on the same base more than what license is decided upon. These things > are just best addressed early so there isn't confusion. > > The Apache license is fairly standard in the Open Source community vs > several of the relatively unknown [and obviously redundat even by > their descriptions] offerings by Sun. The JCP is a reasonable process for what the RxTx project intends to achieve by evolving the API. There isn't much to lose by going the JSR route. The community will benefit from a fair API like so many other that have undergone the process. Sun isn't going to own the API or manipulate it into anything weird anymore than anyone else is. I think your fears are rather vague and unfounded. Which isn't to say that I am a well-informed representative of the JCP, I've only sat through one JSR process and we ended up with javax.usb, and IBM got what it wanted out of the deal and the community got a very nice standard. Paul > > Perhaps one option here that would kill a few birds with one stone is to > dual license the interface as Apache and LGPL. This would allow everyone > to use the interfaces without needing to do wastefull work for internal > license requirements. Projects could choose between the two the license > that best suits their needs. If there is a software shop doing Java that > isn't familiar with the Apache license, they must be doing some strange > Java. > > I do think it is foolhearty to blindly travel in public domain but nobody > is trying to undermine the spec files. The intent is to use the work for > a JSR submission that everyone can use without confusion later on down the > line. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Aug 2 22:10:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 22:10:48 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D166FC.9090005@sun.com> References: <44D166FC.9090005@sun.com> Message-ID: On Wed, 2 Aug 2006, Paul Klissner wrote: > Trent Jarvi wrote: >> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> Does this sound like a reasonable plan to everyone? >>> >> >> Hi Doug >> >> As mentioned off the list, the important point in my mind is that everyone >> is on the same base more than what license is decided upon. These things >> are just best addressed early so there isn't confusion. >> >> The Apache license is fairly standard in the Open Source community vs >> several of the relatively unknown [and obviously redundat even by >> their descriptions] offerings by Sun. > > The JCP is a reasonable process for what the RxTx project intends > to achieve by evolving the API. > > There isn't much to lose by going the JSR route. The community will > benefit from a fair API like so many other that have undergone > the process. Sun isn't going to own the API or manipulate it > into anything weird anymore than anyone else is. I think your > fears are rather vague and unfounded. > > Which isn't to say that I am a well-informed representative > of the JCP, I've only sat through one JSR process and we ended > up with javax.usb, and IBM got what it wanted out of the deal > and the community got a very nice standard. > Hi Paul The JCP should work fine. As our intentions are in line, licensing so that everyone can use the interface code should not be a problem. Note that the current default right now is that the interfaces are copyrighted and no license for distribution is included. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 22:33:51 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 21:33:51 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D166FC.9090005@sun.com> Message-ID: <44D17CAF.1090802@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Paul Klissner wrote: > >> Trent Jarvi wrote: >>> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>> Does this sound like a reasonable plan to everyone? >>>> >>> Hi Doug >>> >>> As mentioned off the list, the important point in my mind is that everyone >>> is on the same base more than what license is decided upon. These things >>> are just best addressed early so there isn't confusion. >>> >>> The Apache license is fairly standard in the Open Source community vs >>> several of the relatively unknown [and obviously redundat even by >>> their descriptions] offerings by Sun. >> The JCP is a reasonable process for what the RxTx project intends >> to achieve by evolving the API. >> >> There isn't much to lose by going the JSR route. The community will >> benefit from a fair API like so many other that have undergone >> the process. Sun isn't going to own the API or manipulate it >> into anything weird anymore than anyone else is. I think your >> fears are rather vague and unfounded. >> >> Which isn't to say that I am a well-informed representative >> of the JCP, I've only sat through one JSR process and we ended >> up with javax.usb, and IBM got what it wanted out of the deal >> and the community got a very nice standard. >> > > Hi Paul > > The JCP should work fine. As our intentions are in line, licensing so > that everyone can use the interface code should not be a problem. Sorry, looks like my concerns were unfounded. I haven't been following the threads closely this week, as work got busy with an escalated issue and new project. Sorry about that. > > Note that the current default right now is that the interfaces are > copyrighted and no license for distribution is included. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Aug 3 03:45:56 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 03 Aug 2006 05:45:56 -0400 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: Hi All, I have been waiting a day for things to cool down. Licensing appears to be a hot-button topic. I have no objection to dual license the interfaces as both Apache and LGPL. Some thoughts: Goal: developers wish to work together on a common piece of code that the team needs. It makes sense that the code base they work on should be Apache-licensed. That makes it possible for the team to use and develop common code, even if the end result is LGPL'd as a whole. If we combine licenses, we must follow the terms of both licenses when distributing the combined work. Thus, the dual license contains the super set of terms in the licenses of Apached and LGPL. This should address concern about using Apache-licensed code within LGPL projects due to the FSF's claim that they are incompatible. Here is a draft statement for RXSL: The RXTX Specification Library (RXSL) uses a dual license strategy for the source code. These licenses are the GNU Lesser General Public License (LGPL) and the Apache License. I strongly encourage users to use the LGPL license and participate fully in the free software community. Dual licensing of the RXSL source code provides open and free access to the technology both for the GPL community and for other developers or companies that cannot use the GPL. Dual license is common practice in open source projects like OpenOffice, Perl and Mozilla. Through the combined use of LGPL and Apache license, developers will have a high degree of freedom yet compatibility and interoperability will be preserved. You can freely modify, extend, and improve the RXSL source code. The only question is whether or not you must provide the source code and contribute modifications to the community. The GNU and Apache licenses allow different ranges of flexibility in this regard, but in the end, regardless of the license used, any and all incompatible changes must be published openly. Note that there is the RXTX Reference Model that uses the org.rxtx package, which itself is protected by the LGPL. This may be part of the distribution, however, it can not be redistributed using a different license. Is everybody OK with this? Thanks Trent, great idea! - Doug From joachim at buechse.de Thu Aug 3 04:15:44 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 3 Aug 2006 12:15:44 +0200 Subject: [Rxtx] JVM Crashing In-Reply-To: <20060802195804.70935.qmail@web53812.mail.yahoo.com> References: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Message-ID: <6ABA2AB2-CECE-4C4B-A7D6-0CDF8B9C95A8@buechse.de> I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of > rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jvermillard at archean.fr Thu Aug 3 04:26:48 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Thu, 03 Aug 2006 12:26:48 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <1154600808.16732.18.camel@localhost.localdomain> Hi, I'm a developer of the Apache MINA framework. It's a network application framework which helps users develop high performance and high scalability network applications easily. http://directory.apache.org/subprojects/mina/index.html . I would like to integrate serial connection to the framework (actualy supporting TCP, UDP (broadcast) and in VM communications), but LGPL is an issue for me. An Apache License would be pretty usefull for me and integrate rxtx functionnalities easly. Thanks, Julien Le jeudi 03 ao?t 2006 ? 05:45 -0400, Dr. Douglas Lyon a ?crit : > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/755cca7f/smime-0001.bin From pascal at quies.net Thu Aug 3 04:32:35 2006 From: pascal at quies.net (Pascal S. de Kloe) Date: Thu, 3 Aug 2006 12:32:35 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <200608031232.35838.pascal@quies.net> Hi Doug, The Apache license is unnessesary complex. It puts all kinds of limitations on the usage. Is there a particular reason why people chose this or was it just the familiar name? I agree with Joachim (again) that the specification and the interfaces should be public domain. However, if we realy need a license then have a look at the X11 license because that one is compatible with the GPL and suits our needs: http://www.fsf.org/licensing/licenses/index_html http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3 ---- start: implementation Copyright (C) 2006 Sun Microsystems, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Sun Microsystems shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Sun Microsystems. Java is a trademark of Sun Microsystems, Inc. ---- end Op donderdag 3 augustus 2006 11:45, schreef Dr. Douglas Lyon: > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Aug 3 05:17:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 05:17:07 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154600808.16732.18.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: On Thu, 3 Aug 2006, Julien Vermillard wrote: > Hi, > > I'm a developer of the Apache MINA framework. It's a network application > framework which helps users develop high performance and high > scalability network applications easily. > http://directory.apache.org/subprojects/mina/index.html . I would like > to integrate serial connection to the framework (actualy supporting TCP, > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > An Apache License would be pretty usefull for me and integrate rxtx > functionnalities easly. > > Thanks, > > Julien > Hi Julien The rxtx license itself will not change. This is just the interface. You would be free to implement an rxtx replacement if the LGPL low level code is a problem for you. These licensing details would make it possible to take the interface code instead of needing to recode them for a new project. You are probably confusing the license problems with the GPL not the LGPL though you can share links to concerns off the list if you would like to go through them. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 11:59:48 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 11:59:48 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E516@hqexchange3.dot.state.co.us> Joachim, I think my both problems (JVM crashing & Port Locking) are being caused by the corruption of "Event Info Struct / EIS" I have noticed with in EIS my "FD" and "Closing" value being overwritten. The problem is definitely in SerialImp.c file. I am trying to understand what the code does and try to pin point the problem by trying few other options. I will keep everybody posted. Regards Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Joachim Buechse Sent: Thursday, August 03, 2006 4:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Thu Aug 3 13:50:07 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 14:50:07 -0500 Subject: [Rxtx] slow startup Message-ID: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete From brian at mbari.org Thu Aug 3 14:05:57 2006 From: brian at mbari.org (Brian Schlining) Date: Thu, 3 Aug 2006 13:05:57 -0700 Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> References: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Message-ID: Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B > Greetings, > I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/ > qbang.org). > > In testing things out, I ran the list ports example from the Wiki, > and it seems to take quite a while for the library to initialize? > Like on the order of 30+ seconds or so after startup (and the RXTX > banner prints), and before the application starts running. > > Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then > I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ > terminal server) and I'm wondering if they are not responding properly > and this is causing the slow startup? Or is this a known problem of > some kind, or maybe something on my system is screwy? > > Thanks, > Pete > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/6123f730/attachment-0001.html From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 14:13:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 14:13:47 -0600 Subject: [Rxtx] slow startup Message-ID: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Hi Pete, RXTX does open and close the ports in Windows. Try downloading utility like PORTMON(only for windows) and you can see that whenever you load RXTX it tries to register all the available COMM ports in the system. It is a little slow if you have virtual ports, we use digi as a terminal server, Its going to get worst of you have comm ports in 100's Thanks Pawan Kharbanda ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Brian Schlining Sent: Thursday, August 03, 2006 2:06 PM To: RXTX Developers and Users Subject: Re: [Rxtx] slow startup Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/94fd105d/attachment-0001.html From pete.flugstad at gmail.com Thu Aug 3 14:32:04 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 15:32:04 -0500 Subject: [Rxtx] slow startup In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Message-ID: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> On 8/3/06, Kharbanda, Pawan wrote: > RXTX does open and close the ports in Windows. Try downloading utility > like PORTMON(only for windows) and you can see that whenever you load RXTX > it tries to register all the available COMM ports in the system. It is a > little slow if you have virtual ports, we use digi as a terminal server, Its > going to get worst of you have comm ports in 100's Okay, I can understand that, but from the PORTMON output, it looks like it's opening each port TWICE: 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS ... 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS Also, assuming instead of listing the ports I wanted to just open one, I'm still seeing the 30 second delay, so it's scanning at startup regardless of what the Java code is going to do. Probably necessary, but annoying. I know, I know, contribute patches... :-) Thanks, Pete From tjarvi at qbang.org Thu Aug 3 15:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 15:04:42 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: On Thu, 3 Aug 2006, Pete Flugstad wrote: > On 8/3/06, Kharbanda, Pawan wrote: >> RXTX does open and close the ports in Windows. Try downloading utility >> like PORTMON(only for windows) and you can see that whenever you load RXTX >> it tries to register all the available COMM ports in the system. It is a >> little slow if you have virtual ports, we use digi as a terminal server, Its >> going to get worst of you have comm ports in 100's > > Okay, I can understand that, but from the PORTMON output, it looks > like it's opening each port TWICE: > > 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > ... > 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > > Also, assuming instead of listing the ports I wanted to just open one, > I'm still seeing the 30 second delay, so it's scanning at startup > regardless of what the Java code is going to do. Probably necessary, > but annoying. > > I know, I know, contribute patches... :-) > I think this problem is in RXTXCommDriver.java. I've just not tracked it down but it should be in the java code, not the native code so easy enough to track down. -- Trent Jarvi tjarvi at qbang.org From jvermillard at archean.fr Fri Aug 4 03:43:28 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:43:28 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: <1154684608.6181.4.camel@localhost.localdomain> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > Hi, > > > > I'm a developer of the Apache MINA framework. It's a network application > > framework which helps users develop high performance and high > > scalability network applications easily. > > http://directory.apache.org/subprojects/mina/index.html . I would like > > to integrate serial connection to the framework (actualy supporting TCP, > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > An Apache License would be pretty usefull for me and integrate rxtx > > functionnalities easly. > > > > Thanks, > > > > Julien > > > > Hi Julien > > The rxtx license itself will not change. This is just the interface. > You would be free to implement an rxtx replacement if the LGPL low level > code is a problem for you. These licensing details would make it possible > to take the interface code instead of needing to recode them for a new > project. > > You are probably confusing the license problems with the GPL not the LGPL > though you can share links to concerns off the list if you would like to > go through them. > > -- > Trent Jarvi > tjarvi at qbang.org Hi, I'm not a license expert but some guys at ASF said me you can't call LGPLed libs from java. some peoples interprete that as static linking and not dynamic linking (no idea why). So ASF/BSD licensied interface willl solve the license probleme. If you got some questions about the ASL and the way you can dual license LGPL/ASL you can ask it on legal-discuss at apache.org Julien -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/8d46c0aa/smime-0001.bin From jvermillard at archean.fr Fri Aug 4 03:51:30 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:51:30 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <1154685091.6181.6.camel@localhost.localdomain> erm from java -> from ASLed Java code Le vendredi 04 ao?t 2006 ? 11:43 +0200, Julien Vermillard a ?crit : > Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > Hi, > > I'm not a license expert but some guys at ASF said me you can't call > LGPLed libs from java. some peoples interprete that as static linking > and not dynamic linking (no idea why). So ASF/BSD licensied interface > willl solve the license probleme. > > If you got some questions about the ASL and the way you can dual license > LGPL/ASL you can ask it on legal-discuss at apache.org > > Julien > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dcc29d70/smime-0001.bin From guille at sms.nl Fri Aug 4 04:35:24 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Fri, 04 Aug 2006 12:35:24 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <7.0.1.0.0.20060804123322.036dc748@sms.nl> At 11:43 04/08/2006, Julien Vermillard wrote: >Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > >Hi, > >I'm not a license expert but some guys at ASF said me you can't call >LGPLed libs from java. some peoples interprete that as static linking >and not dynamic linking (no idea why). This interpretation is wrong. See the official position of the FSF regarding the LGPL and Java: http://www.gnu.org/licenses/lgpl-java.html http://www.fsf.org/licensing/licenses/lgpl-java.html Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From hambyiii at hotmail.com Fri Aug 4 04:52:47 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 10:52:47 +0000 Subject: [Rxtx] error getting InputStream Message-ID: Hi, I have written a program in Java for Windows xp using RXTX (which is why I am using this mailing list :). However, I am getting a problem. I am connecting to a serial port, like so: private CommPortIdentifier portID; private boolean openPort(String selectedPort) { boolean portFound = false; Enumeration portList; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portID.getName().equals(selectedPort)) { portFound = true; break; } } } return portFound; } and then I try and get the serial port input stream (leaving out the try and catch for the sake of space): SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); InputStream inputStream = serialPort.getInputStream(); but on the getInputStream() I get the following error message: Bad file descriptor in nativeavailable I cannot figure out where it is going wrong...anyone any ideas. A quick answer would be wonderful, as I am kinda under the hammer to get this fixed quickly Thanks in Advance Keith From tjarvi at qbang.org Fri Aug 4 05:13:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 05:13:19 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <7.0.1.0.0.20060804123322.036dc748@sms.nl> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> <7.0.1.0.0.20060804123322.036dc748@sms.nl> Message-ID: On Fri, 4 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 11:43 04/08/2006, Julien Vermillard wrote: >> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : >>> On Thu, 3 Aug 2006, Julien Vermillard wrote: >>> >>>> Hi, >>>> >>>> I'm a developer of the Apache MINA framework. It's a network application >>>> framework which helps users develop high performance and high >>>> scalability network applications easily. >>>> http://directory.apache.org/subprojects/mina/index.html . I would like >>>> to integrate serial connection to the framework (actualy supporting TCP, >>>> UDP (broadcast) and in VM communications), but LGPL is an issue for me. >>>> >>>> An Apache License would be pretty usefull for me and integrate rxtx >>>> functionnalities easly. >>>> >>>> Thanks, >>>> >>>> Julien >>>> >>> >>> Hi Julien >>> >>> The rxtx license itself will not change. This is just the interface. >>> You would be free to implement an rxtx replacement if the LGPL low level >>> code is a problem for you. These licensing details would make it possible >>> to take the interface code instead of needing to recode them for a new >>> project. >>> >>> You are probably confusing the license problems with the GPL not the LGPL >>> though you can share links to concerns off the list if you would like to >>> go through them. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >> >> Hi, >> >> I'm not a license expert but some guys at ASF said me you can't call >> LGPLed libs from java. some peoples interprete that as static linking >> and not dynamic linking (no idea why). > > This interpretation is wrong. See the official position of the FSF regarding > the LGPL and Java: > > http://www.gnu.org/licenses/lgpl-java.html > > http://www.fsf.org/licensing/licenses/lgpl-java.html > What I do with legal groups that go down that rat hole is give them a copy of the rxtx 2.0 license. Since the confused legal folks are going in a direction that does not represent the intent of the license or authors at that point and are confused about basic things in our industry that most consider facts, the discussions are very short. The rxtx 2.0 license just adds the following and has for 6 years or so. Not because the lawyers are right. They get confused about intent and even facts. The following is added to make confused lawyers that cant understand intent go far away and never come back. period. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. From hambyiii at hotmail.com Fri Aug 4 05:42:21 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 11:42:21 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Okay, I made a little mistake in my last message. The error is not occuring where I thought it was. Instead it is occuring when I do the following: byte[] readBuffer = new byte[128]; try { int numBytes = 0; try { Thread.sleep(500); } catch (InterruptedException e) {} while (inputStream.available() > 0) { numBytes = inputStream.read(readBuffer); } processReceivedData(readBuffer, numBytes); } catch (IOException e) { System.out.println(e.getMessage()); } So I guess the error is happening on the inputStream.read(readBuffer) again, any help is appreciated and again, thanks in advance Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 10:52:47 +0000 > >Hi, > >I have written a program in Java for Windows xp using RXTX (which is why I >am using this mailing list :). However, I am getting a problem. I am >connecting to a serial port, like so: > private CommPortIdentifier portID; > > private boolean openPort(String selectedPort) > { > boolean portFound = false; > Enumeration portList; > > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portID.getName().equals(selectedPort)) > { > portFound = true; > break; > } > } > } > > return portFound; > } > >and then I try and get the serial port input stream (leaving out the try >and >catch for the sake of space): > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >InputStream inputStream = serialPort.getInputStream(); > >but on the getInputStream() I get the following error message: > >Bad file descriptor in nativeavailable > >I cannot figure out where it is going wrong...anyone any ideas. A quick >answer would be wonderful, as I am kinda under the hammer to get this fixed >quickly > >Thanks in Advance >Keith > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From hambyiii at hotmail.com Fri Aug 4 07:08:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:08:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Hi, I know I am replying to myself a lot at the moment, but more information has come to light (These errors are actually happening on a client machine, on software that has worked for the past month, and only now has started to fail, which is why I am a little slow finding things out) The errors I have already written about are only symptoms of an orignal error. The original error occurs the first time I try to WRITE thte OutputStream: OutputStream oStream = serialPort.getOutputStream(); serialPort.notifyOnOutputEmpty(true); byte[] bs = encodeMessage(configString.toString()); oStream.write(bs); oStream.flush(); The error occurs on oStream.write(bs); and is: Input/output error in writeArray Now writeArray is native code, so I have no idea what is going on there. Any help would be appreciated Thanks Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 11:42:21 +0000 > >Okay, I made a little mistake in my last message. > >The error is not occuring where I thought it was. Instead it is occuring >when I do the following: > >byte[] readBuffer = new byte[128]; > >try { > > int numBytes = 0; > try { > Thread.sleep(500); > } > catch (InterruptedException e) > {} > > while (inputStream.available() > 0) > { > numBytes = inputStream.read(readBuffer); > } > > processReceivedData(readBuffer, numBytes); >} >catch (IOException e) >{ > System.out.println(e.getMessage()); >} > >So I guess the error is happening on the inputStream.read(readBuffer) > >again, any help is appreciated and again, thanks in advance >Keith > > >From: "Keith Thorne" > >Reply-To: RXTX Developers and Users > >To: rxtx at qbang.org > >Subject: [Rxtx] error getting InputStream > >Date: Fri, 04 Aug 2006 10:52:47 +0000 > > > >Hi, > > > >I have written a program in Java for Windows xp using RXTX (which is why >I > >am using this mailing list :). However, I am getting a problem. I am > >connecting to a serial port, like so: > > private CommPortIdentifier portID; > > > > private boolean openPort(String selectedPort) > > { > > boolean portFound = false; > > Enumeration portList; > > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > > while (portList.hasMoreElements()) > > { > > portID = (CommPortIdentifier) portList.nextElement(); > > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > > { > > if (portID.getName().equals(selectedPort)) > > { > > portFound = true; > > break; > > } > > } > > } > > > > return portFound; > > } > > > >and then I try and get the serial port input stream (leaving out the try > >and > >catch for the sake of space): > > > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); > >InputStream inputStream = serialPort.getInputStream(); > > > >but on the getInputStream() I get the following error message: > > > >Bad file descriptor in nativeavailable > > > >I cannot figure out where it is going wrong...anyone any ideas. A quick > >answer would be wonderful, as I am kinda under the hammer to get this >fixed > >quickly > > > >Thanks in Advance > >Keith > > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Aug 4 07:26:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: Hi Keith Can you tell us more about the physical serial port? Might it be 'vanishing?' On Fri, 4 Aug 2006, Keith Thorne wrote: > Hi, > > I know I am replying to myself a lot at the moment, but more information has > come to light (These errors are actually happening on a client machine, on > software that has worked for the past month, and only now has started to > fail, which is why I am a little slow finding things out) > > The errors I have already written about are only symptoms of an orignal > error. The original error occurs the first time I try to WRITE thte > OutputStream: > > OutputStream oStream = serialPort.getOutputStream(); > serialPort.notifyOnOutputEmpty(true); > > byte[] bs = encodeMessage(configString.toString()); > > oStream.write(bs); > oStream.flush(); > > The error occurs on oStream.write(bs); and is: > > Input/output error in writeArray > > Now writeArray is native code, so I have no idea what is going on there. Any > help would be appreciated > Thanks > Keith > > >> From: "Keith Thorne" >> Reply-To: RXTX Developers and Users >> To: rxtx at qbang.org >> Subject: Re: [Rxtx] error getting InputStream >> Date: Fri, 04 Aug 2006 11:42:21 +0000 >> >> Okay, I made a little mistake in my last message. >> >> The error is not occuring where I thought it was. Instead it is occuring >> when I do the following: >> >> byte[] readBuffer = new byte[128]; >> >> try { >> >> int numBytes = 0; >> try { >> Thread.sleep(500); >> } >> catch (InterruptedException e) >> {} >> >> while (inputStream.available() > 0) >> { >> numBytes = inputStream.read(readBuffer); >> } >> >> processReceivedData(readBuffer, numBytes); >> } >> catch (IOException e) >> { >> System.out.println(e.getMessage()); >> } >> >> So I guess the error is happening on the inputStream.read(readBuffer) >> >> again, any help is appreciated and again, thanks in advance >> Keith >> >>> From: "Keith Thorne" >>> Reply-To: RXTX Developers and Users >>> To: rxtx at qbang.org >>> Subject: [Rxtx] error getting InputStream >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 >>> >>> Hi, >>> >>> I have written a program in Java for Windows xp using RXTX (which is why >> I >>> am using this mailing list :). However, I am getting a problem. I am >>> connecting to a serial port, like so: >>> private CommPortIdentifier portID; >>> >>> private boolean openPort(String selectedPort) >>> { >>> boolean portFound = false; >>> Enumeration portList; >>> >>> portList = CommPortIdentifier.getPortIdentifiers(); >>> >>> while (portList.hasMoreElements()) >>> { >>> portID = (CommPortIdentifier) portList.nextElement(); >>> if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) >>> { >>> if (portID.getName().equals(selectedPort)) >>> { >>> portFound = true; >>> break; >>> } >>> } >>> } >>> >>> return portFound; >>> } >>> >>> and then I try and get the serial port input stream (leaving out the try >>> and >>> catch for the sake of space): >>> >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >>> InputStream inputStream = serialPort.getInputStream(); >>> >>> but on the getInputStream() I get the following error message: >>> >>> Bad file descriptor in nativeavailable >>> >>> I cannot figure out where it is going wrong...anyone any ideas. A quick >>> answer would be wonderful, as I am kinda under the hammer to get this >> fixed >>> quickly >>> >>> Thanks in Advance >>> Keith >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From hambyiii at hotmail.com Fri Aug 4 07:52:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:52:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more information >has > > come to light (These errors are actually happening on a client machine, >on > > software that has worked for the past month, and only now has started to > > fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an orignal > > error. The original error occurs the first time I try to WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); > >> } > >> catch (IOException e) > >> { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance > >> Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I am > >>> connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Fri Aug 4 08:21:07 2006 From: gergg at cox.net (Gregg Wonderly) Date: Fri, 04 Aug 2006 09:21:07 -0500 Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: <44D357D3.40303@cox.net> Keith Thorne wrote: > Okay, I made a little mistake in my last message. > > The error is not occuring where I thought it was. Instead it is occuring > when I do the following: > > byte[] readBuffer = new byte[128]; > > try { > > } > catch (IOException e) > { > System.out.println(e.getMessage()); > } > > So I guess the error is happening on the inputStream.read(readBuffer) This is one of the most frustrating things to see over and over. The exception tells you exactly which line the error is occuring on, if you will use it to see where. In Java, these days, every class should do the following. import java.util.logging.*; public class MyClass { Logger log = Logger.getLogger( getClass().getName() ); ...in some method... { String data = ...; // any extra data like addresses or // ports which might be wrong and // cause an exception. try { ... } catch( SomeException ex ) { log.log( Level.SEVERE, ex.toString()+": "+data, ex ); } } } By default, you will see all of the appropriate details of any exception logged at the WARNING or SEVERE level. You can read the javadocs about logging to get more information too. Once you do this, people can then turn up logging and get more information, or otherwise manage it with a logging configuration file or other tools such as JMX or my http://logman.dev.java.net project. Gregg Wonderly From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 09:15:24 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 09:15:24 -0600 Subject: [Rxtx] error getting InputStream Message-ID: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Keith, Please send the full stack trace of the exception, may be I can help you. On Trent's question regarding physical 'Serial Port', do you mean you have a USB(Connected to Client Machine) to 9 Pin Serial cable(Connected to H/W device)? Also please mention which java version you are using? Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Keith Thorne Sent: Friday, August 04, 2006 7:52 AM To: rxtx at qbang.org Subject: Re: [Rxtx] error getting InputStream The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more > > information >has > > come to light (These errors are actually happening on a client > > machine, >on > > software that has worked for the past month, and only now has > > started to fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an > > orignal error. The original error occurs the first time I try to > > WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); } catch (IOException > >> e) { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the > >> inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which > >>> is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I > >>> am connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out > >>> the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get > >>> this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 14:36:16 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 14:36:16 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Trent, As discussed over the phone yesterday, I am emailing you all the details of the bugs I have been experiencing. We do not use Serial Ports like most of the applications. Our application uses approx 80 -100 serial ports (attached thru Digi boxes) which are opened and closed every 20 sec to 1 minute depending upon the type of device. Some Serial ports are left opened all the time and receive event based serial calls while other devices uses polling (request and reply) to collect data. So the opening and closing of the Serial Ports is not really in a sequential order as you mentioned in our conversation yesterday. Also 2 same serial ports can never be opened at one time we have business locks to prevent that from happening. Our findings so far (of course with the help of RXTX user group): The real culprit is in the SerialImp.c file, somehow the other the Event Info Structure in the Linked List gets damaged and loses references to the original EIS structure. I believe both the problems are caused because of the corruption of EIS packet. I have noticed that the link list traversal of EIS in the following methods under SerialImp.c : 1)initialise_event_info_struct 2)finalize_event_info_struct 3)interruptEventLoop So culprit code might be in one of these methods. I am currently using JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and Fedora Core 5). I am also attaching a Test Class to replicate the problem. You need to modify the class and add your systems Serial ports into the code and execute. java TestOpenClosePort 100 It will open and close all the serial ports 100 times in there own thread. Please let me know, I will be available thru out this weekend and can help you as much as I can with testing. Regards Pawan Kharbanda CDOT-ITS 303-478-2991 (cell) 303-985-4350 (home) -------------- next part -------------- A non-text attachment was scrubbed... Name: TestOpenClosePort.java Type: application/octet-stream Size: 6139 bytes Desc: TestOpenClosePort.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dd3754d9/TestOpenClosePort-0001.obj From tjarvi at qbang.org Fri Aug 4 15:43:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 15:43:09 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: Thanks, I'll look at it tomorrow morning. I don't know when I'll find the solution but you may check email tomorrow afternoon to see if I think I found it. On Fri, 4 Aug 2006, Kharbanda, Pawan wrote: > Trent, > As discussed over the phone yesterday, I am emailing you all the > details of the bugs I have been experiencing. We do not use Serial Ports > like most of the applications. Our application uses approx 80 -100 > serial ports (attached thru Digi boxes) which are opened and closed > every 20 sec to 1 minute depending upon the type of device. Some Serial > ports are left opened all the time and receive event based serial calls > while other devices uses polling (request and reply) to collect data. So > the opening and closing of the Serial Ports is not really in a > sequential order as you mentioned in our conversation yesterday. Also 2 > same serial ports can never be opened at one time we have business locks > to prevent that from happening. > > Our findings so far (of course with the help of RXTX user group): > > The real culprit is in the SerialImp.c file, somehow the other the Event > Info Structure in the Linked List gets damaged and loses references to > the original EIS structure. I believe both the problems are caused > because of the corruption of EIS packet. I have noticed that the link > list traversal of EIS in the following methods under SerialImp.c : > > 1)initialise_event_info_struct > 2)finalize_event_info_struct > 3)interruptEventLoop > > So culprit code might be in one of these methods. I am currently using > JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and > Fedora Core 5). > > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > > Regards > Pawan Kharbanda > CDOT-ITS > 303-478-2991 (cell) > 303-985-4350 (home) > > > > > > > > > > From tjarvi at qbang.org Sat Aug 5 12:32:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:32:40 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:34:27 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:34:27 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> You need to run it few times. More the number of ports, more frequently you can reproduce. With just 2 ports it will be hard to reproduce frequently. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:33 PM To: Kharbanda, Pawan Cc: tjarvi at qbang.org; RXTX Developers and Users Subject: Re: Port Locking / JVM Crashing > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Aug 5 12:52:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:52:26 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> Message-ID: Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more frequently > you can reproduce. With just 2 ports it will be hard to reproduce > frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:57:49 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:57:49 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Trent, I have 5 ports of Digi and I can reproduce almost every time. Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX version -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:52 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more > frequently you can reproduce. With just 2 ports it will be hard to > reproduce frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need >> to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From tjarvi at qbang.org Sat Aug 5 13:06:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:06:07 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Message-ID: You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few thousand > iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:07:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:07:33 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E659@hqexchange3.dot.state.co.us> We use our own locks but I haven't turned off the RXTX locks. I am still using the RXTX locks that might be the difference. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:13:22 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:13:22 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Trent, How can you turn off the lock files? I can try using that. I never tried that, I thought you can't turn off the file locking. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From tjarvi at qbang.org Sat Aug 5 13:18:53 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:18:53 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Message-ID: Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java > -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except lockfiles > are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:31:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:31:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Trent, I am able to constantly replicate almost everytime even when I have locks disabled. Don't know the reason why you are not able to on your environment. Any suggestions??????? Cycle No (Thread ::: /dev/cuf04) ::::::: 7 Cycle No (Thread ::: /dev/cuf01) ::::::: 7 Cycle No (Thread ::: /dev/cuf02) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) Exiting Thread ::: /dev/cuf03 Cycle No (Thread ::: /dev/cuf03) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent Port /dev/cuf01 is Opened 0x01 Sent Port /dev/cub01 is Opened 0x01 Sent Port /dev/cuf01 is Closed Port /dev/cuf02 is Closed Port /dev/cuf03 is Closed Port /dev/cuf04 is Closed Port /dev/cub01 is Closed Exiting Thread ::: /dev/cuf03 Exiting Thread ::: /dev/cuf02 Cycle No (Thread ::: /dev/cuf03) ::::::: 8 Cycle No (Thread ::: /dev/cuf02) ::::::: 8 Exiting Thread ::: /dev/cuf04 Exiting Thread ::: /dev/cuf01 Cycle No (Thread ::: /dev/cuf01) ::::::: 8 Cycle No (Thread ::: /dev/cuf04) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened 0x01 Sent Port /dev/cuf01 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 # # An error report file with more information is saved as hs_err_pid21386.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:19 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) > 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux > java -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except > lockfiles are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code >>>> and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm >>> running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From tjarvi at qbang.org Sat Aug 5 14:14:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 14:14:49 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: I'd stick a couple $15 dual port serial boards in the machine to see if its kernel driver specific. I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more problematic. They do not get the same number of eyes looking for problems. You could try putting #undef TIOCSERGETLSR #undef TIOCGICOUNT in the very top of SerialImp.h or one or the other to flip bits of code off and on. The kernel here is 2.6.11.4-20a-smp from Suse. glibc is 2.3.4-23.4 from Suse the jre is 1.5.0_06-b05 from Sun. The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC ram. You should be able to reproduce what I'm seeing then go from there. I don't think I'm going to see this problem without having the same cornercase hardware you have. Maybe we can work that out off the list but I doubt I'm going to find it in rxtx at this point. I have seen problems in the past were kernel structs don't match user space struct and bad things happen but I was including a kernel struct to get functionality that had not made its way into user space at the time. The only thing I may be missing is that when I write 0x01 out the port, nothing comes back. That was not specified but you could easily disconnect anything connected to the ports to see if that changes anything. rxtx is far from bug free but I do not see anything yet. On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I am able to constantly replicate almost everytime even when I have > locks disabled. Don't know the reason why you are not able to on your > environment. Any suggestions??????? > > > Cycle No (Thread ::: /dev/cuf04) ::::::: 7 > Cycle No (Thread ::: /dev/cuf01) ::::::: 7 > Cycle No (Thread ::: /dev/cuf02) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > Exiting Thread ::: /dev/cuf03 > Cycle No (Thread ::: /dev/cuf03) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > Port /dev/cuf01 is Opened > 0x01 Sent > Port /dev/cub01 is Opened > 0x01 Sent > Port /dev/cuf01 is Closed > Port /dev/cuf02 is Closed > Port /dev/cuf03 is Closed > Port /dev/cuf04 is Closed > Port /dev/cub01 is Closed > Exiting Thread ::: /dev/cuf03 > Exiting Thread ::: /dev/cuf02 > Cycle No (Thread ::: /dev/cuf03) ::::::: 8 > Cycle No (Thread ::: /dev/cuf02) ::::::: 8 > Exiting Thread ::: /dev/cuf04 > Exiting Thread ::: /dev/cuf01 > Cycle No (Thread ::: /dev/cuf01) ::::::: 8 > Cycle No (Thread ::: /dev/cuf04) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > 0x01 Sent > Port /dev/cuf01 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 > # > # An error report file with more information is saved as > hs_err_pid21386.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > Aborted > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:19 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Lockfiles are a compile time option. I've turned them on now, corrected > a mistake resulting in only 3 ports being used and now have it going > through a few hundred iterations again without a crash. > > To disable lockfiles.. > > ./configure --disable-lockfiles && make install > > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > Port /dev/ttyS5 is Closed > Exiting Thread ::: /dev/ttyS1 > Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: > /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting > Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port > /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS1 is Closed > Port /dev/ttyS4 is Closed > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > > > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, How can you turn off the lock files? I can try using that. I >> never tried that, I thought you can't turn off the file locking. >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:06 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> You may try 4 ports instead of 5 to make sure thats not the issue. >> >> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >> 2.6.11.4-20a-smp >> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >> java -version java version "1.5.0_06" >> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >> >> I'm using rxtx 2.1-7 (final) with default configuration except >> lockfiles are disabled. I gathered that you are doing your own > resource locking. >> >> ... >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> ... >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>> version >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:52 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> Whats a few times? I've got 4 ports here and have run it a few >>> thousand iterations. >>> >>> Is that true for you if you run it with just four of your DIGI ports? >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> You need to run it few times. More the number of ports, more >>>> frequently you can reproduce. With just 2 ports it will be hard to >>>> reproduce frequently. >>>> >>>> ~pk >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:33 PM >>>> To: Kharbanda, Pawan >>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>> Subject: Re: Port Locking / JVM Crashing >>>> >>>>> I am also attaching a Test Class to replicate the problem. You need > >>>>> to >>>> >>>>> modify the class and add your systems Serial ports into the code >>>>> and >> >>>>> execute. >>>>> >>>>> java TestOpenClosePort 100 >>>>> >>>>> It will open and close all the serial ports 100 times in there own >>>>> thread. >>>>> >>>>> Please let me know, I will be available thru out this weekend and >>>>> can >>> >>>>> help you as much as I can with testing. >>>>> >>>> >>>> How reproducable is the problem with the above testcase? I'm >>>> running >> >>>> 100's of iterations without reproducing the problem. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> >>> >> > From rtlane01 at comcast.net Tue Aug 1 19:22:03 2006 From: rtlane01 at comcast.net (Randall T. Lane) Date: Tue, 01 Aug 2006 21:22:03 -0400 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] Message-ID: <44CFFE3B.90001@comcast.net> Rxtx Community: Please see my e-mail to Trent. Does anyone have any experience using rxtx to successfully communicate with hardware via USB? Thanks. Randy Lane -------------- next part -------------- An embedded message was scrubbed... From: Trent Jarvi Subject: Re: Help with RxTx for USB Communication Date: Tue, 1 Aug 2006 18:49:13 -0600 (MDT) Size: 3300 Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060801/9bbbc255/HelpwithRxTxforUSBCommunication-0001.mht From naranjo.manuel at gmail.com Sun Aug 6 16:59:28 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Sun, 06 Aug 2006 19:59:28 -0300 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44CFFE3B.90001@comcast.net> References: <44CFFE3B.90001@comcast.net> Message-ID: <44D67450.8010100@gmail.com> Randy: I have been able to communicate to AIRcable USB Bluetooth Dongle, with success. I'm not sure which are the options that you have to send to RXTX library, but you can indeed. Check that you do not have the port avaible for much long. I have heard of a problem with WinXP that it simply turn off virtual ports when they are too much long with out activity. If you want I can send you my code, because it is avaible under GPL, the new release is not avaible at AIRcable web site, but it should in short time. Regards, Manu > Rxtx Community: > > Please see my e-mail to Trent. Does anyone have any experience using > rxtx to successfully communicate with hardware via USB? > > Thanks. > > Randy Lane > > ------------------------------------------------------------------------ > > Asunto: > Re: Help with RxTx for USB Communication > De: > Trent Jarvi > Fecha: > Tue, 1 Aug 2006 18:49:13 -0600 (MDT) > Para: > "Randall T. Lane" > > Para: > "Randall T. Lane" > CC: > taj at www.linux.org.uk > > > On Tue, 1 Aug 2006, Randall T. Lane wrote: > >> Trent, >> >> I am working on a project written in Java (1.5) and need to >> communicate to an external device via a USB port. >> >> I have downloaded rxtx-2.1-7-bins-r2.zip from www.rxtx.org and setup >> a Java test project to learn how to use rxtx. I am able to list the >> serial ports available, however rxtx does not recognize my USB port. >> I am running on Windows XP. Here is some output from my test project >> ... >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> COM1 - Serial >> COM3 - Serial >> LPT1 - Parallel >> >> I would appreciate any help you could provide in getting rxtx to >> allow me to communicate via my USB port. >> >> Here is my code, if that would help. >> >> public static void main(String[] args) { >> listPorts(); >> // The listPorts() and getPortTypeName() methods are used for >> port identification. >> static void listPorts() >> { >> Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); >> while ( portEnum.hasMoreElements() ) >> { >> CommPortIdentifier portIdentifier = (CommPortIdentifier) >> portEnum.nextElement(); >> System.out.println(portIdentifier.getName() + " - " + >> getPortTypeName(portIdentifier.getPortType()) ); >> } } >> static String getPortTypeName ( int portType ) >> { >> switch ( portType ) >> { >> case CommPortIdentifier.PORT_I2C: >> return "I2C"; >> case CommPortIdentifier.PORT_PARALLEL: >> return "Parallel"; >> case CommPortIdentifier.PORT_RAW: >> return "Raw"; >> case CommPortIdentifier.PORT_RS485: >> return "RS485"; >> case CommPortIdentifier.PORT_SERIAL: >> return "Serial"; >> default: >> return "unknown type"; >> } >> } >> >> Thanks. >> >> Randy Lane >> > > Hi Randy > > The rxtx mail list is a better place to ask as there are more eyes. > I'm swamped with work. > > Be sure to look to see that your serial port dongle shows up as a > serial port in device manager and no other applications have it open. > USB serial dongles do work with rxtx. Some are less complete than > others. > > -- > Trent Jarvi > tjarvi at qbang.org > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From eddythejekyll at gmail.com Sun Aug 6 23:31:45 2006 From: eddythejekyll at gmail.com (Ed) Date: Sun, 6 Aug 2006 23:31:45 -0600 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? Message-ID: I have written a simple client server (RMI) application without using RxTx where the server controls a parallel port simply by addressing the port and banging the bits in order to drive a relay. It also reads the port's. I am doing this by making Runtime.exec calls to a binary that actually does the parallel port bit banging and reading. However, I'd like to use RxTx so it is a pure Java application, and I've so far installed and figured out how to discover the ports, but I'm having trouble finding good examples or some howto type documentation for this. I did find the two examples on the Wiki: one for serial IO and the other to discover the ports on a system. As I said, I have so far installed RxTx and gotten it to compile and run and I can identify the ports. When I run the server I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found Ports! Found port COM1 Found port COM3 Found port LPT1 LPT1 Not Currently owned EASSwitch Server starting. EASSwitch is bound. Server Ready. So it looks like thing are installed and working, but I feel all dressed up and no idea how to proceed. Basically, I just want to be able to toggle the data lines on the parallel port and read them. Very simple. No parallel printer type usage. Are there any examples I can work off of? If so, please advise. Thank you. -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060806/c7e39898/attachment-0001.html From hambyiii at hotmail.com Sun Aug 6 23:53:54 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Mon, 07 Aug 2006 05:53:54 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Message-ID: Hi, sorry I took the weekend to reply, but I was away for the last couple of days. Unfortunately I cannot send the full stack trace yet. The problem is not, unfortunately, happening on my computer, but on a clients computer, which I will go and visit today. I will hopefully be able to get a stack trace then. As to the physical connection, tt is indeed a USB from the computer, connected to a 9 pin serial device that connects to the hard-ware. My java version is 1.5.06 >From: "Kharbanda, Pawan" >Reply-To: RXTX Developers and Users >To: "RXTX Developers and Users" >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 09:15:24 -0600 > >Keith, > Please send the full stack trace of the exception, may be I can help >you. On Trent's question regarding physical 'Serial Port', do you mean >you have a USB(Connected to Client Machine) to 9 Pin Serial >cable(Connected to H/W device)? > >Also please mention which java version you are using? > >Thanks >Pawan Kharbanda > > >-----Original Message----- >From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >Of Keith Thorne >Sent: Friday, August 04, 2006 7:52 AM >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream > >The physical serial port is actually a USB connection that is then >changed to a "virtual serial port", so I can use the serial port >protocols to connect to it. The other end of the connection is a >hardware device that is constantly turned on. I am not sure about the >port 'vanishing'...we have another piece of software that came with the >hardware device, which we can test the device (and with it the virtual >serial port) with. This has no problem connecting to the serial port or >writing to/reading from the device. >It is only when my software is run, that the error occurs. Like I have >said, my software (using rxtx) is connecting to the serial port >successfully, but it is when I try and write to the serial port that I >get the error. > >Although to be truthful, I am not absolutely certain if the error is >happening on the oStream.write() or the oStream.flush(). I only think it >is the write(), because that is where the writeArray() function is >called. > >thanks >Keith > > > >From: Trent Jarvi > >Reply-To: RXTX Developers and Users > >To: RXTX Developers and Users > >Subject: Re: [Rxtx] error getting InputStream > >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > > > > >Hi Keith > > > >Can you tell us more about the physical serial port? Might it be > >'vanishing?' > > > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > > > Hi, > > > > > > I know I am replying to myself a lot at the moment, but more > > > information > >has > > > come to light (These errors are actually happening on a client > > > machine, > >on > > > software that has worked for the past month, and only now has > > > started to fail, which is why I am a little slow finding things out) > > > > > > The errors I have already written about are only symptoms of an > > > orignal error. The original error occurs the first time I try to > > > WRITE thte > > > OutputStream: > > > > > > OutputStream oStream = serialPort.getOutputStream(); > > > serialPort.notifyOnOutputEmpty(true); > > > > > > byte[] bs = encodeMessage(configString.toString()); > > > > > > oStream.write(bs); > > > oStream.flush(); > > > > > > The error occurs on oStream.write(bs); and is: > > > > > > Input/output error in writeArray > > > > > > Now writeArray is native code, so I have no idea what is going on >there. > >Any > > > help would be appreciated > > > Thanks > > > Keith > > > > > > > > >> From: "Keith Thorne" > > >> Reply-To: RXTX Developers and Users > > >> To: rxtx at qbang.org > > >> Subject: Re: [Rxtx] error getting InputStream > > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > > >> > > >> Okay, I made a little mistake in my last message. > > >> > > >> The error is not occuring where I thought it was. Instead it is > >occuring > > >> when I do the following: > > >> > > >> byte[] readBuffer = new byte[128]; > > >> > > >> try { > > >> > > >> int numBytes = 0; > > >> try { > > >> Thread.sleep(500); > > >> } > > >> catch (InterruptedException e) > > >> {} > > >> > > >> while (inputStream.available() > 0) > > >> { > > >> numBytes = inputStream.read(readBuffer); > > >> } > > >> > > >> processReceivedData(readBuffer, numBytes); } catch (IOException > > >> e) { > > >> System.out.println(e.getMessage()); > > >> } > > >> > > >> So I guess the error is happening on the > > >> inputStream.read(readBuffer) > > >> > > >> again, any help is appreciated and again, thanks in advance Keith > > >> > > >>> From: "Keith Thorne" > > >>> Reply-To: RXTX Developers and Users > > >>> To: rxtx at qbang.org > > >>> Subject: [Rxtx] error getting InputStream > > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > > >>> > > >>> Hi, > > >>> > > >>> I have written a program in Java for Windows xp using RXTX (which > > >>> is > >why > > >> I > > >>> am using this mailing list :). However, I am getting a problem. I > > >>> am connecting to a serial port, like so: > > >>> private CommPortIdentifier portID; > > >>> > > >>> private boolean openPort(String selectedPort) > > >>> { > > >>> boolean portFound = false; > > >>> Enumeration portList; > > >>> > > >>> portList = CommPortIdentifier.getPortIdentifiers(); > > >>> > > >>> while (portList.hasMoreElements()) > > >>> { > > >>> portID = (CommPortIdentifier) portList.nextElement(); > > >>> if (portID.getPortType() == > >CommPortIdentifier.PORT_SERIAL) > > >>> { > > >>> if (portID.getName().equals(selectedPort)) > > >>> { > > >>> portFound = true; > > >>> break; > > >>> } > > >>> } > > >>> } > > >>> > > >>> return portFound; > > >>> } > > >>> > > >>> and then I try and get the serial port input stream (leaving out > > >>> the > >try > > >>> and > > >>> catch for the sake of space): > > >>> > > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", > >2000); > > >>> InputStream inputStream = serialPort.getInputStream(); > > >>> > > >>> but on the getInputStream() I get the following error message: > > >>> > > >>> Bad file descriptor in nativeavailable > > >>> > > >>> I cannot figure out where it is going wrong...anyone any ideas. A > >quick > > >>> answer would be wonderful, as I am kinda under the hammer to get > > >>> this > > >> fixed > > >>> quickly > > >>> > > >>> Thanks in Advance > > >>> Keith > > >>> > > >>> > > >>> _______________________________________________ > > >>> Rxtx mailing list > > >>> Rxtx at qbang.org > > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > > >> > > >> > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Aug 7 06:22:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:22:03 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: Hmm.. I left the test running went I went home Saturday. It looks like something did show up after ~30k iterations. I'll look at it more in my free time. Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS5 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 29417 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 29417 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 29417 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00002aab14c2ec63, pid=20573, tid=1095125344 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6c63] initialise_event_info_struct+0x63 # [thread 1087756640 also had an error] Port /dev/ttyS5 is Opened 0x01 Sent [thread 1089861984 also had an error] Port /dev/ttyS4 is Opened 0x01 Sent [thread 1090914656 also had an error] # An error report file with more information is saved as [thread 1090914656 also had an error] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted On Sat, 5 Aug 2006, Trent Jarvi wrote: > > I'd stick a couple $15 dual port serial boards in the machine to see if its > kernel driver specific. > > I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more > problematic. They do not get the same number of eyes looking for problems. > > You could try putting > > #undef TIOCSERGETLSR > #undef TIOCGICOUNT > > in the very top of SerialImp.h or one or the other to flip bits of code off > and on. > > The kernel here is 2.6.11.4-20a-smp from Suse. > glibc is 2.3.4-23.4 from Suse > the jre is 1.5.0_06-b05 from Sun. > > The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC > ram. > > You should be able to reproduce what I'm seeing then go from there. I don't > think I'm going to see this problem without having the same cornercase > hardware you have. Maybe we can work that out off the list but I doubt I'm > going to find it in rxtx at this point. > > I have seen problems in the past were kernel structs don't match user space > struct and bad things happen but I was including a kernel struct to get > functionality that had not made its way into user space at the time. > > The only thing I may be missing is that when I write 0x01 out the port, > nothing comes back. That was not specified but you could easily disconnect > anything connected to the ports to see if that changes anything. > > rxtx is far from bug free but I do not see anything yet. > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, >> I am able to constantly replicate almost everytime even when I have >> locks disabled. Don't know the reason why you are not able to on your >> environment. Any suggestions??????? >> >> >> Cycle No (Thread ::: /dev/cuf04) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> Exiting Thread ::: /dev/cuf03 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> Port /dev/cuf01 is Opened >> 0x01 Sent >> Port /dev/cub01 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Closed >> Port /dev/cuf02 is Closed >> Port /dev/cuf03 is Closed >> Port /dev/cuf04 is Closed >> Port /dev/cub01 is Closed >> Exiting Thread ::: /dev/cuf03 >> Exiting Thread ::: /dev/cuf02 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 8 >> Exiting Thread ::: /dev/cuf04 >> Exiting Thread ::: /dev/cuf01 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf04) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 >> # >> # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 >> # >> # An error report file with more information is saved as >> hs_err_pid21386.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> Aborted >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:19 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Lockfiles are a compile time option. I've turned them on now, corrected >> a mistake resulting in only 3 ports being used and now have it going >> through a few hundred iterations again without a crash. >> >> To disable lockfiles.. >> >> ./configure --disable-lockfiles && make install >> >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> Port /dev/ttyS5 is Closed >> Exiting Thread ::: /dev/ttyS1 >> Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: >> /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting >> Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port >> /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> >> >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, How can you turn off the lock files? I can try using that. I >>> never tried that, I thought you can't turn off the file locking. >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 1:06 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> You may try 4 ports instead of 5 to make sure thats not the issue. >>> >>> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >>> 2.6.11.4-20a-smp >>> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >>> java -version java version "1.5.0_06" >>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >>> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >>> >>> I'm using rxtx 2.1-7 (final) with default configuration except >>> lockfiles are disabled. I gathered that you are doing your own >> resource locking. >>> >>> ... >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> Port /dev/ttyS4 is Closed >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> ... >>> >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>>> version >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:52 PM >>>> To: Kharbanda, Pawan >>>> Cc: Trent Jarvi; RXTX Developers and Users >>>> Subject: RE: Port Locking / JVM Crashing >>>> >>>> >>>> Whats a few times? I've got 4 ports here and have run it a few >>>> thousand iterations. >>>> >>>> Is that true for you if you run it with just four of your DIGI ports? >>>> >>>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>>> >>>>> You need to run it few times. More the number of ports, more >>>>> frequently you can reproduce. With just 2 ports it will be hard to >>>>> reproduce frequently. >>>>> >>>>> ~pk >>>>> >>>>> -----Original Message----- >>>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>>> Sent: Saturday, August 05, 2006 12:33 PM >>>>> To: Kharbanda, Pawan >>>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>>> Subject: Re: Port Locking / JVM Crashing >>>>> >>>>>> I am also attaching a Test Class to replicate the problem. You need >> >>>>>> to >>>>> >>>>>> modify the class and add your systems Serial ports into the code >>>>>> and >>> >>>>>> execute. >>>>>> >>>>>> java TestOpenClosePort 100 >>>>>> >>>>>> It will open and close all the serial ports 100 times in there own >>>>>> thread. >>>>>> >>>>>> Please let me know, I will be available thru out this weekend and >>>>>> can >>>> >>>>>> help you as much as I can with testing. >>>>>> >>>>> >>>>> How reproducable is the problem with the above testcase? I'm >>>>> running >>> >>>>> 100's of iterations without reproducing the problem. >>>>> >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> >>>> >>> >> > From iinjlv01 at gmail.com Mon Aug 7 06:22:07 2006 From: iinjlv01 at gmail.com (J LV) Date: Mon, 7 Aug 2006 14:22:07 +0200 Subject: [Rxtx] Data lost or Slow sampling Message-ID: Hello I am using RXTX to comm with a motion controller using Serial Port and i can write the commands using SerialPort or RXTXPort without problems, but when i try write and read at high sampling rate, for example to know the position and speed at every moment of a trajectory, i obtain a very irregular response times. I am using the most simple algorimth: 1-Write the command "is trajectory finished?" and wait for SerialPortEvent.DATA_AVAILABLE 2-Read the InputStreamReader of serial port while not empty 3-If trajectory finished then stop program, else, continue 4-Read actual time using System.currentTimeMillis() (t0) 5-Write the command "give me position" and wait for SerialPortEvent.DATA_AVAILABLE 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) 7-Read the InputStreamReader of serial port while not empty 8-Save position in Vector or ArrayList and repeat from 1 I don't know if the problem is the RXTX, my program or the motion controller hardware but i have response times from 16 millis to 78 millis at 19200 bauds!. I am using SwingWorked to threading SerialPort reading/writing process. Any idea or similar data leak problem? Thanks for RXTX project and sorry for my badde english! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/909a4cb3/attachment-0001.html From tjarvi at qbang.org Mon Aug 7 06:50:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:50:10 -0600 (MDT) Subject: [Rxtx] Data lost or Slow sampling In-Reply-To: References: Message-ID: On Mon, 7 Aug 2006, J LV wrote: > Hello > > I am using RXTX to comm with a motion controller using Serial Port and i can > write the commands using SerialPort or RXTXPort without problems, but when i > try write and read at high sampling rate, for example to know the position > and speed at every moment of a trajectory, i obtain a very irregular > response times. I am using the most simple algorimth: > 1-Write the command "is trajectory finished?" and wait for > SerialPortEvent.DATA_AVAILABLE > 2-Read the InputStreamReader of serial port while not empty > 3-If trajectory finished then stop program, else, continue > 4-Read actual time using System.currentTimeMillis() (t0) > 5-Write the command "give me position" and wait for > SerialPortEvent.DATA_AVAILABLE > 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) > 7-Read the InputStreamReader of serial port while not empty > 8-Save position in Vector or ArrayList and repeat from 1 > > > I don't know if the problem is the RXTX, my program or the motion controller > hardware but i have response times from 16 millis to 78 millis at 19200 > bauds!. I am using SwingWorked to threading SerialPort reading/writing > process. > > Any idea or similar data leak problem? > > Thanks for RXTX project and sorry for my badde english! > This can be platform dependant. What you may do for a starting point is use a loopback connection and time the same thing at 19200. Write the date, wait for data available, read the data. I would expect from write to data available to take around 10 ms from past experiences. You can experiment with turning on and off buffering in the port settings of the OS, if the OS supports more realtime like interrupts, that could help. You have a java schedual and the kernel schedual. Serial interrupts traditionally have very high priority but modern OSs tend to realize thats not good for GUIs, ... and delay responding to the interrupts. You should be able to have usec response times in a realtime OS. Windows and Linux are not typically setup as realtime OSs. For comparison, the last time I looked which was about 5 years ago, windows NT4 came back with data available in 8 ms and Linux came back in 10 ms. I would be interested in seeing what you get today. -- Trent Jarvi tjarvi at qbang.org From gergg at cox.net Mon Aug 7 09:21:56 2006 From: gergg at cox.net (Gregg Wonderly) Date: Mon, 07 Aug 2006 10:21:56 -0500 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? In-Reply-To: References: Message-ID: <44D75A94.9030205@cox.net> Ed wrote: > Are there any examples I can work off of? If so, please advise. Just read the javax.comm javadocs. You need to take the parallel port and write values to it based on which bits of which lines you want on and off. Gregg Wonderly From pete.flugstad at gmail.com Mon Aug 7 09:36:19 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 7 Aug 2006 10:36:19 -0500 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44D67450.8010100@gmail.com> References: <44CFFE3B.90001@comcast.net> <44D67450.8010100@gmail.com> Message-ID: <84d4a6d50608070836v97e9a29q96e98441ea903ac7@mail.gmail.com> FYI, I'm talking to a USB<->Serial dongle just fine under Windows XP Pro. I did have to install a driver for the thing - Windows XP by default, did not recognize it. Once installed, it just showed up as another COM port, and I've been pushing data over it with no problems. Pete From savagobr at yahoo.com Mon Aug 7 10:13:06 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Mon, 7 Aug 2006 09:13:06 -0700 (PDT) Subject: [Rxtx] Port Locking / JVM Crashing: 2 ports (Serial + usb) Message-ID: <20060807161306.9648.qmail@web53803.mail.yahoo.com> Trent This is curious, since I did reproduced the aformentioned bug using only 2 ports: /dev/ttyS0 and /dev/ttyUSB0. It only need to run for 500 times: $ java -cp . TestOpenClosePort 500 500 Port /dev/ttyS0 is Closed Excpetion ::: Thread ::: /dev/ttyUSB0null Exiting Thread ::: /dev/ttyUSB0 Cycle No (Thread ::: /dev/ttyUSB0) ::::::: 227 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 184 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x203d2044, pid=32368, tid=2986859424 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing) # Problematic frame: # C 0x203d2044 # # An error report file with more information is saved as /tmp/hs_err_pid32368.log # # If you would like to submit a bug report, please visit: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Best regards Savago ps: Test environment $ uname -a Linux localhost.localdomain 2.6.15-1.2054_FC5 #1 Tue Mar 14 15:48:33 EST 2006 i686 i686 i386 GNU/Linux $ java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) $gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.1 20060525 (Red Hat 4.1.1-1) --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/c6ca8094/attachment-0001.html From Pawan.Kharbanda at dot.state.co.us Mon Aug 7 17:23:25 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 7 Aug 2006 17:23:25 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Trent, I think I got the problem fixed after some code changes in the C (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the staging environment (with 10 devices) with real time data and haven't seen a JVM lock/ Port locking since last night. I am going to do further stress testing and will send all my code changes and my findings in next few days. I believe the problem was causing due to the digi drivers and how the Linux kernel talked to it, so after making some code changes and synchronization fixes, I got it to work. I am keeping my fingers crossed :) Thanks for all your help. You have been a great help. Will keep you posted. Cheers ~pk PS : We are going to test my new RXTX changes with the 2.6 Red Hat kernel (currently using 2.4.21-37.ELsmp) too. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 5:08 PM To: Kharbanda, Pawan Subject: RE: Port Locking / JVM Crashing Hi Pawan As mentioned I did reproduce the error but after several hours of cycles. I'm looking at RXTXPort.java and thinking about what may be happening. The error is in the C layer but it may be preventable in the java code. lets say two closes are overlapping or an operation is trying to happen while another port is closing. The structure may be out of sync by the time the code using the structure in another thread gets to the event info struct. So I'm wondering if synchronization in RXTXPort() and close() may help you. A second thing that may help is you can put printf("got here\n"); in each of the lines in initialize event info struct to verify that the problem is in walking the linked list. Thats my suspicion. So a properly timed close() while calling the constructor may be catching rxtx off guard. You can synchronize to test that and it may do away with the problem. From tjarvi at qbang.org Mon Aug 7 18:01:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 18:01:54 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Message-ID: Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do further > stress testing and will send all my code changes and my findings in next > few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to happen > while another port is closing. The structure may be out of sync by the > time the code using the structure in another thread gets to the event > info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may do > away with the problem. > From Pawan.Kharbanda at dot.state.co.us Tue Aug 8 13:49:14 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 8 Aug 2006 13:49:14 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Trent, I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and have absolutely no problem with JVM crashing or Port Locking even after 10000 operations (now I am trying 100,000 :). This is all with the original RXTX 2.1.7 (final) api's without any of my fixes that I have been trying for last 2-3 weeks. I will suggest that we update the INSTALL or Readme file accompnying the RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: 82000685_G 02/02/2006). This should helped everybody using the RXTX API's with RedHat Linux atleast. Regards Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 6:02 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do > further stress testing and will send all my code changes and my > findings in next few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers > crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to > happen while another port is closing. The structure may be out of > sync by the time the code using the structure in another thread gets > to the event info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may > do away with the problem. > From jimo at earthlink.net Wed Aug 9 21:21:00 2006 From: jimo at earthlink.net (Jim Owen) Date: Wed, 9 Aug 2006 20:21:00 -0700 Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat Message-ID: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Hi All, I've run into some difficulties with rxtx that have me baffled and need some help. I have an application that has used earlier versions of rxtx successfully and on a variety of platforms. We recently needed to deploy this application into an environment where we could not utilize lock files. I pulled down the 2.0.7 pre1 source distribution and executed configure with --disable-lockfiles. I then executed make and make install. When I execute the program, as root, I get the following error: ************************************************************************ Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) # Problematic frame: # C 0x00001004 # # An error report file with more information is saved as hs_err_pid20151.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # **************************************************************************** If I execute as a normal user, I get no errors, but no ports listed: (Using an earlier version, I get a serial and parallel port listed.) **************************************************************************** [jim at linuxDev ingenicoApp]$ java VerifyCommBuild Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Some ports appear to have been found, let's try to enumerate them. Complete. **************************************************************************** When I built rxtx, there was a warning given of the following: **************************************************************************** conftest.c: In function 'main': conftest.c:6: warning: incompatible implicit declaration of built-in function 'printf' conftest.c:7: warning: incompatible implicit declaration of built-in function 'exit' WARNING: Kernel include files do not match the current kernel **************************************************************************** uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux JAVA_HOME=/usr/java/j2sdk1.4.2_11 javax.comm.properties: Driver=gnu.io.RXTXCommDriver Here's the code for VerifyCommBuild.java that I'm using to test: **************************************************************************** import javax.comm.*; import java.util.Enumeration; /** * A quick app to check that the javax.comm (Serial) Communications extension has been properly * installed and configured on this machine. * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. */ public class VerifyCommBuild { public static void main(String args[]) { Enumeration ports; System.out.println("Verifying Comm Build Environment"); try { ports = CommPortIdentifier.getPortIdentifiers(); if (ports == null) { System.out.println("No comm ports found!"); return; } System.out.println("Some ports appear to have been found, let's try to enumerate them."); while (ports.hasMoreElements()) { System.out.println("Here is a port [" + ((CommPortIdentifier)ports.nextElement()).getName() + "]"); } } catch (Exception e) { System.out.println("Failed to enumerate ports [" + e.getMessage() + "]"); e.printStackTrace(); } System.out.println("Complete."); } } **************************************************************************** Any suggestions as to what I'm missing? Thanks, Jim Owen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060809/92503a81/attachment-0001.html From tjarvi at qbang.org Thu Aug 10 05:39:36 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 05:39:36 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Message-ID: On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even after > 10000 operations (now I am trying 100,000 :). This is all with the > original RXTX 2.1.7 (final) api's without any of my fixes that I have > been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying the > RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp > and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From oliver.archner at bayceer.uni-bayreuth.de Wed Aug 9 06:13:36 2006 From: oliver.archner at bayceer.uni-bayreuth.de (Oliver Archner) Date: Wed, 09 Aug 2006 14:13:36 +0200 Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() Message-ID: <44D9D170.5020806@bayceer.uni-bayreuth.de> Dear Users, i would like to send a byte to a parallel device. The following piece of code works well but throws an IOException in LPRPort$ParallelOutputStream.write() saying that everything is ok ?! Oliver import java.io.*; import gnu.io.*; public class Test { public static void main(String[] args) { RXTXCommDriver TxPort = new RXTXCommDriver(); ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", CommPortIdentifier.PORT_PARALLEL); OutputStream oStream = null; try { oStream = pPort.getOutputStream(); oStream.write((byte)0x51); } catch (IOException e) { e.printStackTrace(); } finally { try { if (oStream != null) oStream.close(); } catch (IOException e) { e.printStackTrace(); } } } } Output: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Der Vorgang wurde erfolgreich beendet. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at Test.main(Test.java:12) From tjarvi at qbang.org Thu Aug 10 18:12:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 18:12:27 -0600 (MDT) Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() In-Reply-To: <44D9D170.5020806@bayceer.uni-bayreuth.de> References: <44D9D170.5020806@bayceer.uni-bayreuth.de> Message-ID: On Wed, 9 Aug 2006, Oliver Archner wrote: > Dear Users, > > i would like to send a byte to a parallel device. > The following piece of code works well but throws an IOException in > LPRPort$ParallelOutputStream.write() saying that everything is ok ?! > > Oliver > > > import java.io.*; > import gnu.io.*; > > public class Test { > > public static void main(String[] args) { > RXTXCommDriver TxPort = new RXTXCommDriver(); > ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", > CommPortIdentifier.PORT_PARALLEL); > OutputStream oStream = null; > try { > oStream = pPort.getOutputStream(); > oStream.write((byte)0x51); > } catch (IOException e) { > e.printStackTrace(); > } finally { > try { > if (oStream != null) oStream.close(); > } catch (IOException e) { > e.printStackTrace(); > > } > } > > } > } > > Output: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Der Vorgang wurde erfolgreich beendet. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at Test.main(Test.java:12) WriteFile is returning a negative value or 0. I do not know what that exception is saying but it should be an IO Exception. The native code in question is line 405 in ParallelImp.c. If you find the documentation pointing out how the code is wrong, we can fix it. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 08:12:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 09:12:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question Message-ID: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Hello, I'm trying to send data over a serial port using the RXTX libraries. I've got the binaries for Windows XP from qbang.org. On the receiving side, I'm using event notification (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial Ports InputStream. Similarly on the transmist side, I use SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. First question: does this make sense? The code was largely adopted from an existing Windows C++ program and that's more or less how it operated (overlapped io using ReadFile, WriteFile, GetOverlappedResult, Events, etc). Second question: in a small standalone test program I wrote, everything seems to work just fine - whenever SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good chunk of data available (I explicitly set the in/out buffers to 1024 bytes) to read. However, when I pull my "library" into a much larger environment (OSGI framework based, but same JVM/OS/etc), whenever SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a byte or two available. Needless to say, this really kills performance. Everything appears to still operate properly, just really, really slowly. So, has anyone seen this problem before? I haven't dived into the details of RXTX library, and I'm wondering what the mechanism is here? How does the RXTX thread determine when to issue the SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to tweak in RXTX or the JVM to get this to operate more like the small test program? Seems like I want RXTX to call me back _less_ often. Thanks, Pete From tjarvi at qbang.org Fri Aug 11 09:55:23 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 09:55:23 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Hello, > > I'm trying to send data over a serial port using the RXTX > libraries. I've got the binaries for Windows XP from qbang.org. > > On the receiving side, I'm using event notification > (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial > Ports InputStream. Similarly on the transmist side, I use > SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. > > First question: does this make sense? The code was largely adopted > from an existing Windows C++ program and that's more or less how it > operated (overlapped io using ReadFile, WriteFile, > GetOverlappedResult, Events, etc). > > Second question: in a small standalone test program I wrote, > everything seems to work just fine - whenever > SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good > chunk of data available (I explicitly set the in/out buffers to 1024 > bytes) to read. > > However, when I pull my "library" into a much larger environment > (OSGI framework based, but same JVM/OS/etc), whenever > SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a > byte or two available. Needless to say, this really kills > performance. Everything appears to still operate properly, just > really, really slowly. > > So, has anyone seen this problem before? I haven't dived into the > details of RXTX library, and I'm wondering what the mechanism is here? > How does the RXTX thread determine when to issue the > SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to > tweak in RXTX or the JVM to get this to operate more like the small > test program? > Seems like I want RXTX to call me back _less_ often. > Hi Pete RXTX is doing overlapped IO in termios.c. In this file we map the windows functionality to termios (mostly POSIX). From there, we just talk termios to all platforms. What I guess is happening is the eventloop is waiting a specified amount of time. As you application uses more cpu cycles, you observe the difference in behavior. You could go into the C code and change this after looking at the eventLoop() code in serialImp.c and following that to the serial_ioctl() and serial_select() in termios.c Another option is to go into RXTXPort.java and put a sleep in the sendEvent() code. This way you would not have to recompile the native code (not very easy at this point). -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 13:27:36 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:27:36 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > Another option is to go into RXTXPort.java and put a sleep in the > sendEvent() code. This way you would not have to recompile the native > code (not very easy at this point). Are the instructions in the INSTALL file still valid? If so, it wasn't very hard to build it (I already had MinGW installed). Everything seemed to build just fine. Haven't tried to install/use it yet, but it wasn't a big deal (assuming those instructions were correct. Thanks, Pete From pete.flugstad at gmail.com Fri Aug 11 13:42:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:42:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, but there doesn't appear to be a way to select that via RXTX (which appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control is selected). Is there a way I'm not seeing? Thanks, Pete From eddythejekyll at gmail.com Fri Aug 11 15:20:44 2006 From: eddythejekyll at gmail.com (Ed) Date: Fri, 11 Aug 2006 15:20:44 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion Message-ID: I'm trying to read and write a parallel port on a standard (Dell) pc running RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. I'm having problems getting rxtx to return a port enumeration from getPortIdentifiers. I'm using a file PortChooser.java as a test file to get things going. This is from the Java CookBook 2nd edition (Chapter 12). The call // get list of ports available on this particular computer, // by calling static method in CommPortIdentifier. Enumeration pList = CommPortIdentifier.getPortIdentifiers(); returns a null pList; I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and compile without --disable-lockfiles I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ... When I compile with --disable-lockfiles the call to getPortIdentifiers simply returns a null Enumeration. I've read the documention and threads about this issue and I feel like I've tried everything, so at the moment I'm stumped. I can supply any further info that may help. Thanks in advance. Ed -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060811/80c4eeec/attachment-0001.html From tjarvi at qbang.org Fri Aug 11 18:29:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:29:48 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > On 8/11/06, Trent Jarvi wrote: >> Another option is to go into RXTXPort.java and put a sleep in the >> sendEvent() code. This way you would not have to recompile the native >> code (not very easy at this point). > > Are the instructions in the INSTALL file still valid? If so, it > wasn't very hard to build it > (I already had MinGW installed). Everything seemed to build just > fine. Haven't tried to install/use it yet, but it wasn't a big deal > (assuming those instructions were correct. > Hi Pete The instructions are correct. You will want to make sure that the exports worked. If the library does not work properly, then the exports failed. The exports are currently generated with nm, sed and grep in the Makefile which is often commented out. If the def file is old, it will cause problems. You should be good to go then. Look at the serial_select and eventLoop code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:33:32 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:33:32 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > but there doesn't appear to be a way to select that via RXTX (which > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > is selected). > > Is there a way I'm not seeing? > Hi Pete I'm guessing I didn't know the difference. At the time, I really didn't have windows API documentation. I just had some pages I found with altivista/google. Later microsoft made their documentation available on msdn or I learned about it. For rxtx, the calls need to be platform neutral. So if you see how to do each in termios, then we can get it going. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:45:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:45:24 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Fri, 11 Aug 2006, Ed wrote: > I'm trying to read and write a parallel port on a standard (Dell) pc running > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. > > I'm having problems getting rxtx to return a port enumeration from > getPortIdentifiers. I'm using a file > PortChooser.java as a test file to get things going. This is from the Java > CookBook 2nd edition (Chapter 12). The call > > // get list of ports available on this particular computer, > // by calling static method in CommPortIdentifier. > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > returns a null pList; > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and > compile without --disable-lockfiles I get: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > ... > > When I compile with --disable-lockfiles the call to getPortIdentifiers > simply returns a null Enumeration. > > I've read the documention and threads about this issue and I feel like I've > tried everything, so at the moment I'm stumped. > > I can supply any further info that may help. > > Thanks in advance. > > Ed > Hi Ed You may want to check the permissions of /dev/lp*. Also make sure lp or your kernel support for lp is loaded. It should show up in dmesg and lsmod. For my laptop with no printer port enabled in BIOS is see: lp: driver loaded but no devices found in desg |grep lp [] $ ls -l /dev/lp* crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 here root and group lp can read and write. Normal users cannot. Try a simple read as a user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: Permission denied Fix as root [] chmod 666 /dev/lp* [] $ ls -l /dev/lp* crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 Now as user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: No such device or address So this is saying there is no lp0 on my laptop. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:58:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:58:31 -0600 (MDT) Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat In-Reply-To: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> References: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Message-ID: On Wed, 9 Aug 2006, Jim Owen wrote: > Hi All, > > I've run into some difficulties with rxtx that have me baffled and need > some help. > > I have an application that has used earlier versions of rxtx > successfully and on a variety of platforms. We recently needed to deploy > this application into an environment where we could not utilize lock files. > > I pulled down the 2.0.7 pre1 source distribution and executed configure > with --disable-lockfiles. I then executed make and make install. > > When I execute the program, as root, I get the following error: > > ************************************************************************ > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) > # Problematic frame: > # C 0x00001004 > # > # An error report file with more information is saved as hs_err_pid20151.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > **************************************************************************** > > If I execute as a normal user, I get no errors, but no ports listed: > (Using an earlier version, I get a serial and parallel port listed.) > > **************************************************************************** > [jim at linuxDev ingenicoApp]$ java VerifyCommBuild > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Some ports appear to have been found, let's try to enumerate them. > Complete. > **************************************************************************** > > When I built rxtx, there was a warning given of the following: > > **************************************************************************** > conftest.c: In function 'main': > conftest.c:6: warning: incompatible implicit declaration of built-in > function 'printf' > conftest.c:7: warning: incompatible implicit declaration of built-in > function 'exit' > > WARNING: Kernel include files do not match the current kernel > **************************************************************************** > > > uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 > Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux > > JAVA_HOME=/usr/java/j2sdk1.4.2_11 > > javax.comm.properties: Driver=gnu.io.RXTXCommDriver > > Here's the code for VerifyCommBuild.java that I'm using to test: > > > **************************************************************************** > import javax.comm.*; > import java.util.Enumeration; > /** > * A quick app to check that the javax.comm (Serial) Communications > extension has been properly > * installed and configured on this machine. > * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. > */ > public class VerifyCommBuild > { > public static void main(String args[]) > { > Enumeration ports; > System.out.println("Verifying Comm Build Environment"); > try > { > ports = CommPortIdentifier.getPortIdentifiers(); > if (ports == null) > { > System.out.println("No comm ports found!"); > return; > } > System.out.println("Some ports appear to have been found, let's > try to enumerate them."); > while (ports.hasMoreElements()) > { > System.out.println("Here is a port [" + > ((CommPortIdentifier)ports.nextElement()).getName() > + "]"); > } > } catch (Exception e) > { > System.out.println("Failed to enumerate ports [" + > e.getMessage() + "]"); > e.printStackTrace(); > } > System.out.println("Complete."); > } > } > Hi Jim This is a new one to me. Have you tried it on another system. Maybe something isnt sane in your toolchain. -- Trent Jarvi tarvi at qbang.org From eddythejekyll at gmail.com Sat Aug 12 11:45:39 2006 From: eddythejekyll at gmail.com (Ed) Date: Sat, 12 Aug 2006 11:45:39 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Trent, Right after I sent the results indicated below I re-ran the app and it apparently found the parallel port. The difference was that I set the permissions to : /dev: wildcard lp* crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 I'm still not sure how to interpret the dmesg and lsmod before. However I'm thinking that since the user now has permission to access the lp* port, a request to access it loaded the lp and parport modules automatically and allowed me access. Here's the output of lsmod now: ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp lp 5540 0 (autoclean) parport 21608 1 (autoclean) [parport_pc lp] and dmesg: ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp On node 0 totalpages: 161776 lp0: using parport0 (polling). So I think I'm good, and ready to move on the next steps. Thanks Trent! Ed On 8/12/06, Ed wrote: > > Thanks for the reply Trent. > > I'm on a different system today but am trying your suggestons. This is a > debian 3.1r2 system and I'm running jdk 1.5.0_04. > > Take a look below, but I think I have no parallel port support on this > kernel, however I never get the "No such device or address" return from the > cat call as you did so I'm not sure how to interpret the results. > > When I run the test program (PortChooser.java), the getPortIdentifiers > call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is > more than I found on the RedHat system. Incidently --disable-lockfiles has > no effect. > > It looks as though there is no parallel support in this kernel: > falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > On node 0 totalpages: 161776 > falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > > I'm a little confused by the results when I cat to the lp0 device. It > seems from the dmesg output that I don't have parallel printer support, but > when I cat to the lp0 device, I get permission denied if I'm non-root user > and input/output error if I'm root. Apparently this means I have the device, > but no support in the kernel? > > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > ed at falcon:~/src/workspace/EASServer/src$ su > Password: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > > Here's my lp* device permissions. > /dev: > wildcard lp* > crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > If I change it to > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I get: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > falcon:/home/ed/src/workspace/EASServer/src# exit > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > cat: /dev/lp0: Input/output error > ed at falcon:~/src/workspace/EASServer/src$ > > What do you think? Should I recompile the kernel or is it something else? > > By the way, I added the user ed to the lp and uucp groups on this system. > > Thanks again, > > Ed > > On 8/11/06, Trent Jarvi wrote: > > > > On Fri, 11 Aug 2006, Ed wrote: > > > > > I'm trying to read and write a parallel port on a standard (Dell) pc > > running > > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > > gates. > > > > > > I'm having problems getting rxtx to return a port enumeration from > > > getPortIdentifiers. I'm using a file > > > PortChooser.java as a test file to get things going. This is from the > > Java > > > CookBook 2nd edition (Chapter 12). The call > > > > > > // get list of ports available on this particular computer, > > > // by calling static method in CommPortIdentifier. > > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > > > > > returns a null pList; > > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure > > and > > > compile without --disable-lockfiles I get: > > > > > > Stable Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7 > > > Java lib Version = RXTX-2.1-7 > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > ... > > > > > > When I compile with --disable-lockfiles the call to getPortIdentifiers > > > > > simply returns a null Enumeration. > > > > > > I've read the documention and threads about this issue and I feel like > > I've > > > tried everything, so at the moment I'm stumped. > > > > > > I can supply any further info that may help. > > > > > > Thanks in advance. > > > > > > Ed > > > > > > > Hi Ed > > > > You may want to check the permissions of /dev/lp*. Also make sure lp or > > your kernel support for lp is loaded. It should show up in dmesg and > > lsmod. > > > > For my laptop with no printer port enabled in BIOS is see: > > > > lp: driver loaded but no devices found > > > > in desg |grep lp > > > > [] $ ls -l /dev/lp* > > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > here root and group lp can read and write. Normal users cannot. > > > > Try a simple read as a user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > > > > Fix as root > > > > [] chmod 666 /dev/lp* > > [] $ ls -l /dev/lp* > > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > Now as user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: No such device or address > > > > So this is saying there is no lp0 on my laptop. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > > > -- > > Ed > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060812/c2afe1f8/attachment-0001.html From tjarvi at qbang.org Sat Aug 12 14:01:52 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 12 Aug 2006 14:01:52 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Remember that the lp code expects a printer - or something like it. There is a line that specifies the printer is online. If you are doing hobby work, you will need to raise that line or loop it back to something that is raised. If you just try reading a port with no device connected and online, there will be an error while trying to read. This should be addressed in the mail-list archives. On Sat, 12 Aug 2006, Ed wrote: > Trent, > Right after I sent the results indicated below I re-ran the app and it > apparently found the parallel port. The difference was that I set the > permissions to : > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I'm still not sure how to interpret the dmesg and lsmod before. However I'm > thinking that since the user now has permission to access the lp* port, a > request to access it loaded the lp and parport modules automatically and > allowed me access. Here's the output of lsmod now: > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > lp 5540 0 (autoclean) > parport 21608 1 (autoclean) [parport_pc lp] > > and dmesg: > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > On node 0 totalpages: 161776 > lp0: using parport0 (polling). > > So I think I'm good, and ready to move on the next steps. > > Thanks Trent! > > Ed > > > On 8/12/06, Ed wrote: >> >> Thanks for the reply Trent. >> >> I'm on a different system today but am trying your suggestons. This is a >> debian 3.1r2 system and I'm running jdk 1.5.0_04. >> >> Take a look below, but I think I have no parallel port support on this >> kernel, however I never get the "No such device or address" return from the >> cat call as you did so I'm not sure how to interpret the results. >> >> When I run the test program (PortChooser.java), the getPortIdentifiers >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is >> more than I found on the RedHat system. Incidently --disable-lockfiles has >> no effect. >> >> It looks as though there is no parallel support in this kernel: >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp >> On node 0 totalpages: 161776 >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp >> >> I'm a little confused by the results when I cat to the lp0 device. It >> seems from the dmesg output that I don't have parallel printer support, but >> when I cat to the lp0 device, I get permission denied if I'm non-root user >> and input/output error if I'm root. Apparently this means I have the >> device, >> but no support in the kernel? >> >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> >> cat: /dev/lp0: Permission denied >> ed at falcon:~/src/workspace/EASServer/src$ su >> Password: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> >> Here's my lp* device permissions. >> /dev: >> wildcard lp* >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> If I change it to >> /dev: >> wildcard lp* >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> I get: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> falcon:/home/ed/src/workspace/EASServer/src# exit >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> ed at falcon:~/src/workspace/EASServer/src$ >> >> What do you think? Should I recompile the kernel or is it something else? >> >> By the way, I added the user ed to the lp and uucp groups on this system. >> >> Thanks again, >> >> Ed >> >> On 8/11/06, Trent Jarvi wrote: >> > >> > On Fri, 11 Aug 2006, Ed wrote: >> > >> > > I'm trying to read and write a parallel port on a standard (Dell) pc >> > running >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the >> > gates. >> > > >> > > I'm having problems getting rxtx to return a port enumeration from >> > > getPortIdentifiers. I'm using a file >> > > PortChooser.java as a test file to get things going. This is from the >> > Java >> > > CookBook 2nd edition (Chapter 12). The call >> > > >> > > // get list of ports available on this particular computer, >> > > // by calling static method in CommPortIdentifier. >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); >> > > >> > > returns a null pList; >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure >> > and >> > > compile without --disable-lockfiles I get: >> > > >> > > Stable Library >> > > ========================================= >> > > Native lib Version = RXTX-2.1-7 >> > > Java lib Version = RXTX-2.1-7 >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > ... >> > > >> > > When I compile with --disable-lockfiles the call to getPortIdentifiers >> > >> > > simply returns a null Enumeration. >> > > >> > > I've read the documention and threads about this issue and I feel like >> > I've >> > > tried everything, so at the moment I'm stumped. >> > > >> > > I can supply any further info that may help. >> > > >> > > Thanks in advance. >> > > >> > > Ed >> > > >> > >> > Hi Ed >> > >> > You may want to check the permissions of /dev/lp*. Also make sure lp or >> > your kernel support for lp is loaded. It should show up in dmesg and >> > lsmod. >> > >> > For my laptop with no printer port enabled in BIOS is see: >> > >> > lp: driver loaded but no devices found >> > >> > in desg |grep lp >> > >> > [] $ ls -l /dev/lp* >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > here root and group lp can read and write. Normal users cannot. >> > >> > Try a simple read as a user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: Permission denied >> > >> > Fix as root >> > >> > [] chmod 666 /dev/lp* >> > [] $ ls -l /dev/lp* >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > Now as user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: No such device or address >> > >> > So this is saying there is no lp0 on my laptop. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > >> >> >> >> -- >> >> Ed >> > > > > From pete.flugstad at gmail.com Mon Aug 14 07:51:41 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 08:51:41 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: <84d4a6d50608140651h3cb2266ap90c47780abace00@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > On Fri, 11 Aug 2006, Pete Flugstad wrote: > > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > > but there doesn't appear to be a way to select that via RXTX (which > > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > > is selected). > > I'm guessing I didn't know the difference. At the time, I really didn't > have windows API documentation. I just had some pages I found with > altivista/google. Later microsoft made their documentation available on > msdn or I learned about it. > > For rxtx, the calls need to be platform neutral. So if you see how to do > each in termios, then we can get it going. so, RTSCTS_IN/OUT at the COMM API is mapped to HARDWARE_FLOW_CONTROL in the POSIX layer. Which termios.c maps to RTS_CONTROL_HANDSHAKE and fOutxCtsFlow = true. Since termios.c is Windows only anway... Would it work to change the mapping in termios.c to map hardware flow control to RTS_CONTROL_TOGGLE? I just wondering (I'm going to go look, but there's a lot of code in there) if the code does anything special playing with flow control signals? Thanks, Pete From pete.flugstad at gmail.com Mon Aug 14 09:42:48 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 10:42:48 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> On 8/3/06, Trent Jarvi wrote: > On Thu, 3 Aug 2006, Pete Flugstad wrote: > > Okay, I can understand that, but from the PORTMON output, it looks > > like it's opening each port TWICE: > > I think this problem is in RXTXCommDriver.java. I've just not tracked it > down but it should be in the java code, not the native code so easy > enough to track down. Okay, I'm trying to track this down... Looks like the CommPortIdentifier static initializer loads RXTXCommDriver, and then calls RXTXDriver.initialize. But then CommPortIdentifier.getPortIdentifiers does the exact same thing. So that's where the two scans are coming from. I would guess that one or the other can be removed? Probably the one in the CommPortIdentifier.getPortIdentifiers? Doing so removes the 2nd scan. Pete PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) val = System.getProperty("gnu.io.SerialPorts"); Shouldn't the comparison be != null? getProperty returns null if the variable is NOT found, and you only want to assign to val if it IS found, right? Same thing for the parallel port case. End result is the same I guess, since you check for null later, but probably should be fixed. From eddythejekyll at gmail.com Mon Aug 14 11:55:17 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 11:55:17 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: When I try to get the mode with int mode = pPort.getMode(); it returns 0 which isn't any of the valid modes. I tried setting it explicitely with pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced the requested mode in nativeSetSerialPortParams at gnu.io.LPRPort.setLPRMode(Native Method) at gnu.io.LPRPort.setMode(LPRPort.java:87) Except for LPT_MODE_ANY, but the getMode call still failed out with an invalid state. I'm wondering if it's because I don't have the line pulled high like you said. This isn't a printer connected. It's a relay board with pins 2-9 tied to data, and 18-25 to gnd. The rest are open. I looked at a DB25 pinout diagram and I'm not sure which pin I need to tie high, and I looked through the archives, but didn't find a reference to something definitive. Can someone help me with which pin is the "online" pin as Trent mentioned? DB25 spec has ( I hope this formats correctly in this email) BUSY (11), SEL (13) or INIT (16) are candidates, but I'm guessing. Any clues? *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Thanks, Ed On 8/12/06, Trent Jarvi wrote: > > > Remember that the lp code expects a printer - or something like it. There > is a line that specifies the printer is online. If you are doing hobby > work, you will need to raise that line or loop it back to something that > is raised. > > If you just try reading a port with no device connected and online, there > will be an error while trying to read. This should be addressed in the > mail-list archives. > > On Sat, 12 Aug 2006, Ed wrote: > > > Trent, > > Right after I sent the results indicated below I re-ran the app and it > > apparently found the parallel port. The difference was that I set the > > permissions to : > > /dev: > > wildcard lp* > > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > > > I'm still not sure how to interpret the dmesg and lsmod before. However > I'm > > thinking that since the user now has permission to access the lp* port, > a > > request to access it loaded the lp and parport modules automatically and > > allowed me access. Here's the output of lsmod now: > > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > > lp 5540 0 (autoclean) > > parport 21608 1 (autoclean) [parport_pc lp] > > > > and dmesg: > > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > > On node 0 totalpages: 161776 > > lp0: using parport0 (polling). > > > > So I think I'm good, and ready to move on the next steps. > > > > Thanks Trent! > > > > Ed > > > > > > On 8/12/06, Ed wrote: > >> > >> Thanks for the reply Trent. > >> > >> I'm on a different system today but am trying your suggestons. This is > a > >> debian 3.1r2 system and I'm running jdk 1.5.0_04. > >> > >> Take a look below, but I think I have no parallel port support on this > >> kernel, however I never get the "No such device or address" return from > the > >> cat call as you did so I'm not sure how to interpret the results. > >> > >> When I run the test program (PortChooser.java), the getPortIdentifiers > >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this > is > >> more than I found on the RedHat system. Incidently --disable-lockfiles > has > >> no effect. > >> > >> It looks as though there is no parallel support in this kernel: > >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > >> On node 0 totalpages: 161776 > >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > >> > >> I'm a little confused by the results when I cat to the lp0 device. It > >> seems from the dmesg output that I don't have parallel printer support, > but > >> when I cat to the lp0 device, I get permission denied if I'm non-root > user > >> and input/output error if I'm root. Apparently this means I have the > >> device, > >> but no support in the kernel? > >> > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> > >> cat: /dev/lp0: Permission denied > >> ed at falcon:~/src/workspace/EASServer/src$ su > >> Password: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> > >> Here's my lp* device permissions. > >> /dev: > >> wildcard lp* > >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> If I change it to > >> /dev: > >> wildcard lp* > >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> I get: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> falcon:/home/ed/src/workspace/EASServer/src# exit > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> ed at falcon:~/src/workspace/EASServer/src$ > >> > >> What do you think? Should I recompile the kernel or is it something > else? > >> > >> By the way, I added the user ed to the lp and uucp groups on this > system. > >> > >> Thanks again, > >> > >> Ed > >> > >> On 8/11/06, Trent Jarvi wrote: > >> > > >> > On Fri, 11 Aug 2006, Ed wrote: > >> > > >> > > I'm trying to read and write a parallel port on a standard (Dell) > pc > >> > running > >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > >> > gates. > >> > > > >> > > I'm having problems getting rxtx to return a port enumeration from > >> > > getPortIdentifiers. I'm using a file > >> > > PortChooser.java as a test file to get things going. This is from > the > >> > Java > >> > > CookBook 2nd edition (Chapter 12). The call > >> > > > >> > > // get list of ports available on this particular computer, > >> > > // by calling static method in CommPortIdentifier. > >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > >> > > > >> > > returns a null pList; > >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I > configure > >> > and > >> > > compile without --disable-lockfiles I get: > >> > > > >> > > Stable Library > >> > > ========================================= > >> > > Native lib Version = RXTX-2.1-7 > >> > > Java lib Version = RXTX-2.1-7 > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > ... > >> > > > >> > > When I compile with --disable-lockfiles the call to > getPortIdentifiers > >> > > >> > > simply returns a null Enumeration. > >> > > > >> > > I've read the documention and threads about this issue and I feel > like > >> > I've > >> > > tried everything, so at the moment I'm stumped. > >> > > > >> > > I can supply any further info that may help. > >> > > > >> > > Thanks in advance. > >> > > > >> > > Ed > >> > > > >> > > >> > Hi Ed > >> > > >> > You may want to check the permissions of /dev/lp*. Also make sure lp > or > >> > your kernel support for lp is loaded. It should show up in dmesg and > >> > lsmod. > >> > > >> > For my laptop with no printer port enabled in BIOS is see: > >> > > >> > lp: driver loaded but no devices found > >> > > >> > in desg |grep lp > >> > > >> > [] $ ls -l /dev/lp* > >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > here root and group lp can read and write. Normal users cannot. > >> > > >> > Try a simple read as a user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: Permission denied > >> > > >> > Fix as root > >> > > >> > [] chmod 666 /dev/lp* > >> > [] $ ls -l /dev/lp* > >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > Now as user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: No such device or address > >> > > >> > So this is saying there is no lp0 on my laptop. > >> > > >> > -- > >> > Trent Jarvi > >> > tjarvi at qbang.org > >> > > >> > >> > >> > >> -- > >> > >> Ed > >> > > > > > > > > > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/59164078/attachment-0001.html From eddythejekyll at gmail.com Mon Aug 14 14:19:58 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 14:19:58 -0600 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? Message-ID: I'm using the ParallelPort class to drive a relay board. According to Mr. Jarvi, since this board isn't a printer, there will be a read error unless I hold the "printer online" line high in order to make the API think I'm talking to a printer. The problem is, I can't figure out which line is the "printer online". My DB25 spec lists the following: *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Anyone know which one I should tie high? I tried the busy line and it still errored out on the read. Thanks in advance, -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/66cf3c3e/attachment-0001.html From tjarvi at qbang.org Mon Aug 14 18:06:29 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:06:29 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Mon, 14 Aug 2006, Ed wrote: > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > which isn't any of the valid modes. I tried setting it explicitely with > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced > the requested mode in nativeSetSerialPortParams > at gnu.io.LPRPort.setLPRMode(Native Method) > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > invalid state. This is because rxtx only supports the basics. JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } One could program in more support. When I did that I just had a daisy wheel printer to test with and doing any more would have been blind. So that behavior is expected. I'll look to see if the Parallel Complete book mentions which pins you need to raise. If you look in the source code [ParallelImp.c] you can see this code isn't well tested. It has worked for hobby use in the past as I'd guess you are trying to do. But my experience with the code is as is mentioned in the top of the source: /* fear he who enter here. It appears that things have changed. An attempt has been made to put things the way the should be. It compiles and ParallelBlackBox runs. No further guarantees. Well... One.. it will print "Hello World!" on an epson DX 10 printer. you know.. the 10 character per second daisy wheel printer ;) - Trent Jarvi */ That comment is from 1997 or so. Since then some windows support was contributed but it is still very green code. We get about four requests for parallel support a year so its just not a well traveled area. It would be nice to have some documentation for the people trying to hook parallel ports to electronic projects. That appears to be the exclusive use of the Parallel support. The wiki pages are intended to let people share information like this to help each other in their projects as they figure out the details. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Aug 14 18:40:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:40:40 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: > PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): > > if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) > val = System.getProperty("gnu.io.SerialPorts"); > > Shouldn't the comparison be != null? getProperty returns null if the > variable is NOT found, and you only want to assign to val if it IS > found, right? Same thing for the > parallel port case. End result is the same I guess, since you check > for null later, > but probably should be fixed. I think this is just a fallback to the second property. gnu.io.SerialPorts isn't documented but perhaps it is used. It should behave properly as documented in INSTALL. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 14 18:56:55 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 19:56:55 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: <44E11BD7.5030102@gmail.com> Trent Jarvi wrote: >> PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): >> >> if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) >> val = System.getProperty("gnu.io.SerialPorts"); >> > > I think this is just a fallback to the second property. > gnu.io.SerialPorts isn't documented but perhaps it is used. It should > behave properly as documented in INSTALL. Doh - yup, I missed the fact that the property names were different... Pete From berkland at spamcop.net Mon Aug 14 19:58:21 2006 From: berkland at spamcop.net (Doug Berkland) Date: Mon, 14 Aug 2006 21:58:21 -0400 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? In-Reply-To: References: Message-ID: <269e40090608141858g698c2579v8d962deca3f4df53@mail.gmail.com> Based on memory and this page as confirmation, I would say pin 13 is the "Online" pin for SPP (standard parallel port). http://www.quatech.com/support/comm-over-parallel.php On 8/14/06, Ed wrote: > > I'm using the ParallelPort class to drive a relay board. According to Mr. > Jarvi, since this board isn't a printer, there will be a read error unless I > hold the "printer online" line high in order to make the API think I'm > talking to a printer. The problem is, I can't figure out which line is the > "printer online". My DB25 spec lists the following: > > *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and > Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data > Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 > D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select > 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select > In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit > 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 > Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and > Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground > > Anyone know which one I should tie high? I tried the busy line and it > still errored out on the read. > > Thanks in advance, > > -- > Ed > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/842bb770/attachment-0001.html From eddythejekyll at gmail.com Mon Aug 14 20:25:42 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 20:25:42 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Ah, I see. I've seen the caveats about limited Parallel support, but I thought it was mainly about the javax.comm package. The gnu.io is derived from javax.comm package right? That is, is the parallel support in rxtx is a superset of what's in javax.comm? I'm using this not for hobby usage, but for some simple instrumenation and control. If the project mandates it, I'll gladly work on extending the support. In the meantime, I need to get some sanity checks working, and repair my relay board (I smoked the ULN2803 chip, apparently by tying the BUSY (pin 11) to vcc). I guess I'll try the SEL pin next (and a supply of 2803s) with a ~1K pullup. The caveat in the comment block isn't very encouraging (!), but I borrowed an old Epson Stylus Color 600 printer to see what I can do. If I can write out characters to it I'll be happy. Parallel printers aren't easy to find these days. I haven't yet looked at the native source, yet, but I've just imported it into eclipse and I'll surf around a bit. Ed On 8/14/06, Trent Jarvi wrote: > > On Mon, 14 Aug 2006, Ed wrote: > > > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > > which isn't any of the valid modes. I tried setting it explicitely with > > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to > proced > > the requested mode in nativeSetSerialPortParams > > at gnu.io.LPRPort.setLPRMode(Native Method) > > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > > invalid state. > > This is because rxtx only supports the basics. > > JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > jclass jclazz, jint mode) > { > switch(mode) > { > case LPT_MODE_ANY: > break; > case LPT_MODE_SPP: > case LPT_MODE_PS2: > case LPT_MODE_EPP: > case LPT_MODE_ECP: > case LPT_MODE_NIBBLE: > default: > throw_java_exception( env, > UNSUPPORTED_COMM_OPERATION, > "nativeSetSerialPortParams", > "setLPRMode was unable to proced the > requested \ > mode" > ); > } > return(JNI_TRUE); > } > > One could program in more support. When I did that I just had a daisy > wheel printer to test with and doing any more would have been blind. > > So that behavior is expected. I'll look to see if the Parallel Complete > book mentions which pins you need to raise. If you look in the source > code [ParallelImp.c] you can see this code isn't well tested. It has > worked for hobby use in the past as I'd guess you are trying to do. But > my experience with the code is as is mentioned in the top of the source: > > /* > fear he who enter here. It appears that things have changed. An > attempt > has been made to put things the way the should be. > > It compiles and ParallelBlackBox runs. No further guarantees. > > Well... One.. it will print "Hello World!" on an epson DX 10 > printer. > you know.. the 10 character per second daisy wheel printer ;) > > - Trent Jarvi > */ > > That comment is from 1997 or so. > > Since then some windows support was contributed but it is still very green > code. We get about four requests for parallel support a year so its just > not a well traveled area. > > It would be nice to have some documentation for the people trying to hook > parallel ports to electronic projects. That appears to be the exclusive > use of the Parallel support. The wiki pages are intended to let people > share information like this to help each other in their projects as they > figure out the details. > > -- > Trent Jarvi > tjarvi at qbang.org > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/fbb5ddb4/attachment-0001.html From lyon at docjava.com Tue Aug 15 06:06:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 15 Aug 2006 08:06:27 -0400 Subject: [Rxtx] smoking is bad for your health In-Reply-To: References: Message-ID: Hi All, If you are connecting to the parallel port and smoking chips, it is time for extra stuff to buffer the parallel port. You may be want more current, in which case driver transistors are needed, or, if you are using the port as an output only device, you may like to add your own bus transceiver (e.g., 74245), set for output. Do be careful to design this properly; http://www.beyondlogic.org/spp/parallel.htm Some people like to use Octal D-type F.F's with OC outputs, like a 74374, http://upgrade.cntc.ac.kr/data/ttl/74374.html I like this one, as it has the D FF's and can latch the outputs for presentation to slower electronics (like relays). But careful! A relay that needs more current than the family of the device you have selected will look like a short to ground, and you will smoke your bug! And MOBO's do NOT come with the ability to drive any load you like. Check the power specs on your relay and be sure to protect the chip against back EMF with a diode. It is best to smoke test this on a bread board BEFORE hooking it to the computer. And be sure you smoke test the corner points in the ckt for a while, lest it fail in the field. - Doug >Ah, I see. I've seen the caveats about limited >Parallel support, but I thought it was mainly >about the javax.comm package. The >gnu.io is derived from javax.comm >package right? That is, is the parallel support >in rxtx is a superset of what's in javax.comm? > >I'm using this not for hobby usage, but for some >simple instrumenation and control. If the >project mandates it, I'll gladly work on >extending the support. In the meantime, I need >to get some sanity checks working, and repair my >relay board (I smoked the ULN2803 chip, >apparently by tying the BUSY (pin 11) to vcc). I >guess I'll try the SEL pin next (and a supply of >2803s) with a ~1K pullup. > >The caveat in the comment block isn't very >encouraging (!), ?but?I borrowed an old Epson >Stylus Color 600 printer to see what I can do. >?If I can write out characters to it I'll be >happy. Parallel printers aren't easy to find >these days. > > I haven't yet looked at the native source, yet, >but I've just imported it into eclipse and I'll >surf around a bit. > >Ed > >On 8/14/06, Trent Jarvi <tjarvi at qbang.org> wrote: > >On Mon, 14 Aug 2006, Ed wrote: > >> When I try to get the mode with int mode = pPort.getMode(); it returns 0 >> which isn't any of the valid modes. I tried setting it explicitely with >> pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with >> >> gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced >> the requested mode in nativeSetSerialPortParams >> at gnu.io.LPRPort.setLPRMode(Native Method) >> at gnu.io.LPRPort.setMode(LPRPort.java:87) >> >> Except for LPT_MODE_ANY, but the getMode call still failed out with an >> invalid state. > >This is because rxtx only supports the basics. > >JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > ???????jclass jclazz, jint mode) >{ > ???????switch(mode) > ???????{ > ???????????????case LPT_MODE_ANY: > ???????????????????????break; > ???????????????case LPT_MODE_SPP: > ???????????????case LPT_MODE_PS2: > ???????????????case LPT_MODE_EPP: > ???????????????case LPT_MODE_ECP: > ???????????????case LPT_MODE_NIBBLE: > ???????????????default: > ???????????????????????throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, > ???????????????????????????????"nativeSetSerialPortParams", > ???????????????????????????????"setLPRMode was >unable to proced the requested \ > ???????????????????????????????mode" > ???????????????????????); > ???????} > ???????return(JNI_TRUE); >} > >One could program in more support.??When I did that I just had a daisy >wheel printer to test with and doing any more would have been blind. > >So that behavior is expected.??I'll look to see if the Parallel Complete >book mentions which pins you need to raise.??If you look in the source >code [ParallelImp.c] you can see this code isn't well tested.??It has >worked for hobby use in the past as I'd guess you are trying to do.??But >my experience with the code is as is mentioned in the top of the source: > >/* > fear he who enter here.??It appears that things have changed.??An attempt > has been made to put things the way the should be. > > ???????It compiles and ParallelBlackBox runs.??No further guarantees. > > ???????Well... One.. it will print "Hello World!" on an epson DX 10 printer. > ???????you know.. the 10 character per second daisy wheel printer ;) > > ???????- Trent Jarvi >*/ > >That comment is from 1997 or so. > >Since then some windows support was contributed but it is still very green >code.??We get about four requests for parallel support a year so its just >not a well traveled area. > >It would be nice to have some documentation for the people trying to hook >parallel ports to electronic projects.??That appears to be the exclusive >use of the Parallel support.??The wiki pages are intended to let people >share information like this to help each other in their projects as they >figure out the details. > >-- >Trent Jarvi >tjarvi at qbang.org > > > > >-- >Ed > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 15 13:26:16 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 15 Aug 2006 14:26:16 -0500 Subject: [Rxtx] crash with too much memory Message-ID: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded from qbang.org. I'm exercising the RXTX COMM serial interface, both in a small standalone test and with the same code pulled into a large OSGI framework setup. If I use the stock .jar/.dll's, then everything works correctly in both situations. I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 (mingw-special)). If I use my locally built version, then my small test case works just fine, both when run inside Eclipse and when run standalone on the command line. However, when I try and use my locally built .jar/.dll's in the large framework environment, then I get a JVM crash with the attached log. Normally this would lead me to think that I was running out of memory or something in the large environment, and when I try and play with the JVM memory args, some interesting things show up. In our large environment, we have -Xms32M/-Xmx1024M - this appears to be the problem. If I set max to something like 64M, then things work. The cross over point from working to failing seems to be around 32M/110M (works) and 32M/111M (fails). But 128M/128M works while 128M/129M fails. So it seems to have to do with how much memory is actually available, or something like that. The thing that occurs to me is if my GCC is somehow generating something like "near" calls. But when the JVM has a lot of RAM available, it puts the DLL up somehwere in the address space and then the near calls fail - far calls are needed. So, I'm thinking this is probably a difference in the MinGW GCC I'm using and the one that was used to build the stock binaries from qbang, or maybe some command line args were changed? So, I'm hoping someone will have an idea of what's going on here... Thanks, Pete From tjarvi at qbang.org Tue Aug 15 18:54:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 15 Aug 2006 18:54:04 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: On Tue, 15 Aug 2006, Pete Flugstad wrote: > I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded > from qbang.org. > > I'm exercising the RXTX COMM serial interface, both in a small > standalone test and with the same code pulled into a large OSGI > framework setup. > > If I use the stock .jar/.dll's, then everything works correctly in > both situations. > > I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 > (mingw-special)). > > If I use my locally built version, then my small test case works just > fine, both when run inside Eclipse and when run standalone on the > command line. However, when I try and use my locally built > .jar/.dll's in the large framework environment, then I get a JVM crash > with the attached log. > > Normally this would lead me to think that I was running out of memory > or something in the large environment, and when I try and play with > the JVM memory args, some interesting things show up. > > In our large environment, we have -Xms32M/-Xmx1024M - this appears to > be the problem. If I set max to something like 64M, then things work. > The cross over point from working to failing seems to be around > 32M/110M (works) and 32M/111M (fails). > But 128M/128M works while 128M/129M fails. So it seems to have to do > with how much memory is actually available, or something like that. > > The thing that occurs to me is if my GCC is somehow generating > something like "near" calls. But when the JVM has a lot of RAM > available, it puts the DLL up somehwere in the address space and then > the near calls fail - far calls are needed. > > So, I'm thinking this is probably a difference in the MinGW GCC I'm > using and the one that was used to build the stock binaries from > qbang, or maybe some command line args were changed? > > So, I'm hoping someone will have an idea of what's going on here... > Hi Pete The binaries are from the src. They should be reproducable. I did extensive testing of rxtx several years ago using mingw as the compiler. The version was 2.95. I have not changed versions since. There are way too many variables as it is. I have a linux->mingw cross compiler rpm I use for all windows use. If you want a copy of it you can have it. It isn't anything 'special' :) -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Thu Aug 17 11:49:24 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 17 Aug 2006 12:49:24 -0500 Subject: [Rxtx] crash with too much memory In-Reply-To: References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> On 8/15/06, Trent Jarvi wrote: > I did extensive testing of rxtx several years ago using mingw as the > compiler. The version was 2.95. I have not changed versions since. > There are way too many variables as it is. FYI, I believe I've solved this problem by changing how the dll's were built. The original mingw makefile was generating Serial.def, then performing various operations with dlltool and ld. I modified the makefile to create the dll using this page: as a guide. With that, there's no longer any need to deal with Serial.def and the makefile becomes _much_ simpler. This appears to have addressed my problems with crashing. FWIW, GCC 2.95 is _really_ old - you should consider investigating upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is supposed to generate a native binary (i.e. just like MinGW). Thanks, Pete From claretlc at yahoo.com Thu Aug 17 12:34:48 2006 From: claretlc at yahoo.com (Clare Cooley) Date: Thu, 17 Aug 2006 11:34:48 -0700 (PDT) Subject: [Rxtx] parallel port communication Message-ID: <20060817183448.76911.qmail@web53908.mail.yahoo.com> Hi, I'm trying to write a 1 to a bit 15 on a parallel port cable that isn't attached to a printer.(It's a control box for eye-tracking equipment.)I need to do this in Java. I looked at the javax.comm documentation, and it said, "Application programs should not directly create ParallelPortEvent objects." So is there a way to do this with your package? If not, do you have any suggestions of where to look? It really needs to be done in Java. Thanks, Clare Cooley __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From pat at xvalheru.org Thu Aug 17 13:13:52 2006 From: pat at xvalheru.org (pat) Date: Thu, 17 Aug 2006 21:13:52 +0200 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060817190751.M5586@xvalheru.org> Hi there, I've question(s) for you. I need to communicate with scale, I've used the Sun's direver. Now I've switched to Rxtx and the speed of the communication is perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, but the difference between the crash time is 5 second ... . My question is: Is there a stable driver ??? Or what I have to do to have stable enough serial port driver ??? OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. Thanks to all for the help. Pat From tjarvi at qbang.org Fri Aug 18 05:13:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 05:13:42 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> Message-ID: On Thu, 17 Aug 2006, Pete Flugstad wrote: > On 8/15/06, Trent Jarvi wrote: >> I did extensive testing of rxtx several years ago using mingw as the >> compiler. The version was 2.95. I have not changed versions since. >> There are way too many variables as it is. > > FWIW, GCC 2.95 is _really_ old - you should consider investigating > upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is > supposed to generate a native binary (i.e. just like MinGW). > It is really old but also well known like C itself. I have considered upgrading. The ToyBox builds should be gcc 3* cross-compiled. I'm not going to be validating gcc 3* w32 binaries though. It's looking like we will need to focus support on MSFT's toolchain for 64 bit windows support until it is possible for gcc to support w64. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Aug 18 05:32:10 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 07:32:10 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: Hi All, Does anyone know how to produce mac intel binaries on a Fedora Linux box? Thanks! - Doug From tjarvi at qbang.org Fri Aug 18 06:42:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 06:42:05 -0600 (MDT) Subject: [Rxtx] cross compilation for the mac In-Reply-To: References: Message-ID: On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Does anyone know how to produce > mac intel binaries on a Fedora Linux > box? > > Thanks! > - Doug Hi Doug You need to build the cross toolchain which means copying the Darwin/Mac binaries over to fedora. It would be nontrivial but possible. Do the Darwin libraries work with Mac in general? I'm not aware of the licensing issues associated with grabbing Mac binaries. Same with OpenSolaris/Solaris. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Aug 18 08:15:26 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 10:15:26 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> In theory building against Darwin would be sufficient to getting things working on MacOS X. You need to remember that Darwin is the low-level OS, while MacOS X adds the everything else on top. IOKit, which is the I/O API, is available as part of Darwin. The only thing you will need extra are the Java libraries. One thing is that I would recommend that when producing binaries for the Mac, is to ensure they are Universal binaries (PPC+Intel). Andre > > From: Trent Jarvi > Date: 2006/08/18 Fri AM 08:42:05 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] cross compilation for the mac > > On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > > > Hi All, > > Does anyone know how to produce > > mac intel binaries on a Fedora Linux > > box? > > > > Thanks! > > - Doug > > Hi Doug > > You need to build the cross toolchain which means copying the Darwin/Mac > binaries over to fedora. It would be nontrivial but possible. > > Do the Darwin libraries work with Mac in general? I'm not aware of the > licensing issues associated with grabbing Mac binaries. > > Same with OpenSolaris/Solaris. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Aug 18 13:43:16 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 15:43:16 -0400 Subject: [Rxtx] cross compilation for the mac In-Reply-To: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: >In theory building against Darwin would be sufficient to getting >things working on MacOS X. You need to remember that Darwin is the >low-level OS, while MacOS X adds the everything else on top. IOKit, >which is the I/O API, is available as part of Darwin. The only thing >you will need extra are the Java libraries. > >One thing is that I would recommend that when producing binaries for >the Mac, is to ensure they are Universal binaries (PPC+Intel). > >Andre I find the xcode ide for generating a mix of universal binaries and java very difficult to make work. Is there a way to do this with make files? Thanks! - Doug From ajmas at sympatico.ca Fri Aug 18 13:54:55 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 15:54:55 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818195455.PGAP29052.tomts13-srv.bellnexxia.net@smtp1.sympatico.ca> It should be doable. XCode hands off the compilation process to gcc et al, for the compilation of C/C++ code and to javac et al. for the Java side. While ant is the favoured tool for 'automated' Java compilation, make can easily be used. All is needed is someone to volounteer to do the work. Andre "Dr. Douglas Lyon" wrote > > >In theory building against Darwin would be sufficient to getting > >things working on MacOS X. You need to remember that Darwin is the > >low-level OS, while MacOS X adds the everything else on top. IOKit, > >which is the I/O API, is available as part of Darwin. The only thing > >you will need extra are the Java libraries. > > > >One thing is that I would recommend that when producing binaries for > >the Mac, is to ensure they are Universal binaries (PPC+Intel). > > > >Andre > > I find the xcode ide for generating a mix of universal binaries > and java very difficult to make work. Is there a way to do this > with make files? > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Fri Aug 18 16:34:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 16:34:46 -0600 (MDT) Subject: [Rxtx] serial driver newbe question and problem In-Reply-To: <20060817190751.M5586@xvalheru.org> References: <20060817190751.M5586@xvalheru.org> Message-ID: On Thu, 17 Aug 2006, pat wrote: > Hi there, > > I've question(s) for you. I need to communicate with scale, I've used the > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > but the difference between the crash time is 5 second ... . > > My question is: Is there a stable driver ??? Or what I have to do to have > stable enough serial port driver ??? > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > Thanks to all for the help. > > Pat > Could you describe the hardware you have, the version of rxtx and provide the log of the crash? Did you download binaries? I've not been seeing a jvm crash with rxtx -- Trent Jarvi tjarvi at qbang.org From lunareclipse03 at web.de Sat Aug 19 12:11:48 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 19 Aug 2006 20:11:48 +0200 Subject: [Rxtx] Problem solved! Message-ID: <920065539@web.de> Hi everybody, I posted some months ago and asked about some help on my very special problem concerning my win32 port of a communications library. Now I just want to inform you that no further "mindstorming" is needed because I solved the problem by completely rewriting the win32 port of the library. Now everything works fine. Thank you all for your time and patience. --Sven Ahlemann __________________________________________________________________________ Erweitern Sie FreeMail zu einem noch leistungsst?rkeren E-Mail-Postfach! Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131 From ajmas at sympatico.ca Mon Aug 21 09:58:23 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 21 Aug 2006 11:58:23 -0400 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060821155823.TLSM18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Next time that happens, including a copy of the crash log, produced by Windows could probably help too. Andre Trent Jarvi wrote: > > On Thu, 17 Aug 2006, pat wrote: > > > Hi there, > > > > I've question(s) for you. I need to communicate with scale, I've used the > > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > > but the difference between the crash time is 5 second ... . > > > > My question is: Is there a stable driver ??? Or what I have to do to have > > stable enough serial port driver ??? > > > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > > > Thanks to all for the help. > > > > Pat > > > > Could you describe the hardware you have, the version of rxtx and > provide the log of the crash? Did you download binaries? > > I've not been seeing a jvm crash with rxtx > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From adrian.l.parker at gmail.com Thu Aug 24 09:10:39 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Thu, 24 Aug 2006 11:10:39 -0400 Subject: [Rxtx] Portability issues Message-ID: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use RXTX 2.0? Does it provide system librairies that javax.comm does not? I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, or 2000, or server 2003). Can this be done with a single implementation of RXTX? I don't want to have different versions of Java code that have different package names. References: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Message-ID: On Thu, 24 Aug 2006, Adrian Parker wrote: > Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use > RXTX 2.0? Does it provide system librairies that javax.comm does not? > > I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's > OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, > or 2000, or server 2003). Can this be done with a single implementation of > RXTX? I don't want to have different versions of Java code that have > different package names. > Hi Adrian. The native code can support all of the platforms you mention. I've never compiled for unixware or openunix but the patches are in the code. So you would need to compile for that target. >From there you would probably be best off going with rxtx 2.1 so you have all the classes in one package. You can opt to use rxtx 2.0 with Sun's commapi for Solaris v 2. The main differences are rxtx 2.1 comes with all the source/classes and is in package gnu.io while Sun's requires rxtx for some platforms but is in package javax.comm. The low level code is the same in either case as far as rxtx is concerned. -- Trent Jarvi tarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 04:12:52 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 06:12:52 -0400 Subject: [Rxtx] Serial.addEventListener bug? Message-ID: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on OpenServer 5.0.7). Its what Sun packages. I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an exception. It seems to throw the exception if no listener was previously declared (although I've not had chance to verify). Is this desireable behaviour? Sun's original API doesn't mention anything about an exception on this function, http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) Of course this is an old version of RXTX, so perhaps this has been changed. -- Adrian Parker Simulation Software Developer DLCSPM 4-4-3 (c) Building A31, CFB Kingston Tel: (613) 541-5010 x3020 CSN: 271-3020 Email: parker at lsec.dnd.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/22e2ea57/attachment-0001.html From tjarvi at qbang.org Fri Aug 25 05:15:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 25 Aug 2006 05:15:44 -0600 (MDT) Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: On Fri, 25 Aug 2006, Adrian Parker wrote: > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > OpenServer 5.0.7). Its what Sun packages. > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > exception. It seems to throw the exception if no listener was previously > declared (although I've not had chance to verify). > > Is this desireable behaviour? Sun's original API doesn't mention anything > about an exception on this function, > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > Of course this is an old version of RXTX, so perhaps this has been changed. > > > What exception was thrown? You can replace 1.4-8 with 2.0 for testing purposes. They are the same package. I doubt Sun shipped or packaged that. I think Caldera/SCOx/... did at one point. There may still be updates on their pages. I recall them sending patches here which are in current rxtx. -- Trent Jarvi tjarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 05:28:32 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 07:28:32 -0400 Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: <7da71e910608250428q32b86632g9a67b1b4efe69830@mail.gmail.com> On 8/25/06, Trent Jarvi wrote: > > On Fri, 25 Aug 2006, Adrian Parker wrote: > > > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > > OpenServer 5.0.7). Its what Sun packages. > > > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > > exception. It seems to throw the exception if no listener was > previously > > declared (although I've not had chance to verify). > > > > Is this desireable behaviour? Sun's original API doesn't mention > anything > > about an exception on this function, > > > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > > > Of course this is an old version of RXTX, so perhaps this has been > changed. > > > > > > > > What exception was thrown? Its weird. I catch an Exception. But when on that exception I call getClass().getName() I end up with a NullPointerException. You can replace 1.4-8 with 2.0 for testing > purposes. They are the same package. > > I doubt Sun shipped or packaged that. Doh! I meant to say SCO sorry. I was surfing Sun's site when I wrote that :) Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/e43aed3a/attachment-0001.html From sjudd at seas.upenn.edu Sat Aug 26 16:42:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Sat, 26 Aug 2006 18:42:09 -0400 Subject: [Rxtx] Mac commapi Message-ID: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? If so, where do I get it? Sun has various versions at http://www.sun.com/download/products.xml?id=43208d3d but they are for SolarisSparc, SolarisX86, Linux, and Generic. Do I use the Generic one? If so, read on; otherwise redirect me. While using the Generic version, my attempt to run the BlackBox sample program elicits a message saying it "can't find javax.comm.properties". I found a note in the rxtx.org HowTo (for Linux) saying to create this thing in /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties but where should it go on the Mac? After reading many versions of documentation around, and updates and revisions and re-authorings, I have worked my way into a state of confusion and high uncertainty. Please release me. sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060826/02d6b163/attachment-0001.html From tod at todbot.com Sat Aug 26 17:08:33 2006 From: tod at todbot.com (Tod E. Kurt) Date: Sat, 26 Aug 2006 16:08:33 -0700 Subject: [Rxtx] Mac commapi In-Reply-To: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Message-ID: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> You don't need Sun's CommAPI. You just need RXTX. Once you download RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and the native library is ("librxtxSerial.jnilib" on Mac OS X) via the standard methods. For instance, if you've placed those two files in a directory called 'rxtxlib' and you want to run a Java class called HelloWorld in the current directory, do the following: % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar HelloWorld On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? > If so, where do I get it? Sun has various versions at > http://www.sun.com/download/products.xml?id=43208d3d > but they are for SolarisSparc, SolarisX86, Linux, and Generic. > Do I use the Generic one? > If so, read on; otherwise redirect me. > > While using the Generic version, my attempt to run the BlackBox > sample program > elicits a message saying it "can't find javax.comm.properties". > I found a note in the rxtx.org HowTo (for Linux) saying to create > this thing in > /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties > but where should it go on the Mac? > > After reading many versions of documentation around, and updates > and revisions > and re-authorings, I have worked my way into a state of confusion > and high > uncertainty. Please release me. > > sj > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From sjudd at seas.upenn.edu Sun Aug 27 22:55:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Mon, 28 Aug 2006 00:55:09 -0400 Subject: [Rxtx] Mac commapi In-Reply-To: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> Message-ID: This was immensely helpful. Thank you, Tod. I wish it had been explicit somewhere in the documentation; it would have saved me 2 days of grief. One hugely valuable thing like this little set of instructions is that it implicitly lists all the hundreds of things you DON"T have to do. I know it seems obvious to those in the know, but every little bit of help on an arcane topic like this opens up the product to an exponentially wider group of dilettantes. I managed to get the SerialDemo program (from Sun) to work too. Hurrah! However, it required changing all the javax.comm references to gnu.io which I had heard of due to all my rambling readings. Is there not a demo program on rxtx.org already available that would not have needed this? BTW, the link on the Projects page for jPIC[Source] sends a *.hex file to a PIC 16F877 or similar chip... takes me to nowhere useful. I do not understand what the name "Toybox" is meant to imply. Thanks, sj On 2006 Aug 26, at 7:08 PM, Tod E. Kurt wrote: > You don't need Sun's CommAPI. You just need RXTX. Once you download > RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and > the native library is ("librxtxSerial.jnilib" on Mac OS X) via the > standard methods. > > For instance, if you've placed those two files in a directory called > 'rxtxlib' and you want to run a Java class called HelloWorld in the > current directory, do the following: > > % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar > HelloWorld > > > On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > >> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? >> If so, where do I get it? Sun has various versions at >> http://www.sun.com/download/products.xml?id=43208d3d >> but they are for SolarisSparc, SolarisX86, Linux, and Generic. >> Do I use the Generic one? >> If so, read on; otherwise redirect me. >> >> While using the Generic version, my attempt to run the BlackBox >> sample program >> elicits a message saying it "can't find javax.comm.properties". >> I found a note in the rxtx.org HowTo (for Linux) saying to create >> this thing in >> /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties >> but where should it go on the Mac? >> >> After reading many versions of documentation around, and updates >> and revisions and re-authorings, I have worked my way into a state >> of confusion and high uncertainty. Please release me. >> >> sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060827/b80d6389/attachment-0001.html From pete.flugstad at gmail.com Mon Aug 28 12:38:27 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 13:38:27 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE Message-ID: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Okay, my understanding is that originally, RTS meant "Request to Send" - the DTE (the PC) would assert this and the DCE (modem) would assert "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send data. This really only provided uni-directional flow control, from the PC to the modem. Now, as I understand it, the more modern usage of RTS is that it is used for the DTE to assert flow control back to the DCE - basically it means "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) raises this, then the DCE(modem) is free to send data to the DTE - this allows the DTE(PC) to exert flow control back towards the DCE(modem). This discussion is based on the Serial HOWTO from: and lots of other reading... Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which is defined as: > Enables RTS flow-control handshaking. The driver raises the RTS line, > enabling the DCE to send, when the input buffer has enough room to > receive data. The driver lowers the RTS line, preventing the DCE to > send, when the input buffer does not have enough room to receive > data. If this value is used, it is an error for the application to adjust > the line with EscapeCommFunction. which clearly reflects the newer usage style - it keeps the RTS line high as long as there is space to _receive_ data. And takes it low when the receive/input buffer is getting full to stop the modem from sending it data. Does this jive with other peoples understanding of RTS usage? Unfortunately, the hardware I'm trying to talk to wants to use the OLD style of RTS line usage. An existing Windows C++ program uses RTS_CONTROL_TOGGLE, which documentation states: > Specifies that the RTS line will be high if bytes are available for transmission. > After all buffered bytes have been sent, the RTS line will be low. If this value is > set, it would be an error for an application to adjust the line with > EscapeCommFunction. This value is ignored in Windows 95; it causes the > driver to act as if RTS_CONTROL_ENABLE were specified. This seems to be the OLD RTS behavior, right? So, what I seem to need is to be able to control the RTS line, either using TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS when getting ready to TX and clear it when the output buffer is empty). Does this make sense, or am I off in the weeds? Thanks, Pete From tjarvi at qbang.org Mon Aug 28 18:21:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 28 Aug 2006 18:21:10 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: On Mon, 28 Aug 2006, Pete Flugstad wrote: > Okay, my understanding is that originally, RTS meant "Request to Send" > - the DTE (the PC) would assert this and the DCE (modem) would assert > "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send > data. This really only provided uni-directional flow control, from the PC to > the modem. > > Now, as I understand it, the more modern usage of RTS is that it is used > for the DTE to assert flow control back to the DCE - basically it means > "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) > raises this, then the DCE(modem) is free to send data to the DTE - this > allows the DTE(PC) to exert flow control back towards the DCE(modem). > > This discussion is based on the Serial HOWTO from: > > > > and lots of other reading... > > Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > is defined as: > >> Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > > which clearly reflects the newer usage style - it keeps the RTS line high > as long as there is space to _receive_ data. And takes it low when the > receive/input buffer is getting full to stop the modem from sending it data. > > Does this jive with other peoples understanding of RTS usage? > > Unfortunately, the hardware I'm trying to talk to wants to use the OLD > style of RTS line usage. An existing Windows C++ program uses > RTS_CONTROL_TOGGLE, which documentation states: > >> Specifies that the RTS line will be high if bytes are available for transmission. >> After all buffered bytes have been sent, the RTS line will be low. If this value is >> set, it would be an error for an application to adjust the line with >> EscapeCommFunction. This value is ignored in Windows 95; it causes the >> driver to act as if RTS_CONTROL_ENABLE were specified. > > This seems to be the OLD RTS behavior, right? > > So, what I seem to need is to be able to control the RTS line, either using > TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS > when getting ready to TX and clear it when the output buffer is empty). > > Does this make sense, or am I off in the weeds? > Hi Pete OK. That sounds right. I do not know how you would communicate the difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through CommAPI as it stands. I take it you did not find anything either? Perhaps the best thing to do for your code is to toggle the RTS yourself. This could be a feature in the future JSR API perhaps. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 28 20:54:34 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 21:54:34 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <44F3AC6A.10908@gmail.com> Trent Jarvi wrote: > OK. That sounds right. I do not know how you would communicate the > difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through > CommAPI as it stands. I take it you did not find anything either? > > Perhaps the best thing to do for your code is to toggle the > RTS yourself. This could be a feature in the future JSR API perhaps. Yeah, this is what I ended up doing. I had to modify the dll in order to be able to set hardware flow control (which I do want), but leave the RTS flow control at RS_CONTROL_ENABLE. After that I just toggle setRTS(true) when I'm ready to send and setRTS(false) when I get a OUTPUT_BUFFER_EMPTY notification. Haven't tested with real hardware yet, but it seems to work OK. Thanks for the feedback! Pete From Bob_Jacobsen at lbl.gov Tue Aug 29 08:49:02 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 29 Aug 2006 07:49:02 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >is defined as: > > > Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > >which clearly reflects the newer usage style - it keeps the RTS line high >as long as there is space to _receive_ data. And takes it low when the >receive/input buffer is getting full to stop the modem from sending it data. > >Does this jive with other peoples understanding of RTS usage? Can you point to any devices that actually implement this "new" understanding? I think the person who wrote that documentation paragraph is just confused. The original "RTS/CTS" handshaking was extended to input (from DCE to DTE) handshaking via the DTR (Data Terminal Ready) line. I think the person who wrote the double-quoted paragraph above was just confused between the directions, and mixed them up. If you change "RTS" to "DTR" in that paragraph, you get: > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > enabling the DCE to send, when the input buffer has enough room to > > receive data. The driver lowers the DTR line, preventing the DCE to > > send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. which describes how dozens of devices actually work for controlling flow into the DTE (computer). This then leaves RTS/CTS (with RTS usually just stuck high) for controlling flow into the DCE (peripheral). Again, lots of hardware devices actually do this. I don't work on Windows, so can't be sure of what happens. But on the MacOS X version of RXTX, CTS low stops transmission, exactly as the "old" style would expect. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From mschned at basis.com Tue Aug 29 12:57:45 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 12:57:45 -0600 Subject: [Rxtx] Porting to AIX Message-ID: <01f201c6cb9d$034d4f20$341416ac@basis.com> Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar From mschned at basis.com Tue Aug 29 13:58:05 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 13:58:05 -0600 Subject: [Rxtx] Porting to AIX References: <01f201c6cb9d$034d4f20$341416ac@basis.com> Message-ID: <024901c6cba5$714c3560$341416ac@basis.com> After looking through the build messages closer, there is an error building SerialImp.c: gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type Looks like B57600 is not defined and there are no definitions for DEVICEDIR and LOCKDIR on AIX. Can I just a the following to SerialImp.h? #if defined(__aix__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __aix__ */ Mark Schnedar ----- Original Message ----- From: "Mark E. Schnedar" To: Sent: Tuesday, August 29, 2006 12:57 PM Subject: [Rxtx] Porting to AIX Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 29 15:25:35 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 29 Aug 2006 16:25:35 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <84d4a6d50608291425i1fb819d3i615cf9b85b1e9617@mail.gmail.com> On 8/29/06, Bob Jacobsen wrote: > Can you point to any devices that actually implement this "new" understanding? > > I think the person who wrote that documentation paragraph is just confused. The paragraph is from the Windows documentation of its DCB structure which is used to configure the Serial Device. This is what RXTX uses internally. My version is from MSDN, and Google finds the same text here: (search for fRtsControl). I have not seen any mention anywhere of it being incorrect (and yes, I did look, because I thought the same thing). My discussion is based on trying to use RXTX to talk to a device that used the old style of one-way flow control (RTS is raised to SEND data from the PC to the device). An existing VC++ app use the old-style RTS_CONTROL_TOGGLE. RXTX did not - it used the newer style RTS_CONTROL_HANDSHAKE, so things didn't work - the device was seeing RTS HIGH all the time, so it was thinking that the PC was ready to TX all the time. When I switch RXTX to using RTS_CONTROL_ENABLED and manually control RTS, then things work correctly. The behavior is consistent with this understanding if I hook two serial ports on Windows XP in lookback (via null modem). I'd be very surprised if this had not been corrected by M$ by this time. The same structure has been around since WinNT (mid 1990's) - their documentation is typically pretty good. > > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > > enabling the DCE to send, when the input buffer has enough room to > > > receive data. The driver lowers the DTR line, preventing the DCE to > > > send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. There is a seperate field, fDtrControl, which you can set to DTR_CONTROL_HANDSHAKE, that appears to do exactly this. > This then leaves RTS/CTS (with RTS usually just stuck high) for > controlling flow into the DCE (peripheral). Again, lots of hardware > devices actually do this. > > I don't work on Windows, so can't be sure of what happens. But on > the MacOS X version of RXTX, CTS low stops transmission, exactly as > the "old" style would expect. Well, the Linux Serial HOWTO is where I got most of my information. And yes, I thought it was wrong as well, but it's apparently how things are implemented: Donno - but it works for me... Pete From tjarvi at qbang.org Tue Aug 29 19:11:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 29 Aug 2006 19:11:40 -0600 (MDT) Subject: [Rxtx] Porting to AIX In-Reply-To: <024901c6cba5$714c3560$341416ac@basis.com> References: <01f201c6cb9d$034d4f20$341416ac@basis.com> <024901c6cba5$714c3560$341416ac@basis.com> Message-ID: Hi Mark That should do it. You can put ifdef around the B57600 as we did with higher baudrates. You may want to use tip, minicom, kermit or some other serial application on the AIX to confirm that the lockfiles created are correct. Neat stuff. On Tue, 29 Aug 2006, Mark E. Schnedar wrote: > After looking through the build messages closer, > there is an error building SerialImp.c: > > gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o > /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type > > Looks like B57600 is not defined and there are no > definitions for DEVICEDIR and LOCKDIR on AIX. > > Can I just a the following to SerialImp.h? > > #if defined(__aix__) > # define DEVICEDIR "/dev/" > # define LOCKDIR "/var/lock" > # define LOCKFILEPREFIX "LCK.." > # define FHS > #endif /* __aix__ */ > > Mark Schnedar > > > ----- Original Message ----- > From: "Mark E. Schnedar" > To: > Sent: Tuesday, August 29, 2006 12:57 PM > Subject: [Rxtx] Porting to AIX > > > Hi, > > I'm new to rxtx. Currently my company has an interpreter product > that uses rxtx on Windows and Linux. I am trying to get rxtx to > build on AIX. I downloaded rxtx, ran ./configure and make. When > I run make I get the following error: > > libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object > make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 > > Do you have any suggestions on how to fix this problem? > > I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error > on both systems). I did have our system administrator load > automake, autoconf, make (gnu), and gcc. Here are the versions: > > AIX 4.3.3 AIX 5.3.0 > rxtx: 2.1-7r2 2.1-7r2 > autoconf: 2.53 2.59 > automake: 1.5 1.8.5 > make: 3.79.1 3.80 > gcc: (used native cc) 4.0.0 > > Any help would be appreciated. > > Mark Schnedar > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From guille at sms.nl Wed Aug 30 01:14:32 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 09:14:32 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <7.0.1.0.0.20060830091204.03652de0@sms.nl> At 16:49 29/08/2006, Bob Jacobsen wrote: >At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > > > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >is defined as: > > > > > Enables RTS flow-control handshaking. The driver raises the RTS line, > >> enabling the DCE to send, when the input buffer has enough room to > >> receive data. The driver lowers the RTS line, preventing the DCE to > >> send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. > > > >which clearly reflects the newer usage style - it keeps the RTS line high > >as long as there is space to _receive_ data. And takes it low when the > >receive/input buffer is getting full to stop the modem from sending it data. > > > >Does this jive with other peoples understanding of RTS usage? > >Can you point to any devices that actually implement this "new" understanding? Many (most) of the embedded devices we work with implement this kind of flow control. The host (DTE) raises RTS when it can receive data, and lowers it when the input buffers are full. In turn it watches the CTS line to see whether it can send data to the DCE. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From tjarvi at qbang.org Wed Aug 30 01:23:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 30 Aug 2006 01:23:46 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830091204.03652de0@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 16:49 29/08/2006, Bob Jacobsen wrote: >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: >>> >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >>> is defined as: >>> >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, >>>> enabling the DCE to send, when the input buffer has enough room to >>>> receive data. The driver lowers the RTS line, preventing the DCE to >>>> send, when the input buffer does not have enough room to receive >>>> data. If this value is used, it is an error for the application to adjust >>>> the line with EscapeCommFunction. >>> >>> which clearly reflects the newer usage style - it keeps the RTS line high >>> as long as there is space to _receive_ data. And takes it low when the >>> receive/input buffer is getting full to stop the modem from sending it data. >>> >>> Does this jive with other peoples understanding of RTS usage? >> >> Can you point to any devices that actually implement this "new" understanding? > > Many (most) of the embedded devices we work with implement this kind of flow > control. The host (DTE) raises RTS when it can receive data, and lowers it > when the input buffers are full. In turn it watches the CTS line to see > whether it can send data to the DCE. > I think this explains some hardware control 'bugs' I've seen. -- Trent Jarvi tjarvi at qbang.org From guille at sms.nl Wed Aug 30 02:01:35 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 10:01:35 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> At 09:23 30/08/2006, Trent Jarvi wrote: >On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > > > At 16:49 29/08/2006, Bob Jacobsen wrote: > >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >>> > >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >>> is defined as: > >>> > >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, > >>>> enabling the DCE to send, when the input buffer has enough room to > >>>> receive data. The driver lowers the RTS line, preventing the DCE to > >>>> send, when the input buffer does not have enough room to receive > >>>> data. If this value is used, it is an error for the > application to adjust > >>>> the line with EscapeCommFunction. > >>> > >>> which clearly reflects the newer usage style - it keeps the RTS line high > >>> as long as there is space to _receive_ data. And takes it low when the > >>> receive/input buffer is getting full to stop the modem from > sending it data. > >>> > >>> Does this jive with other peoples understanding of RTS usage? > >> > >> Can you point to any devices that actually implement this "new" > understanding? > > > > Many (most) of the embedded devices we work with implement this > kind of flow > > control. The host (DTE) raises RTS when it can receive data, and lowers it > > when the input buffers are full. In turn it watches the CTS line to see > > whether it can send data to the DCE. > > > >I think this explains some hardware control 'bugs' I've seen. I think the above is the most widespread use, but that may just mean it is the most widespread use in our specific segment (embedded systems). Some UART chips (e.g. from Exar) implement this kind of flow control directly in hardware. For example the Exar can be configured to suspend transmission when it sees CTS low, and resume transmission when it sees CTS high. This is also consistent with our experience. Maybe this helps clarify: http://www.tldp.org/HOWTO/Text-Terminal-HOWTO-10.html#ss10.7 Note the "Old RTS/CTS handshaking is different" section, which refers to "older terminals" whereas newer equipment would use RTS/CTS flow control (or equivalently DTR/DTS) as described above. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From Bob_Jacobsen at lbl.gov Wed Aug 30 07:55:31 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 30 Aug 2006 06:55:31 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> <7.0.1.0.0.20060830095557.0374ff28@sms.nl> Message-ID: I think we all agree that CTS inactive means "Send no more from DTE to DCE". The question is how to express the other direction, "Send no more from DCE to DTE". There are two parts to this question: What do various DTE-like devices do, and what do various DCE-like devices expect? Electrically, the lines that go that direction are DTR, DCD, and RTS (plus some special-purpose lines that are rarely present). All three devices I work most with respect the DTR lead. On the other hand, the FTDI chips for doing serial over USB provide either (RTS and CTS) or (DTR and DSR) as the two leads. What we're probably seeing is two different approaches, that have propagated separately. That's a problem. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From Pawan.Kharbanda at dot.state.co.us Wed Aug 30 09:07:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 30 Aug 2006 09:07:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0455E5E5@hqexchange3.dot.state.co.us> Trent, Sorry for not responding earlier to your email. I was actually waiting for the release of our software on the new Hardware. As I mentioned in my previous emails, RXTX crashes and locks up serial ports with the older version of Redhat (Linux 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:28:55 EDT 2005 i686 i686 i386 GNU/Linux), it might work ok if you are using one or 2 ports but anything more than that it has issues. I was using JDK1.5.0_06 and older firmwares of Digi boxes. Let me know if you need any more specific information of the older system. Thanks Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Thursday, August 10, 2006 5:40 AM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even > after 10000 operations (now I am trying 100,000 :). This is all with > the original RXTX 2.1.7 (final) api's without any of my fixes that I > have been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying > the RXTX saying the suggested kernel for Redhat Linux is > 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Aug 1 01:11:30 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 1 Aug 2006 09:11:30 +0200 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <34B6BC40-1405-4A13-8054-0FC6CE10466A@buechse.de> This is a problem with lock files. You should find it somewhere in the documentation... On 01.08.2006, at 03:53, Richard P. Welty wrote: > trying to get my app running on a Mac OS X powerbook, when > the following is executed as the first thing inside the > run method of a Thread: > > > try { > port = (SerialPort) selectedPort.open( > this.getClass().getName(), 2000); > } catch ( PortInUseException ex){ > ex.printStackTrace(); > return; > } > > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java: > 354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run > (ScaleWatcher.java:143) > > i've not seen any documentation suggesting that rxtx would be finicky > about application names... > > thanks for any suggestions, > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From rwelty at suespammers.org Tue Aug 1 05:37:53 2006 From: rwelty at suespammers.org (Richard P. Welty) Date: Tue, 01 Aug 2006 07:37:53 -0400 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <44CF3D11.9060108@suespammers.org> Richard P. Welty wrote: > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) Aha, a confusing error message. it's really a lock file problem; the code is trying to fill in the application name but when it's getting "Unknown Application" and filling that in... richard From ajmas at sympatico.ca Tue Aug 1 13:10:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:10:59 -0400 Subject: [Rxtx] Application Name? Message-ID: <20060801191059.HFCD18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> You need the source code in CVS. The forth coming 2.18 will correct this, but currently the only place to find the correction is in CVS. No idea when 2.18 is due. > > From: "Richard P. Welty" > Date: 2006/08/01 Tue AM 07:37:53 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Application Name? > > Richard P. Welty wrote: > > > i get the following: > > > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > at > > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) > > Aha, a confusing error message. it's really a lock file problem; the > code is trying to fill in the application name but when it's getting > "Unknown Application" and filling that in... > > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:15:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:15:57 -0400 Subject: [Rxtx] Do interfaces break backwards compatibility? Message-ID: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> It is the class that decides to add serializable that needs to worry about those issues. For the most part serial ports and their connection states should be considered as transient, since there is no guarantee they will still be present or that their state will be, especially in a USB world. What you can store is the port settings and port id and then simply test for port availability next time. Nothing else should be assumed. > > From: Gregg Wonderly > Date: 2006/07/31 Mon PM 01:21:19 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Do interfaces break backwards compatibility? > > Doug Berkland wrote: > > As far as I can tell, nothing in either RXTX or Sun's JavaCOMM > > implements Serializable. Therefore, there are no worries from that > > either. (I can't think of a reason anything in JavaCOMM should > > implement Serializable either.) > > Any interface in javax.comm can become implemented by a serializable object. > Thus, if someone wants to provide remote access to a serial port, then they > might (and I think this is not wise) choose to subclass and add Serializable to > the interface list. > > It's that kind of Serialization compatibility that I'm talking about. > > Gregg Wonderly > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:18:11 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:18:11 -0400 Subject: [Rxtx] precompiled for Intel Mac? Message-ID: <20060801191811.FLJY27612.tomts16-srv.bellnexxia.net@smtp1.sympatico.ca> > > From: Joachim Buechse > There will be. However not before we have figured out some remaining issues. What issues are remaining? Andre From Pawan.Kharbanda at dot.state.co.us Tue Aug 1 16:55:08 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 1 Aug 2006 16:55:08 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Hi, I am also experiencing occasional JVM crash thru the native code. I am attaching the log from the crash. Any ideas what might be causing it???? Regards Pawan Kharbanda # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # --------------- T H R E A D --------------- Current thread (0x8d000480): JavaThread "Thread-119" [_thread_in_native, id=111 51] siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba Registers: EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 Top of Stack: (sp=0x8d3482b8) 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 0x8d348308: 00000000 00000002 00000000 00000000 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 Instructions: (pc=0xb75e39b2) 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~StubRoutines::call_stub V [libjvm.so+0x2607ec] V [libjvm.so+0x423828] V [libjvm.so+0x260045] V [libjvm.so+0x2600de] V [libjvm.so+0x2d7745] V [libjvm.so+0x4c2ba3] V [libjvm.so+0x424338] C [libpthread.so.0+0x4dd8] 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 ) =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, id=11026] 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, id=11023] From tjarvi at qbang.org Tue Aug 1 18:46:21 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 1 Aug 2006 18:46:21 -0600 (MDT) Subject: [Rxtx] JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Message-ID: On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) > C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] > 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, > id=11034] > 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, > id=11033] > 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, > id=11032] > 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, > id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] > 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, > id=11028] > 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, > id=11027] > 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, > id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] > 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- Index: termios.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/termios.c,v retrieving revision 1.9.2.57 diff -u -r1.9.2.57 termios.c --- termios.c 4 Jun 2006 02:50:01 -0000 1.9.2.57 +++ termios.c 11 Jun 2006 21:51:10 -0000 @@ -1048,26 +1048,29 @@ if ( !first_tl ) { port->prev = NULL; + port->next = NULL; first_tl = port; } else { - while ( index->next ) + while ( ( index->fd < port->fd ) && index->next ) index = index->next; - if ( port == first_tl ) + if ( index->fd > port->fd ) { - port->prev = NULL; - port->next = first_tl; - first_tl->prev = port; - first_tl = port; + /* inserting previously closed fd */ + port->prev = index->prev; + port->next=index + index->prev->next = port; + index->prev = port; } else { + /* adding to end of list */ port->prev = index; + port->next = NULL; index->next = port; } } - port->next = NULL; LEAVE( "add_port" ); return port; From gergg at cox.net Tue Aug 1 23:25:19 2006 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 02 Aug 2006 00:25:19 -0500 Subject: [Rxtx] Do interfaces break backwards compatibility? In-Reply-To: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <44D0373F.7020600@cox.net> Andre-John Mas wrote: > It is the class that decides to add serializable that needs to worry about those issues. > For the most part serial ports and their connection states should be considered as > transient, since there is no guarantee they will still be present or that their state > will be, especially in a USB world. Right, but when you provide an interface as the standard, that opens the doors for a lot more interpretation and variation. An abstract class can indicate a lot more about what the expected implementation is. Gregg Wonderly From lyon at docjava.com Wed Aug 2 06:02:15 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:02:15 -0400 Subject: [Rxtx] jsr spec and license issues Message-ID: Hi All, Trent and I have been discussing the license issues of the JSR spec and code that we develop, as a community. Here is what we have come up with: >During the development, the new JSR spec that we derive >will be >covered under the LGPL license. Since it is >just interfaces, any contributions will come back to me, for inclusion >into the specification. The goal is to provide a detailed set of >interfaces that >document the present state of our reference model. I am using >the RXTX as the reference model. If there is something missing from >the reference model, or if the reference model has something that should >not be there, we will need to discuss it. > >After Sun accepts the JSR, I, as the copyright holder, can issue >a version with a JSR compatible license. > >The goal is to migrate the interfaces into javax.comm. Does this sound like a reasonable plan to everyone? Thanks! - Doug From joachim at buechse.de Wed Aug 2 06:21:03 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 14:21:03 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Good day, quite frankly I think that this is a very bad idea. This specification (!) should be in the public domain and nowhere else. Defining a spec under the (L)GPL makes absolutely no sense. After all it is a specification not an implementation. There is no or only trivial code attached to it. So while nothing can be gained by putting it under the LGPL, a lot can be lost - for example the contribution of companies that do not like to open source their implementations. Furthermore you are plain wrong assuming you will be the copyright holder to additions made by other people. Best regards, Joachim On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for >> inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that >> should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Aug 2 06:39:28 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:39:28 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Hi All, I don't know anything about licensing issues. The below sounds reasonable. If we make this public domain, will that be compatible with Sun's JSR? Thanks! - DL P.S. I really don't care what we do, as long as there is some sort of collective agreement. >Good day, > >quite frankly I think that this is a very bad idea. This specification >(!) should be in the public domain and nowhere else. > >Defining a spec under the (L)GPL makes absolutely no sense. After all? >it is a specification not an implementation. There is no or only? >trivial code attached to it. So while nothing can be gained by? >putting it under the LGPL, a lot can be lost - for example the? >contribution of companies that do not like to open source their? >implementations. > >Furthermore you are plain wrong assuming you will be the copyright? >holder to additions made by other people. > >Best regards, >Joachim > > >On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for? >>> inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that? >>> should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> >> Does this sound like a reasonable plan to everyone? >> >> Thanks! >> - Doug >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 07:50:09 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 10:50:09 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D0AD91.4080103@gmail.com> Hi, I have been searching the web and here it is: http://jcp.org/en/resources/license_reference Here there is a list of the licenses that are compatible with the JCP for JSR submitting. I think that Apache, CDDL, CPL and OSL are the one that are compatible with our needs. But I think that Apache is the best for us, Doug why do not make a votation? Regards, Manuel > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. > >> Good day, >> >> quite frankly I think that this is a very bad idea. This specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From lyon at docjava.com Wed Aug 2 08:10:55 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 10:10:55 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D0AD91.4080103@gmail.com> References: <44D0AD91.4080103@gmail.com> Message-ID: Hi All, I have no objection to an Apache license for the JSR interfaces that we produce. Would anyone care to comment? Joachim: Does this address your public domain concerns? How does this impact the reference implementation (i.e. RXTX)? Thanks! - DL >Hi, >I have been searching the web and here it is: >http://jcp.org/en/resources/license_reference >Here there is a list of the licenses that are compatible with the JCP >for JSR submitting. >I think that Apache, CDDL, CPL and OSL are the one that are compatible >with our needs. >But I think that Apache is the best for us, Doug why do not make a votation? >Regards, >Manuel > >> Hi All, >> I don't know anything about licensing issues. >> The below sounds reasonable. If we make this public domain, >> will that be compatible with Sun's JSR? >> Thanks! >> - DL >> P.S. I really don't care what we do, as long as there is >> some sort of collective agreement. >>?? >>> Good day, >>> >>> quite frankly I think that this is a very bad idea. This specification >>> (!) should be in the public domain and nowhere else. >>> >>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>> it is a specification not an implementation. There is no or only >>> trivial code attached to it. So while nothing can be gained by >>> putting it under the LGPL, a lot can be lost - for example the >>> contribution of companies that do not like to open source their >>> implementations. >>> >>> Furthermore you are plain wrong assuming you will be the copyright >>> holder to additions made by other people. >>> >>> Best regards, > >> Joachim >>> >>> >>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>> >>>???? >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>?????? >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for >>>>> inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that >>>>> should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>>>???????? >>>> Does this sound like a reasonable plan to everyone? >>>> >>>> Thanks! >>>> - Doug >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>?????? >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>???? >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 08:20:29 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 11:20:29 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D0AD91.4080103@gmail.com> Message-ID: <44D0B4AD.2050106@gmail.com> Doug; > How does this impact the reference implementation (i.e. RXTX)? > Fuck I have not thinked about that, we would need that everyone who had colaborated with RXTX and have putted code on it to agree a license chaging. Or start from sractch. I don't know if Trent have the right to do that. Regards, Manuel > > >> Hi, >> I have been searching the web and here it is: >> http://jcp.org/en/resources/license_reference >> Here there is a list of the licenses that are compatible with the JCP >> for JSR submitting. >> I think that Apache, CDDL, CPL and OSL are the one that are compatible >> with our needs. >> But I think that Apache is the best for us, Doug why do not make a votation? >> Regards, >> Manuel >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> >> >> Joachim >> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 08:21:15 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 16:21:15 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Putting something in the public domain means, that it can be used by anyone for whatever (s)he thinks is appropriate. The authors define no restriction regarding it's use. That's how any specification should be. Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From berkland at spamcop.net Wed Aug 2 08:50:50 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 10:50:50 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> You may want to consider making it available under two separate licenses. 1 - LGPL as it is today The LGPL can be used by anyone wanting to extend the current functionality, as long as they provide code for anything they change. 2 - Sun Community Source License (SCSL) http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf The SCSL will allow anyone who wants to do a closed source implementation from the ground up to do so, if I'm reading it correctly, as long as they don't use any of the code from the Reference Implementation. This will satisfy any company that wants to have a closed-source implementation, but not help them out very much. On 8/2/06, Joachim Buechse wrote: > Putting something in the public domain means, that it can be used by > anyone for whatever (s)he thinks is appropriate. The authors define > no restriction regarding it's use. That's how any specification > should be. > > Best regards, > Joachim > > > On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > > > Hi All, > > I don't know anything about licensing issues. > > The below sounds reasonable. If we make this public domain, > > will that be compatible with Sun's JSR? > > Thanks! > > - DL > > P.S. I really don't care what we do, as long as there is > > some sort of collective agreement. > >> Good day, > >> > >> quite frankly I think that this is a very bad idea. This > >> specification > >> (!) should be in the public domain and nowhere else. > >> > >> Defining a spec under the (L)GPL makes absolutely no sense. After all > >> it is a specification not an implementation. There is no or only > >> trivial code attached to it. So while nothing can be gained by > >> putting it under the LGPL, a lot can be lost - for example the > >> contribution of companies that do not like to open source their > >> implementations. > >> > >> Furthermore you are plain wrong assuming you will be the copyright > >> holder to additions made by other people. > >> > >> Best regards, > >> Joachim > >> > >> > >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> > >>> Hi All, > >>> Trent and I have been discussing the license issues of the > >>> JSR spec and code that we develop, as a community. > >>> Here is what we have come up with: > >>> > >>>> During the development, the new JSR spec that we derive > >>>> will be > >>>> covered under the LGPL license. Since it is > >>>> just interfaces, any contributions will come back to me, for > >>>> inclusion > >>>> into the specification. The goal is to provide a detailed set of > >>>> interfaces that > >>>> document the present state of our reference model. I am using > >>>> the RXTX as the reference model. If there is something missing > >>>> from > >>>> the reference model, or if the reference model has something that > >>>> should > >>>> not be there, we will need to discuss it. > >>>> > >>>> After Sun accepts the JSR, I, as the copyright holder, can issue > >>>> a version with a JSR compatible license. > >>>> > >>>> The goal is to migrate the interfaces into javax.comm. > >>> > >>> Does this sound like a reasonable plan to everyone? > >>> > >>> Thanks! > >>> - Doug > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From naranjo.manuel at gmail.com Wed Aug 2 09:03:02 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 12:03:02 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> References: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> Message-ID: <44D0BEA6.2040408@gmail.com> Or even better, you can use Apache v2, which allows both Open Source and Closed Source forms ;-) > You may want to consider making it available under two separate licenses. > > 1 - LGPL as it is today > > The LGPL can be used by anyone wanting to extend the current > functionality, as long as they provide code for anything they change. > > 2 - Sun Community Source License (SCSL) > http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf > > The SCSL will allow anyone who wants to do a closed source > implementation from the ground up to do so, if I'm reading it > correctly, as long as they don't use any of the code from the > Reference Implementation. This will satisfy any company that wants to > have a closed-source implementation, but not help them out very much. > > On 8/2/06, Joachim Buechse wrote: > >> Putting something in the public domain means, that it can be used by >> anyone for whatever (s)he thinks is appropriate. The authors define >> no restriction regarding it's use. That's how any specification >> should be. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This >>>> specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> Joachim >>>> >>>> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing >>>>>> from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 09:46:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 17:46:25 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> I assume that javax.comm/RXTX is to be redefined using Interfaces. In this case we should separate 2 things: 1) The specification and it's incarnation in the form of java classes defining the interfaces. 2) The actual implementation of the functionality. It is possible that 1) may contain some trivial code in abstract or none abstract classes (ie PortFactory, PortRegistry, etc). Doug's original question was regarding 1) - unless I misunderstood. I personally think that 1) should be in the public domain. It should not be covered by any restrictions what-so-ever. Let it be free as in "totally free in any respect". I do not care under which license 2) is released. Why? Because it is in my very interest that all/almost all vendors include implementations with their distributions. Which will only happen if they do not need to respect open source licenses. (javax.comm is not nearly as important as the Apache web server or MySql, so nobody will take licensing risks). Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ssbello at gmail.com Wed Aug 2 10:28:30 2006 From: ssbello at gmail.com (Simone) Date: Wed, 2 Aug 2006 18:28:30 +0200 Subject: [Rxtx] pocketPC 2003 Message-ID: <39ed505d0608020928k6ceb01aen470c2e6a78c5a6b0@mail.gmail.com> Does anyone know if the Rxtx works on PocketPc 2003? If yes, could you, please, give me some suggestion. Thanks, Simone Bell? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/72e0fb87/attachment-0002.html From berkland at spamcop.net Wed Aug 2 13:00:10 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 15:00:10 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> Message-ID: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> How about these for the "Business Terms" of the new JSR: > The specification will be released in accordance with standard terms > as specified by the JCP process. > > The reference implementation (RI) will be delivered in binary form > free of charge from http://rxtx.org. Licensing details are expected to > be under the Binary Code License (BCL). > > The source for the reference implementation is expected to be > delivered via the Limited GNU Public License (LGPL) and available free > of charge. > > The TCK will be made available free of charge to all J2SE and J2EE licensees. > > The TCK will be offered for license at no charge, without support or > any trademark license rights, to qualified not-for-profit entities > (including not-for-profit) academic institutions) and qualified > individuals engaged in efforts to create compatible implementations of > the Specification. From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 13:13:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 13:13:33 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E495@hqexchange3.dot.state.co.us> Trent, I didn't exactly get it. Again I am not a C guy, maybe its very simple for you but I don't see any checks for FD (as written in the patch for termios.c) in the initialise_event_info_struct, I see some checks in the interruptEventLoop call. Second as you explained I open three("/dev/cuf01","/dev/cuf01","/dev/cuf01") ports, I close the 2nd ("/dev/cuf02", the other 2 are still open) , I never try to open the third ("/dev/cuf03") port again if it is already open. Are you planning to have a fix for this in the next release 2.1.8. Its very important for me to have a fix for this, its causing some major headaches for our project. I know you have your regular job too, I will appreciate any help. Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, August 01, 2006 6:46 PM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java > VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic > frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) C [librxtxSerial.so+0x69b2] > initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] > Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" > [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: > /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread > "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 > JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon > [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" > daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread > "AdapterThread" daemon [_thread_blocked, id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, > id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Wed Aug 2 13:14:20 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 16:14:20 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> Message-ID: <44D0F98C.1070600@gmail.com> +1 Agree > How about these for the "Business Terms" of the new JSR: > > >> The specification will be released in accordance with standard terms >> as specified by the JCP process. >> >> The reference implementation (RI) will be delivered in binary form >> free of charge from http://rxtx.org. Licensing details are expected to >> be under the Binary Code License (BCL). >> >> The source for the reference implementation is expected to be >> delivered via the Limited GNU Public License (LGPL) and available free >> of charge. >> >> The TCK will be made available free of charge to all J2SE and J2EE licensees. >> >> The TCK will be offered for license at no charge, without support or >> any trademark license rights, to qualified not-for-profit entities >> (including not-for-profit) academic institutions) and qualified >> individuals engaged in efforts to create compatible implementations of >> the Specification. >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From savagobr at yahoo.com Wed Aug 2 13:40:42 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:40:42 -0700 (PDT) Subject: [Rxtx] jsr spec and license issues Message-ID: <20060802194042.83599.qmail@web53807.mail.yahoo.com> Friends Apache seems ok... if I get it right, does it *almost* equals to BSD? Regarding public domain: I think that the good people that spent so much time on this library will like to keep some rights over its own work, don't you think? Best regards Savago --------------------------------- Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/79abdfd5/attachment-0002.html From savagobr at yahoo.com Wed Aug 2 13:58:04 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:58:04 -0700 (PDT) Subject: [Rxtx] JVM Crashing Message-ID: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago --------------------------------- Groups are talking. We´re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/47d561ae/attachment-0002.html From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 14:09:18 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 14:09:18 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E4AD@hqexchange3.dot.state.co.us> Thank You :) ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adenilson Cavalcanti Sent: Wednesday, August 02, 2006 1:58 PM To: rxtx at qbang.org Subject: Re: [Rxtx] JVM Crashing Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago ________________________________ Groups are talking. We?re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/b4eb22cf/attachment-0002.html From tjarvi at qbang.org Wed Aug 2 20:23:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 20:23:42 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > Hi Doug As mentioned off the list, the important point in my mind is that everyone is on the same base more than what license is decided upon. These things are just best addressed early so there isn't confusion. The Apache license is fairly standard in the Open Source community vs several of the relatively unknown [and obviously redundat even by their descriptions] offerings by Sun. Perhaps one option here that would kill a few birds with one stone is to dual license the interface as Apache and LGPL. This would allow everyone to use the interfaces without needing to do wastefull work for internal license requirements. Projects could choose between the two the license that best suits their needs. If there is a software shop doing Java that isn't familiar with the Apache license, they must be doing some strange Java. I do think it is foolhearty to blindly travel in public domain but nobody is trying to undermine the spec files. The intent is to use the work for a JSR submission that everyone can use without confusion later on down the line. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 21:01:16 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 20:01:16 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D166FC.9090005@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> Does this sound like a reasonable plan to everyone? >> > > Hi Doug > > As mentioned off the list, the important point in my mind is that everyone > is on the same base more than what license is decided upon. These things > are just best addressed early so there isn't confusion. > > The Apache license is fairly standard in the Open Source community vs > several of the relatively unknown [and obviously redundat even by > their descriptions] offerings by Sun. The JCP is a reasonable process for what the RxTx project intends to achieve by evolving the API. There isn't much to lose by going the JSR route. The community will benefit from a fair API like so many other that have undergone the process. Sun isn't going to own the API or manipulate it into anything weird anymore than anyone else is. I think your fears are rather vague and unfounded. Which isn't to say that I am a well-informed representative of the JCP, I've only sat through one JSR process and we ended up with javax.usb, and IBM got what it wanted out of the deal and the community got a very nice standard. Paul > > Perhaps one option here that would kill a few birds with one stone is to > dual license the interface as Apache and LGPL. This would allow everyone > to use the interfaces without needing to do wastefull work for internal > license requirements. Projects could choose between the two the license > that best suits their needs. If there is a software shop doing Java that > isn't familiar with the Apache license, they must be doing some strange > Java. > > I do think it is foolhearty to blindly travel in public domain but nobody > is trying to undermine the spec files. The intent is to use the work for > a JSR submission that everyone can use without confusion later on down the > line. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Aug 2 22:10:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 22:10:48 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D166FC.9090005@sun.com> References: <44D166FC.9090005@sun.com> Message-ID: On Wed, 2 Aug 2006, Paul Klissner wrote: > Trent Jarvi wrote: >> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> Does this sound like a reasonable plan to everyone? >>> >> >> Hi Doug >> >> As mentioned off the list, the important point in my mind is that everyone >> is on the same base more than what license is decided upon. These things >> are just best addressed early so there isn't confusion. >> >> The Apache license is fairly standard in the Open Source community vs >> several of the relatively unknown [and obviously redundat even by >> their descriptions] offerings by Sun. > > The JCP is a reasonable process for what the RxTx project intends > to achieve by evolving the API. > > There isn't much to lose by going the JSR route. The community will > benefit from a fair API like so many other that have undergone > the process. Sun isn't going to own the API or manipulate it > into anything weird anymore than anyone else is. I think your > fears are rather vague and unfounded. > > Which isn't to say that I am a well-informed representative > of the JCP, I've only sat through one JSR process and we ended > up with javax.usb, and IBM got what it wanted out of the deal > and the community got a very nice standard. > Hi Paul The JCP should work fine. As our intentions are in line, licensing so that everyone can use the interface code should not be a problem. Note that the current default right now is that the interfaces are copyrighted and no license for distribution is included. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 22:33:51 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 21:33:51 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D166FC.9090005@sun.com> Message-ID: <44D17CAF.1090802@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Paul Klissner wrote: > >> Trent Jarvi wrote: >>> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>> Does this sound like a reasonable plan to everyone? >>>> >>> Hi Doug >>> >>> As mentioned off the list, the important point in my mind is that everyone >>> is on the same base more than what license is decided upon. These things >>> are just best addressed early so there isn't confusion. >>> >>> The Apache license is fairly standard in the Open Source community vs >>> several of the relatively unknown [and obviously redundat even by >>> their descriptions] offerings by Sun. >> The JCP is a reasonable process for what the RxTx project intends >> to achieve by evolving the API. >> >> There isn't much to lose by going the JSR route. The community will >> benefit from a fair API like so many other that have undergone >> the process. Sun isn't going to own the API or manipulate it >> into anything weird anymore than anyone else is. I think your >> fears are rather vague and unfounded. >> >> Which isn't to say that I am a well-informed representative >> of the JCP, I've only sat through one JSR process and we ended >> up with javax.usb, and IBM got what it wanted out of the deal >> and the community got a very nice standard. >> > > Hi Paul > > The JCP should work fine. As our intentions are in line, licensing so > that everyone can use the interface code should not be a problem. Sorry, looks like my concerns were unfounded. I haven't been following the threads closely this week, as work got busy with an escalated issue and new project. Sorry about that. > > Note that the current default right now is that the interfaces are > copyrighted and no license for distribution is included. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Aug 3 03:45:56 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 03 Aug 2006 05:45:56 -0400 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: Hi All, I have been waiting a day for things to cool down. Licensing appears to be a hot-button topic. I have no objection to dual license the interfaces as both Apache and LGPL. Some thoughts: Goal: developers wish to work together on a common piece of code that the team needs. It makes sense that the code base they work on should be Apache-licensed. That makes it possible for the team to use and develop common code, even if the end result is LGPL'd as a whole. If we combine licenses, we must follow the terms of both licenses when distributing the combined work. Thus, the dual license contains the super set of terms in the licenses of Apached and LGPL. This should address concern about using Apache-licensed code within LGPL projects due to the FSF's claim that they are incompatible. Here is a draft statement for RXSL: The RXTX Specification Library (RXSL) uses a dual license strategy for the source code. These licenses are the GNU Lesser General Public License (LGPL) and the Apache License. I strongly encourage users to use the LGPL license and participate fully in the free software community. Dual licensing of the RXSL source code provides open and free access to the technology both for the GPL community and for other developers or companies that cannot use the GPL. Dual license is common practice in open source projects like OpenOffice, Perl and Mozilla. Through the combined use of LGPL and Apache license, developers will have a high degree of freedom yet compatibility and interoperability will be preserved. You can freely modify, extend, and improve the RXSL source code. The only question is whether or not you must provide the source code and contribute modifications to the community. The GNU and Apache licenses allow different ranges of flexibility in this regard, but in the end, regardless of the license used, any and all incompatible changes must be published openly. Note that there is the RXTX Reference Model that uses the org.rxtx package, which itself is protected by the LGPL. This may be part of the distribution, however, it can not be redistributed using a different license. Is everybody OK with this? Thanks Trent, great idea! - Doug From joachim at buechse.de Thu Aug 3 04:15:44 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 3 Aug 2006 12:15:44 +0200 Subject: [Rxtx] JVM Crashing In-Reply-To: <20060802195804.70935.qmail@web53812.mail.yahoo.com> References: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Message-ID: <6ABA2AB2-CECE-4C4B-A7D6-0CDF8B9C95A8@buechse.de> I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of > rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jvermillard at archean.fr Thu Aug 3 04:26:48 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Thu, 03 Aug 2006 12:26:48 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <1154600808.16732.18.camel@localhost.localdomain> Hi, I'm a developer of the Apache MINA framework. It's a network application framework which helps users develop high performance and high scalability network applications easily. http://directory.apache.org/subprojects/mina/index.html . I would like to integrate serial connection to the framework (actualy supporting TCP, UDP (broadcast) and in VM communications), but LGPL is an issue for me. An Apache License would be pretty usefull for me and integrate rxtx functionnalities easly. Thanks, Julien Le jeudi 03 ao?t 2006 ? 05:45 -0400, Dr. Douglas Lyon a ?crit : > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/755cca7f/smime-0002.bin From pascal at quies.net Thu Aug 3 04:32:35 2006 From: pascal at quies.net (Pascal S. de Kloe) Date: Thu, 3 Aug 2006 12:32:35 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <200608031232.35838.pascal@quies.net> Hi Doug, The Apache license is unnessesary complex. It puts all kinds of limitations on the usage. Is there a particular reason why people chose this or was it just the familiar name? I agree with Joachim (again) that the specification and the interfaces should be public domain. However, if we realy need a license then have a look at the X11 license because that one is compatible with the GPL and suits our needs: http://www.fsf.org/licensing/licenses/index_html http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3 ---- start: implementation Copyright (C) 2006 Sun Microsystems, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Sun Microsystems shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Sun Microsystems. Java is a trademark of Sun Microsystems, Inc. ---- end Op donderdag 3 augustus 2006 11:45, schreef Dr. Douglas Lyon: > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Aug 3 05:17:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 05:17:07 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154600808.16732.18.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: On Thu, 3 Aug 2006, Julien Vermillard wrote: > Hi, > > I'm a developer of the Apache MINA framework. It's a network application > framework which helps users develop high performance and high > scalability network applications easily. > http://directory.apache.org/subprojects/mina/index.html . I would like > to integrate serial connection to the framework (actualy supporting TCP, > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > An Apache License would be pretty usefull for me and integrate rxtx > functionnalities easly. > > Thanks, > > Julien > Hi Julien The rxtx license itself will not change. This is just the interface. You would be free to implement an rxtx replacement if the LGPL low level code is a problem for you. These licensing details would make it possible to take the interface code instead of needing to recode them for a new project. You are probably confusing the license problems with the GPL not the LGPL though you can share links to concerns off the list if you would like to go through them. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 11:59:48 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 11:59:48 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E516@hqexchange3.dot.state.co.us> Joachim, I think my both problems (JVM crashing & Port Locking) are being caused by the corruption of "Event Info Struct / EIS" I have noticed with in EIS my "FD" and "Closing" value being overwritten. The problem is definitely in SerialImp.c file. I am trying to understand what the code does and try to pin point the problem by trying few other options. I will keep everybody posted. Regards Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Joachim Buechse Sent: Thursday, August 03, 2006 4:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Thu Aug 3 13:50:07 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 14:50:07 -0500 Subject: [Rxtx] slow startup Message-ID: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete From brian at mbari.org Thu Aug 3 14:05:57 2006 From: brian at mbari.org (Brian Schlining) Date: Thu, 3 Aug 2006 13:05:57 -0700 Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> References: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Message-ID: Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B > Greetings, > I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/ > qbang.org). > > In testing things out, I ran the list ports example from the Wiki, > and it seems to take quite a while for the library to initialize? > Like on the order of 30+ seconds or so after startup (and the RXTX > banner prints), and before the application starts running. > > Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then > I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ > terminal server) and I'm wondering if they are not responding properly > and this is causing the slow startup? Or is this a known problem of > some kind, or maybe something on my system is screwy? > > Thanks, > Pete > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/6123f730/attachment-0002.html From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 14:13:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 14:13:47 -0600 Subject: [Rxtx] slow startup Message-ID: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Hi Pete, RXTX does open and close the ports in Windows. Try downloading utility like PORTMON(only for windows) and you can see that whenever you load RXTX it tries to register all the available COMM ports in the system. It is a little slow if you have virtual ports, we use digi as a terminal server, Its going to get worst of you have comm ports in 100's Thanks Pawan Kharbanda ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Brian Schlining Sent: Thursday, August 03, 2006 2:06 PM To: RXTX Developers and Users Subject: Re: [Rxtx] slow startup Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/94fd105d/attachment-0002.html From pete.flugstad at gmail.com Thu Aug 3 14:32:04 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 15:32:04 -0500 Subject: [Rxtx] slow startup In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Message-ID: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> On 8/3/06, Kharbanda, Pawan wrote: > RXTX does open and close the ports in Windows. Try downloading utility > like PORTMON(only for windows) and you can see that whenever you load RXTX > it tries to register all the available COMM ports in the system. It is a > little slow if you have virtual ports, we use digi as a terminal server, Its > going to get worst of you have comm ports in 100's Okay, I can understand that, but from the PORTMON output, it looks like it's opening each port TWICE: 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS ... 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS Also, assuming instead of listing the ports I wanted to just open one, I'm still seeing the 30 second delay, so it's scanning at startup regardless of what the Java code is going to do. Probably necessary, but annoying. I know, I know, contribute patches... :-) Thanks, Pete From tjarvi at qbang.org Thu Aug 3 15:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 15:04:42 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: On Thu, 3 Aug 2006, Pete Flugstad wrote: > On 8/3/06, Kharbanda, Pawan wrote: >> RXTX does open and close the ports in Windows. Try downloading utility >> like PORTMON(only for windows) and you can see that whenever you load RXTX >> it tries to register all the available COMM ports in the system. It is a >> little slow if you have virtual ports, we use digi as a terminal server, Its >> going to get worst of you have comm ports in 100's > > Okay, I can understand that, but from the PORTMON output, it looks > like it's opening each port TWICE: > > 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > ... > 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > > Also, assuming instead of listing the ports I wanted to just open one, > I'm still seeing the 30 second delay, so it's scanning at startup > regardless of what the Java code is going to do. Probably necessary, > but annoying. > > I know, I know, contribute patches... :-) > I think this problem is in RXTXCommDriver.java. I've just not tracked it down but it should be in the java code, not the native code so easy enough to track down. -- Trent Jarvi tjarvi at qbang.org From jvermillard at archean.fr Fri Aug 4 03:43:28 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:43:28 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: <1154684608.6181.4.camel@localhost.localdomain> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > Hi, > > > > I'm a developer of the Apache MINA framework. It's a network application > > framework which helps users develop high performance and high > > scalability network applications easily. > > http://directory.apache.org/subprojects/mina/index.html . I would like > > to integrate serial connection to the framework (actualy supporting TCP, > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > An Apache License would be pretty usefull for me and integrate rxtx > > functionnalities easly. > > > > Thanks, > > > > Julien > > > > Hi Julien > > The rxtx license itself will not change. This is just the interface. > You would be free to implement an rxtx replacement if the LGPL low level > code is a problem for you. These licensing details would make it possible > to take the interface code instead of needing to recode them for a new > project. > > You are probably confusing the license problems with the GPL not the LGPL > though you can share links to concerns off the list if you would like to > go through them. > > -- > Trent Jarvi > tjarvi at qbang.org Hi, I'm not a license expert but some guys at ASF said me you can't call LGPLed libs from java. some peoples interprete that as static linking and not dynamic linking (no idea why). So ASF/BSD licensied interface willl solve the license probleme. If you got some questions about the ASL and the way you can dual license LGPL/ASL you can ask it on legal-discuss at apache.org Julien -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/8d46c0aa/smime-0002.bin From jvermillard at archean.fr Fri Aug 4 03:51:30 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:51:30 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <1154685091.6181.6.camel@localhost.localdomain> erm from java -> from ASLed Java code Le vendredi 04 ao?t 2006 ? 11:43 +0200, Julien Vermillard a ?crit : > Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > Hi, > > I'm not a license expert but some guys at ASF said me you can't call > LGPLed libs from java. some peoples interprete that as static linking > and not dynamic linking (no idea why). So ASF/BSD licensied interface > willl solve the license probleme. > > If you got some questions about the ASL and the way you can dual license > LGPL/ASL you can ask it on legal-discuss at apache.org > > Julien > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dcc29d70/smime-0002.bin From guille at sms.nl Fri Aug 4 04:35:24 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Fri, 04 Aug 2006 12:35:24 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <7.0.1.0.0.20060804123322.036dc748@sms.nl> At 11:43 04/08/2006, Julien Vermillard wrote: >Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > >Hi, > >I'm not a license expert but some guys at ASF said me you can't call >LGPLed libs from java. some peoples interprete that as static linking >and not dynamic linking (no idea why). This interpretation is wrong. See the official position of the FSF regarding the LGPL and Java: http://www.gnu.org/licenses/lgpl-java.html http://www.fsf.org/licensing/licenses/lgpl-java.html Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From hambyiii at hotmail.com Fri Aug 4 04:52:47 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 10:52:47 +0000 Subject: [Rxtx] error getting InputStream Message-ID: Hi, I have written a program in Java for Windows xp using RXTX (which is why I am using this mailing list :). However, I am getting a problem. I am connecting to a serial port, like so: private CommPortIdentifier portID; private boolean openPort(String selectedPort) { boolean portFound = false; Enumeration portList; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portID.getName().equals(selectedPort)) { portFound = true; break; } } } return portFound; } and then I try and get the serial port input stream (leaving out the try and catch for the sake of space): SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); InputStream inputStream = serialPort.getInputStream(); but on the getInputStream() I get the following error message: Bad file descriptor in nativeavailable I cannot figure out where it is going wrong...anyone any ideas. A quick answer would be wonderful, as I am kinda under the hammer to get this fixed quickly Thanks in Advance Keith From tjarvi at qbang.org Fri Aug 4 05:13:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 05:13:19 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <7.0.1.0.0.20060804123322.036dc748@sms.nl> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> <7.0.1.0.0.20060804123322.036dc748@sms.nl> Message-ID: On Fri, 4 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 11:43 04/08/2006, Julien Vermillard wrote: >> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : >>> On Thu, 3 Aug 2006, Julien Vermillard wrote: >>> >>>> Hi, >>>> >>>> I'm a developer of the Apache MINA framework. It's a network application >>>> framework which helps users develop high performance and high >>>> scalability network applications easily. >>>> http://directory.apache.org/subprojects/mina/index.html . I would like >>>> to integrate serial connection to the framework (actualy supporting TCP, >>>> UDP (broadcast) and in VM communications), but LGPL is an issue for me. >>>> >>>> An Apache License would be pretty usefull for me and integrate rxtx >>>> functionnalities easly. >>>> >>>> Thanks, >>>> >>>> Julien >>>> >>> >>> Hi Julien >>> >>> The rxtx license itself will not change. This is just the interface. >>> You would be free to implement an rxtx replacement if the LGPL low level >>> code is a problem for you. These licensing details would make it possible >>> to take the interface code instead of needing to recode them for a new >>> project. >>> >>> You are probably confusing the license problems with the GPL not the LGPL >>> though you can share links to concerns off the list if you would like to >>> go through them. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >> >> Hi, >> >> I'm not a license expert but some guys at ASF said me you can't call >> LGPLed libs from java. some peoples interprete that as static linking >> and not dynamic linking (no idea why). > > This interpretation is wrong. See the official position of the FSF regarding > the LGPL and Java: > > http://www.gnu.org/licenses/lgpl-java.html > > http://www.fsf.org/licensing/licenses/lgpl-java.html > What I do with legal groups that go down that rat hole is give them a copy of the rxtx 2.0 license. Since the confused legal folks are going in a direction that does not represent the intent of the license or authors at that point and are confused about basic things in our industry that most consider facts, the discussions are very short. The rxtx 2.0 license just adds the following and has for 6 years or so. Not because the lawyers are right. They get confused about intent and even facts. The following is added to make confused lawyers that cant understand intent go far away and never come back. period. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. From hambyiii at hotmail.com Fri Aug 4 05:42:21 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 11:42:21 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Okay, I made a little mistake in my last message. The error is not occuring where I thought it was. Instead it is occuring when I do the following: byte[] readBuffer = new byte[128]; try { int numBytes = 0; try { Thread.sleep(500); } catch (InterruptedException e) {} while (inputStream.available() > 0) { numBytes = inputStream.read(readBuffer); } processReceivedData(readBuffer, numBytes); } catch (IOException e) { System.out.println(e.getMessage()); } So I guess the error is happening on the inputStream.read(readBuffer) again, any help is appreciated and again, thanks in advance Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 10:52:47 +0000 > >Hi, > >I have written a program in Java for Windows xp using RXTX (which is why I >am using this mailing list :). However, I am getting a problem. I am >connecting to a serial port, like so: > private CommPortIdentifier portID; > > private boolean openPort(String selectedPort) > { > boolean portFound = false; > Enumeration portList; > > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portID.getName().equals(selectedPort)) > { > portFound = true; > break; > } > } > } > > return portFound; > } > >and then I try and get the serial port input stream (leaving out the try >and >catch for the sake of space): > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >InputStream inputStream = serialPort.getInputStream(); > >but on the getInputStream() I get the following error message: > >Bad file descriptor in nativeavailable > >I cannot figure out where it is going wrong...anyone any ideas. A quick >answer would be wonderful, as I am kinda under the hammer to get this fixed >quickly > >Thanks in Advance >Keith > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From hambyiii at hotmail.com Fri Aug 4 07:08:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:08:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Hi, I know I am replying to myself a lot at the moment, but more information has come to light (These errors are actually happening on a client machine, on software that has worked for the past month, and only now has started to fail, which is why I am a little slow finding things out) The errors I have already written about are only symptoms of an orignal error. The original error occurs the first time I try to WRITE thte OutputStream: OutputStream oStream = serialPort.getOutputStream(); serialPort.notifyOnOutputEmpty(true); byte[] bs = encodeMessage(configString.toString()); oStream.write(bs); oStream.flush(); The error occurs on oStream.write(bs); and is: Input/output error in writeArray Now writeArray is native code, so I have no idea what is going on there. Any help would be appreciated Thanks Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 11:42:21 +0000 > >Okay, I made a little mistake in my last message. > >The error is not occuring where I thought it was. Instead it is occuring >when I do the following: > >byte[] readBuffer = new byte[128]; > >try { > > int numBytes = 0; > try { > Thread.sleep(500); > } > catch (InterruptedException e) > {} > > while (inputStream.available() > 0) > { > numBytes = inputStream.read(readBuffer); > } > > processReceivedData(readBuffer, numBytes); >} >catch (IOException e) >{ > System.out.println(e.getMessage()); >} > >So I guess the error is happening on the inputStream.read(readBuffer) > >again, any help is appreciated and again, thanks in advance >Keith > > >From: "Keith Thorne" > >Reply-To: RXTX Developers and Users > >To: rxtx at qbang.org > >Subject: [Rxtx] error getting InputStream > >Date: Fri, 04 Aug 2006 10:52:47 +0000 > > > >Hi, > > > >I have written a program in Java for Windows xp using RXTX (which is why >I > >am using this mailing list :). However, I am getting a problem. I am > >connecting to a serial port, like so: > > private CommPortIdentifier portID; > > > > private boolean openPort(String selectedPort) > > { > > boolean portFound = false; > > Enumeration portList; > > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > > while (portList.hasMoreElements()) > > { > > portID = (CommPortIdentifier) portList.nextElement(); > > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > > { > > if (portID.getName().equals(selectedPort)) > > { > > portFound = true; > > break; > > } > > } > > } > > > > return portFound; > > } > > > >and then I try and get the serial port input stream (leaving out the try > >and > >catch for the sake of space): > > > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); > >InputStream inputStream = serialPort.getInputStream(); > > > >but on the getInputStream() I get the following error message: > > > >Bad file descriptor in nativeavailable > > > >I cannot figure out where it is going wrong...anyone any ideas. A quick > >answer would be wonderful, as I am kinda under the hammer to get this >fixed > >quickly > > > >Thanks in Advance > >Keith > > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Aug 4 07:26:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: Hi Keith Can you tell us more about the physical serial port? Might it be 'vanishing?' On Fri, 4 Aug 2006, Keith Thorne wrote: > Hi, > > I know I am replying to myself a lot at the moment, but more information has > come to light (These errors are actually happening on a client machine, on > software that has worked for the past month, and only now has started to > fail, which is why I am a little slow finding things out) > > The errors I have already written about are only symptoms of an orignal > error. The original error occurs the first time I try to WRITE thte > OutputStream: > > OutputStream oStream = serialPort.getOutputStream(); > serialPort.notifyOnOutputEmpty(true); > > byte[] bs = encodeMessage(configString.toString()); > > oStream.write(bs); > oStream.flush(); > > The error occurs on oStream.write(bs); and is: > > Input/output error in writeArray > > Now writeArray is native code, so I have no idea what is going on there. Any > help would be appreciated > Thanks > Keith > > >> From: "Keith Thorne" >> Reply-To: RXTX Developers and Users >> To: rxtx at qbang.org >> Subject: Re: [Rxtx] error getting InputStream >> Date: Fri, 04 Aug 2006 11:42:21 +0000 >> >> Okay, I made a little mistake in my last message. >> >> The error is not occuring where I thought it was. Instead it is occuring >> when I do the following: >> >> byte[] readBuffer = new byte[128]; >> >> try { >> >> int numBytes = 0; >> try { >> Thread.sleep(500); >> } >> catch (InterruptedException e) >> {} >> >> while (inputStream.available() > 0) >> { >> numBytes = inputStream.read(readBuffer); >> } >> >> processReceivedData(readBuffer, numBytes); >> } >> catch (IOException e) >> { >> System.out.println(e.getMessage()); >> } >> >> So I guess the error is happening on the inputStream.read(readBuffer) >> >> again, any help is appreciated and again, thanks in advance >> Keith >> >>> From: "Keith Thorne" >>> Reply-To: RXTX Developers and Users >>> To: rxtx at qbang.org >>> Subject: [Rxtx] error getting InputStream >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 >>> >>> Hi, >>> >>> I have written a program in Java for Windows xp using RXTX (which is why >> I >>> am using this mailing list :). However, I am getting a problem. I am >>> connecting to a serial port, like so: >>> private CommPortIdentifier portID; >>> >>> private boolean openPort(String selectedPort) >>> { >>> boolean portFound = false; >>> Enumeration portList; >>> >>> portList = CommPortIdentifier.getPortIdentifiers(); >>> >>> while (portList.hasMoreElements()) >>> { >>> portID = (CommPortIdentifier) portList.nextElement(); >>> if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) >>> { >>> if (portID.getName().equals(selectedPort)) >>> { >>> portFound = true; >>> break; >>> } >>> } >>> } >>> >>> return portFound; >>> } >>> >>> and then I try and get the serial port input stream (leaving out the try >>> and >>> catch for the sake of space): >>> >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >>> InputStream inputStream = serialPort.getInputStream(); >>> >>> but on the getInputStream() I get the following error message: >>> >>> Bad file descriptor in nativeavailable >>> >>> I cannot figure out where it is going wrong...anyone any ideas. A quick >>> answer would be wonderful, as I am kinda under the hammer to get this >> fixed >>> quickly >>> >>> Thanks in Advance >>> Keith >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From hambyiii at hotmail.com Fri Aug 4 07:52:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:52:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more information >has > > come to light (These errors are actually happening on a client machine, >on > > software that has worked for the past month, and only now has started to > > fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an orignal > > error. The original error occurs the first time I try to WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); > >> } > >> catch (IOException e) > >> { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance > >> Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I am > >>> connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Fri Aug 4 08:21:07 2006 From: gergg at cox.net (Gregg Wonderly) Date: Fri, 04 Aug 2006 09:21:07 -0500 Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: <44D357D3.40303@cox.net> Keith Thorne wrote: > Okay, I made a little mistake in my last message. > > The error is not occuring where I thought it was. Instead it is occuring > when I do the following: > > byte[] readBuffer = new byte[128]; > > try { > > } > catch (IOException e) > { > System.out.println(e.getMessage()); > } > > So I guess the error is happening on the inputStream.read(readBuffer) This is one of the most frustrating things to see over and over. The exception tells you exactly which line the error is occuring on, if you will use it to see where. In Java, these days, every class should do the following. import java.util.logging.*; public class MyClass { Logger log = Logger.getLogger( getClass().getName() ); ...in some method... { String data = ...; // any extra data like addresses or // ports which might be wrong and // cause an exception. try { ... } catch( SomeException ex ) { log.log( Level.SEVERE, ex.toString()+": "+data, ex ); } } } By default, you will see all of the appropriate details of any exception logged at the WARNING or SEVERE level. You can read the javadocs about logging to get more information too. Once you do this, people can then turn up logging and get more information, or otherwise manage it with a logging configuration file or other tools such as JMX or my http://logman.dev.java.net project. Gregg Wonderly From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 09:15:24 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 09:15:24 -0600 Subject: [Rxtx] error getting InputStream Message-ID: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Keith, Please send the full stack trace of the exception, may be I can help you. On Trent's question regarding physical 'Serial Port', do you mean you have a USB(Connected to Client Machine) to 9 Pin Serial cable(Connected to H/W device)? Also please mention which java version you are using? Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Keith Thorne Sent: Friday, August 04, 2006 7:52 AM To: rxtx at qbang.org Subject: Re: [Rxtx] error getting InputStream The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more > > information >has > > come to light (These errors are actually happening on a client > > machine, >on > > software that has worked for the past month, and only now has > > started to fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an > > orignal error. The original error occurs the first time I try to > > WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); } catch (IOException > >> e) { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the > >> inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which > >>> is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I > >>> am connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out > >>> the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get > >>> this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 14:36:16 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 14:36:16 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Trent, As discussed over the phone yesterday, I am emailing you all the details of the bugs I have been experiencing. We do not use Serial Ports like most of the applications. Our application uses approx 80 -100 serial ports (attached thru Digi boxes) which are opened and closed every 20 sec to 1 minute depending upon the type of device. Some Serial ports are left opened all the time and receive event based serial calls while other devices uses polling (request and reply) to collect data. So the opening and closing of the Serial Ports is not really in a sequential order as you mentioned in our conversation yesterday. Also 2 same serial ports can never be opened at one time we have business locks to prevent that from happening. Our findings so far (of course with the help of RXTX user group): The real culprit is in the SerialImp.c file, somehow the other the Event Info Structure in the Linked List gets damaged and loses references to the original EIS structure. I believe both the problems are caused because of the corruption of EIS packet. I have noticed that the link list traversal of EIS in the following methods under SerialImp.c : 1)initialise_event_info_struct 2)finalize_event_info_struct 3)interruptEventLoop So culprit code might be in one of these methods. I am currently using JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and Fedora Core 5). I am also attaching a Test Class to replicate the problem. You need to modify the class and add your systems Serial ports into the code and execute. java TestOpenClosePort 100 It will open and close all the serial ports 100 times in there own thread. Please let me know, I will be available thru out this weekend and can help you as much as I can with testing. Regards Pawan Kharbanda CDOT-ITS 303-478-2991 (cell) 303-985-4350 (home) -------------- next part -------------- A non-text attachment was scrubbed... Name: TestOpenClosePort.java Type: application/octet-stream Size: 6139 bytes Desc: TestOpenClosePort.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dd3754d9/TestOpenClosePort-0002.obj From tjarvi at qbang.org Fri Aug 4 15:43:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 15:43:09 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: Thanks, I'll look at it tomorrow morning. I don't know when I'll find the solution but you may check email tomorrow afternoon to see if I think I found it. On Fri, 4 Aug 2006, Kharbanda, Pawan wrote: > Trent, > As discussed over the phone yesterday, I am emailing you all the > details of the bugs I have been experiencing. We do not use Serial Ports > like most of the applications. Our application uses approx 80 -100 > serial ports (attached thru Digi boxes) which are opened and closed > every 20 sec to 1 minute depending upon the type of device. Some Serial > ports are left opened all the time and receive event based serial calls > while other devices uses polling (request and reply) to collect data. So > the opening and closing of the Serial Ports is not really in a > sequential order as you mentioned in our conversation yesterday. Also 2 > same serial ports can never be opened at one time we have business locks > to prevent that from happening. > > Our findings so far (of course with the help of RXTX user group): > > The real culprit is in the SerialImp.c file, somehow the other the Event > Info Structure in the Linked List gets damaged and loses references to > the original EIS structure. I believe both the problems are caused > because of the corruption of EIS packet. I have noticed that the link > list traversal of EIS in the following methods under SerialImp.c : > > 1)initialise_event_info_struct > 2)finalize_event_info_struct > 3)interruptEventLoop > > So culprit code might be in one of these methods. I am currently using > JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and > Fedora Core 5). > > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > > Regards > Pawan Kharbanda > CDOT-ITS > 303-478-2991 (cell) > 303-985-4350 (home) > > > > > > > > > > From tjarvi at qbang.org Sat Aug 5 12:32:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:32:40 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:34:27 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:34:27 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> You need to run it few times. More the number of ports, more frequently you can reproduce. With just 2 ports it will be hard to reproduce frequently. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:33 PM To: Kharbanda, Pawan Cc: tjarvi at qbang.org; RXTX Developers and Users Subject: Re: Port Locking / JVM Crashing > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Aug 5 12:52:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:52:26 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> Message-ID: Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more frequently > you can reproduce. With just 2 ports it will be hard to reproduce > frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:57:49 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:57:49 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Trent, I have 5 ports of Digi and I can reproduce almost every time. Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX version -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:52 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more > frequently you can reproduce. With just 2 ports it will be hard to > reproduce frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need >> to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From tjarvi at qbang.org Sat Aug 5 13:06:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:06:07 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Message-ID: You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few thousand > iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:07:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:07:33 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E659@hqexchange3.dot.state.co.us> We use our own locks but I haven't turned off the RXTX locks. I am still using the RXTX locks that might be the difference. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:13:22 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:13:22 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Trent, How can you turn off the lock files? I can try using that. I never tried that, I thought you can't turn off the file locking. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From tjarvi at qbang.org Sat Aug 5 13:18:53 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:18:53 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Message-ID: Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java > -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except lockfiles > are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:31:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:31:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Trent, I am able to constantly replicate almost everytime even when I have locks disabled. Don't know the reason why you are not able to on your environment. Any suggestions??????? Cycle No (Thread ::: /dev/cuf04) ::::::: 7 Cycle No (Thread ::: /dev/cuf01) ::::::: 7 Cycle No (Thread ::: /dev/cuf02) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) Exiting Thread ::: /dev/cuf03 Cycle No (Thread ::: /dev/cuf03) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent Port /dev/cuf01 is Opened 0x01 Sent Port /dev/cub01 is Opened 0x01 Sent Port /dev/cuf01 is Closed Port /dev/cuf02 is Closed Port /dev/cuf03 is Closed Port /dev/cuf04 is Closed Port /dev/cub01 is Closed Exiting Thread ::: /dev/cuf03 Exiting Thread ::: /dev/cuf02 Cycle No (Thread ::: /dev/cuf03) ::::::: 8 Cycle No (Thread ::: /dev/cuf02) ::::::: 8 Exiting Thread ::: /dev/cuf04 Exiting Thread ::: /dev/cuf01 Cycle No (Thread ::: /dev/cuf01) ::::::: 8 Cycle No (Thread ::: /dev/cuf04) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened 0x01 Sent Port /dev/cuf01 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 # # An error report file with more information is saved as hs_err_pid21386.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:19 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) > 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux > java -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except > lockfiles are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code >>>> and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm >>> running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From tjarvi at qbang.org Sat Aug 5 14:14:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 14:14:49 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: I'd stick a couple $15 dual port serial boards in the machine to see if its kernel driver specific. I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more problematic. They do not get the same number of eyes looking for problems. You could try putting #undef TIOCSERGETLSR #undef TIOCGICOUNT in the very top of SerialImp.h or one or the other to flip bits of code off and on. The kernel here is 2.6.11.4-20a-smp from Suse. glibc is 2.3.4-23.4 from Suse the jre is 1.5.0_06-b05 from Sun. The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC ram. You should be able to reproduce what I'm seeing then go from there. I don't think I'm going to see this problem without having the same cornercase hardware you have. Maybe we can work that out off the list but I doubt I'm going to find it in rxtx at this point. I have seen problems in the past were kernel structs don't match user space struct and bad things happen but I was including a kernel struct to get functionality that had not made its way into user space at the time. The only thing I may be missing is that when I write 0x01 out the port, nothing comes back. That was not specified but you could easily disconnect anything connected to the ports to see if that changes anything. rxtx is far from bug free but I do not see anything yet. On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I am able to constantly replicate almost everytime even when I have > locks disabled. Don't know the reason why you are not able to on your > environment. Any suggestions??????? > > > Cycle No (Thread ::: /dev/cuf04) ::::::: 7 > Cycle No (Thread ::: /dev/cuf01) ::::::: 7 > Cycle No (Thread ::: /dev/cuf02) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > Exiting Thread ::: /dev/cuf03 > Cycle No (Thread ::: /dev/cuf03) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > Port /dev/cuf01 is Opened > 0x01 Sent > Port /dev/cub01 is Opened > 0x01 Sent > Port /dev/cuf01 is Closed > Port /dev/cuf02 is Closed > Port /dev/cuf03 is Closed > Port /dev/cuf04 is Closed > Port /dev/cub01 is Closed > Exiting Thread ::: /dev/cuf03 > Exiting Thread ::: /dev/cuf02 > Cycle No (Thread ::: /dev/cuf03) ::::::: 8 > Cycle No (Thread ::: /dev/cuf02) ::::::: 8 > Exiting Thread ::: /dev/cuf04 > Exiting Thread ::: /dev/cuf01 > Cycle No (Thread ::: /dev/cuf01) ::::::: 8 > Cycle No (Thread ::: /dev/cuf04) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > 0x01 Sent > Port /dev/cuf01 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 > # > # An error report file with more information is saved as > hs_err_pid21386.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > Aborted > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:19 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Lockfiles are a compile time option. I've turned them on now, corrected > a mistake resulting in only 3 ports being used and now have it going > through a few hundred iterations again without a crash. > > To disable lockfiles.. > > ./configure --disable-lockfiles && make install > > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > Port /dev/ttyS5 is Closed > Exiting Thread ::: /dev/ttyS1 > Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: > /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting > Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port > /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS1 is Closed > Port /dev/ttyS4 is Closed > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > > > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, How can you turn off the lock files? I can try using that. I >> never tried that, I thought you can't turn off the file locking. >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:06 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> You may try 4 ports instead of 5 to make sure thats not the issue. >> >> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >> 2.6.11.4-20a-smp >> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >> java -version java version "1.5.0_06" >> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >> >> I'm using rxtx 2.1-7 (final) with default configuration except >> lockfiles are disabled. I gathered that you are doing your own > resource locking. >> >> ... >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> ... >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>> version >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:52 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> Whats a few times? I've got 4 ports here and have run it a few >>> thousand iterations. >>> >>> Is that true for you if you run it with just four of your DIGI ports? >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> You need to run it few times. More the number of ports, more >>>> frequently you can reproduce. With just 2 ports it will be hard to >>>> reproduce frequently. >>>> >>>> ~pk >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:33 PM >>>> To: Kharbanda, Pawan >>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>> Subject: Re: Port Locking / JVM Crashing >>>> >>>>> I am also attaching a Test Class to replicate the problem. You need > >>>>> to >>>> >>>>> modify the class and add your systems Serial ports into the code >>>>> and >> >>>>> execute. >>>>> >>>>> java TestOpenClosePort 100 >>>>> >>>>> It will open and close all the serial ports 100 times in there own >>>>> thread. >>>>> >>>>> Please let me know, I will be available thru out this weekend and >>>>> can >>> >>>>> help you as much as I can with testing. >>>>> >>>> >>>> How reproducable is the problem with the above testcase? I'm >>>> running >> >>>> 100's of iterations without reproducing the problem. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> >>> >> > From rtlane01 at comcast.net Tue Aug 1 19:22:03 2006 From: rtlane01 at comcast.net (Randall T. Lane) Date: Tue, 01 Aug 2006 21:22:03 -0400 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] Message-ID: <44CFFE3B.90001@comcast.net> Rxtx Community: Please see my e-mail to Trent. Does anyone have any experience using rxtx to successfully communicate with hardware via USB? Thanks. Randy Lane -------------- next part -------------- An embedded message was scrubbed... From: Trent Jarvi Subject: Re: Help with RxTx for USB Communication Date: Tue, 1 Aug 2006 18:49:13 -0600 (MDT) Size: 3300 Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060801/9bbbc255/HelpwithRxTxforUSBCommunication-0002.mht From naranjo.manuel at gmail.com Sun Aug 6 16:59:28 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Sun, 06 Aug 2006 19:59:28 -0300 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44CFFE3B.90001@comcast.net> References: <44CFFE3B.90001@comcast.net> Message-ID: <44D67450.8010100@gmail.com> Randy: I have been able to communicate to AIRcable USB Bluetooth Dongle, with success. I'm not sure which are the options that you have to send to RXTX library, but you can indeed. Check that you do not have the port avaible for much long. I have heard of a problem with WinXP that it simply turn off virtual ports when they are too much long with out activity. If you want I can send you my code, because it is avaible under GPL, the new release is not avaible at AIRcable web site, but it should in short time. Regards, Manu > Rxtx Community: > > Please see my e-mail to Trent. Does anyone have any experience using > rxtx to successfully communicate with hardware via USB? > > Thanks. > > Randy Lane > > ------------------------------------------------------------------------ > > Asunto: > Re: Help with RxTx for USB Communication > De: > Trent Jarvi > Fecha: > Tue, 1 Aug 2006 18:49:13 -0600 (MDT) > Para: > "Randall T. Lane" > > Para: > "Randall T. Lane" > CC: > taj at www.linux.org.uk > > > On Tue, 1 Aug 2006, Randall T. Lane wrote: > >> Trent, >> >> I am working on a project written in Java (1.5) and need to >> communicate to an external device via a USB port. >> >> I have downloaded rxtx-2.1-7-bins-r2.zip from www.rxtx.org and setup >> a Java test project to learn how to use rxtx. I am able to list the >> serial ports available, however rxtx does not recognize my USB port. >> I am running on Windows XP. Here is some output from my test project >> ... >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> COM1 - Serial >> COM3 - Serial >> LPT1 - Parallel >> >> I would appreciate any help you could provide in getting rxtx to >> allow me to communicate via my USB port. >> >> Here is my code, if that would help. >> >> public static void main(String[] args) { >> listPorts(); >> // The listPorts() and getPortTypeName() methods are used for >> port identification. >> static void listPorts() >> { >> Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); >> while ( portEnum.hasMoreElements() ) >> { >> CommPortIdentifier portIdentifier = (CommPortIdentifier) >> portEnum.nextElement(); >> System.out.println(portIdentifier.getName() + " - " + >> getPortTypeName(portIdentifier.getPortType()) ); >> } } >> static String getPortTypeName ( int portType ) >> { >> switch ( portType ) >> { >> case CommPortIdentifier.PORT_I2C: >> return "I2C"; >> case CommPortIdentifier.PORT_PARALLEL: >> return "Parallel"; >> case CommPortIdentifier.PORT_RAW: >> return "Raw"; >> case CommPortIdentifier.PORT_RS485: >> return "RS485"; >> case CommPortIdentifier.PORT_SERIAL: >> return "Serial"; >> default: >> return "unknown type"; >> } >> } >> >> Thanks. >> >> Randy Lane >> > > Hi Randy > > The rxtx mail list is a better place to ask as there are more eyes. > I'm swamped with work. > > Be sure to look to see that your serial port dongle shows up as a > serial port in device manager and no other applications have it open. > USB serial dongles do work with rxtx. Some are less complete than > others. > > -- > Trent Jarvi > tjarvi at qbang.org > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From eddythejekyll at gmail.com Sun Aug 6 23:31:45 2006 From: eddythejekyll at gmail.com (Ed) Date: Sun, 6 Aug 2006 23:31:45 -0600 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? Message-ID: I have written a simple client server (RMI) application without using RxTx where the server controls a parallel port simply by addressing the port and banging the bits in order to drive a relay. It also reads the port's. I am doing this by making Runtime.exec calls to a binary that actually does the parallel port bit banging and reading. However, I'd like to use RxTx so it is a pure Java application, and I've so far installed and figured out how to discover the ports, but I'm having trouble finding good examples or some howto type documentation for this. I did find the two examples on the Wiki: one for serial IO and the other to discover the ports on a system. As I said, I have so far installed RxTx and gotten it to compile and run and I can identify the ports. When I run the server I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found Ports! Found port COM1 Found port COM3 Found port LPT1 LPT1 Not Currently owned EASSwitch Server starting. EASSwitch is bound. Server Ready. So it looks like thing are installed and working, but I feel all dressed up and no idea how to proceed. Basically, I just want to be able to toggle the data lines on the parallel port and read them. Very simple. No parallel printer type usage. Are there any examples I can work off of? If so, please advise. Thank you. -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060806/c7e39898/attachment-0002.html From hambyiii at hotmail.com Sun Aug 6 23:53:54 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Mon, 07 Aug 2006 05:53:54 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Message-ID: Hi, sorry I took the weekend to reply, but I was away for the last couple of days. Unfortunately I cannot send the full stack trace yet. The problem is not, unfortunately, happening on my computer, but on a clients computer, which I will go and visit today. I will hopefully be able to get a stack trace then. As to the physical connection, tt is indeed a USB from the computer, connected to a 9 pin serial device that connects to the hard-ware. My java version is 1.5.06 >From: "Kharbanda, Pawan" >Reply-To: RXTX Developers and Users >To: "RXTX Developers and Users" >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 09:15:24 -0600 > >Keith, > Please send the full stack trace of the exception, may be I can help >you. On Trent's question regarding physical 'Serial Port', do you mean >you have a USB(Connected to Client Machine) to 9 Pin Serial >cable(Connected to H/W device)? > >Also please mention which java version you are using? > >Thanks >Pawan Kharbanda > > >-----Original Message----- >From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >Of Keith Thorne >Sent: Friday, August 04, 2006 7:52 AM >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream > >The physical serial port is actually a USB connection that is then >changed to a "virtual serial port", so I can use the serial port >protocols to connect to it. The other end of the connection is a >hardware device that is constantly turned on. I am not sure about the >port 'vanishing'...we have another piece of software that came with the >hardware device, which we can test the device (and with it the virtual >serial port) with. This has no problem connecting to the serial port or >writing to/reading from the device. >It is only when my software is run, that the error occurs. Like I have >said, my software (using rxtx) is connecting to the serial port >successfully, but it is when I try and write to the serial port that I >get the error. > >Although to be truthful, I am not absolutely certain if the error is >happening on the oStream.write() or the oStream.flush(). I only think it >is the write(), because that is where the writeArray() function is >called. > >thanks >Keith > > > >From: Trent Jarvi > >Reply-To: RXTX Developers and Users > >To: RXTX Developers and Users > >Subject: Re: [Rxtx] error getting InputStream > >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > > > > >Hi Keith > > > >Can you tell us more about the physical serial port? Might it be > >'vanishing?' > > > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > > > Hi, > > > > > > I know I am replying to myself a lot at the moment, but more > > > information > >has > > > come to light (These errors are actually happening on a client > > > machine, > >on > > > software that has worked for the past month, and only now has > > > started to fail, which is why I am a little slow finding things out) > > > > > > The errors I have already written about are only symptoms of an > > > orignal error. The original error occurs the first time I try to > > > WRITE thte > > > OutputStream: > > > > > > OutputStream oStream = serialPort.getOutputStream(); > > > serialPort.notifyOnOutputEmpty(true); > > > > > > byte[] bs = encodeMessage(configString.toString()); > > > > > > oStream.write(bs); > > > oStream.flush(); > > > > > > The error occurs on oStream.write(bs); and is: > > > > > > Input/output error in writeArray > > > > > > Now writeArray is native code, so I have no idea what is going on >there. > >Any > > > help would be appreciated > > > Thanks > > > Keith > > > > > > > > >> From: "Keith Thorne" > > >> Reply-To: RXTX Developers and Users > > >> To: rxtx at qbang.org > > >> Subject: Re: [Rxtx] error getting InputStream > > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > > >> > > >> Okay, I made a little mistake in my last message. > > >> > > >> The error is not occuring where I thought it was. Instead it is > >occuring > > >> when I do the following: > > >> > > >> byte[] readBuffer = new byte[128]; > > >> > > >> try { > > >> > > >> int numBytes = 0; > > >> try { > > >> Thread.sleep(500); > > >> } > > >> catch (InterruptedException e) > > >> {} > > >> > > >> while (inputStream.available() > 0) > > >> { > > >> numBytes = inputStream.read(readBuffer); > > >> } > > >> > > >> processReceivedData(readBuffer, numBytes); } catch (IOException > > >> e) { > > >> System.out.println(e.getMessage()); > > >> } > > >> > > >> So I guess the error is happening on the > > >> inputStream.read(readBuffer) > > >> > > >> again, any help is appreciated and again, thanks in advance Keith > > >> > > >>> From: "Keith Thorne" > > >>> Reply-To: RXTX Developers and Users > > >>> To: rxtx at qbang.org > > >>> Subject: [Rxtx] error getting InputStream > > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > > >>> > > >>> Hi, > > >>> > > >>> I have written a program in Java for Windows xp using RXTX (which > > >>> is > >why > > >> I > > >>> am using this mailing list :). However, I am getting a problem. I > > >>> am connecting to a serial port, like so: > > >>> private CommPortIdentifier portID; > > >>> > > >>> private boolean openPort(String selectedPort) > > >>> { > > >>> boolean portFound = false; > > >>> Enumeration portList; > > >>> > > >>> portList = CommPortIdentifier.getPortIdentifiers(); > > >>> > > >>> while (portList.hasMoreElements()) > > >>> { > > >>> portID = (CommPortIdentifier) portList.nextElement(); > > >>> if (portID.getPortType() == > >CommPortIdentifier.PORT_SERIAL) > > >>> { > > >>> if (portID.getName().equals(selectedPort)) > > >>> { > > >>> portFound = true; > > >>> break; > > >>> } > > >>> } > > >>> } > > >>> > > >>> return portFound; > > >>> } > > >>> > > >>> and then I try and get the serial port input stream (leaving out > > >>> the > >try > > >>> and > > >>> catch for the sake of space): > > >>> > > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", > >2000); > > >>> InputStream inputStream = serialPort.getInputStream(); > > >>> > > >>> but on the getInputStream() I get the following error message: > > >>> > > >>> Bad file descriptor in nativeavailable > > >>> > > >>> I cannot figure out where it is going wrong...anyone any ideas. A > >quick > > >>> answer would be wonderful, as I am kinda under the hammer to get > > >>> this > > >> fixed > > >>> quickly > > >>> > > >>> Thanks in Advance > > >>> Keith > > >>> > > >>> > > >>> _______________________________________________ > > >>> Rxtx mailing list > > >>> Rxtx at qbang.org > > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > > >> > > >> > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Aug 7 06:22:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:22:03 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: Hmm.. I left the test running went I went home Saturday. It looks like something did show up after ~30k iterations. I'll look at it more in my free time. Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS5 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 29417 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 29417 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 29417 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00002aab14c2ec63, pid=20573, tid=1095125344 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6c63] initialise_event_info_struct+0x63 # [thread 1087756640 also had an error] Port /dev/ttyS5 is Opened 0x01 Sent [thread 1089861984 also had an error] Port /dev/ttyS4 is Opened 0x01 Sent [thread 1090914656 also had an error] # An error report file with more information is saved as [thread 1090914656 also had an error] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted On Sat, 5 Aug 2006, Trent Jarvi wrote: > > I'd stick a couple $15 dual port serial boards in the machine to see if its > kernel driver specific. > > I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more > problematic. They do not get the same number of eyes looking for problems. > > You could try putting > > #undef TIOCSERGETLSR > #undef TIOCGICOUNT > > in the very top of SerialImp.h or one or the other to flip bits of code off > and on. > > The kernel here is 2.6.11.4-20a-smp from Suse. > glibc is 2.3.4-23.4 from Suse > the jre is 1.5.0_06-b05 from Sun. > > The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC > ram. > > You should be able to reproduce what I'm seeing then go from there. I don't > think I'm going to see this problem without having the same cornercase > hardware you have. Maybe we can work that out off the list but I doubt I'm > going to find it in rxtx at this point. > > I have seen problems in the past were kernel structs don't match user space > struct and bad things happen but I was including a kernel struct to get > functionality that had not made its way into user space at the time. > > The only thing I may be missing is that when I write 0x01 out the port, > nothing comes back. That was not specified but you could easily disconnect > anything connected to the ports to see if that changes anything. > > rxtx is far from bug free but I do not see anything yet. > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, >> I am able to constantly replicate almost everytime even when I have >> locks disabled. Don't know the reason why you are not able to on your >> environment. Any suggestions??????? >> >> >> Cycle No (Thread ::: /dev/cuf04) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> Exiting Thread ::: /dev/cuf03 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> Port /dev/cuf01 is Opened >> 0x01 Sent >> Port /dev/cub01 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Closed >> Port /dev/cuf02 is Closed >> Port /dev/cuf03 is Closed >> Port /dev/cuf04 is Closed >> Port /dev/cub01 is Closed >> Exiting Thread ::: /dev/cuf03 >> Exiting Thread ::: /dev/cuf02 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 8 >> Exiting Thread ::: /dev/cuf04 >> Exiting Thread ::: /dev/cuf01 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf04) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 >> # >> # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 >> # >> # An error report file with more information is saved as >> hs_err_pid21386.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> Aborted >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:19 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Lockfiles are a compile time option. I've turned them on now, corrected >> a mistake resulting in only 3 ports being used and now have it going >> through a few hundred iterations again without a crash. >> >> To disable lockfiles.. >> >> ./configure --disable-lockfiles && make install >> >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> Port /dev/ttyS5 is Closed >> Exiting Thread ::: /dev/ttyS1 >> Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: >> /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting >> Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port >> /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> >> >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, How can you turn off the lock files? I can try using that. I >>> never tried that, I thought you can't turn off the file locking. >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 1:06 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> You may try 4 ports instead of 5 to make sure thats not the issue. >>> >>> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >>> 2.6.11.4-20a-smp >>> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >>> java -version java version "1.5.0_06" >>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >>> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >>> >>> I'm using rxtx 2.1-7 (final) with default configuration except >>> lockfiles are disabled. I gathered that you are doing your own >> resource locking. >>> >>> ... >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> Port /dev/ttyS4 is Closed >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> ... >>> >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>>> version >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:52 PM >>>> To: Kharbanda, Pawan >>>> Cc: Trent Jarvi; RXTX Developers and Users >>>> Subject: RE: Port Locking / JVM Crashing >>>> >>>> >>>> Whats a few times? I've got 4 ports here and have run it a few >>>> thousand iterations. >>>> >>>> Is that true for you if you run it with just four of your DIGI ports? >>>> >>>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>>> >>>>> You need to run it few times. More the number of ports, more >>>>> frequently you can reproduce. With just 2 ports it will be hard to >>>>> reproduce frequently. >>>>> >>>>> ~pk >>>>> >>>>> -----Original Message----- >>>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>>> Sent: Saturday, August 05, 2006 12:33 PM >>>>> To: Kharbanda, Pawan >>>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>>> Subject: Re: Port Locking / JVM Crashing >>>>> >>>>>> I am also attaching a Test Class to replicate the problem. You need >> >>>>>> to >>>>> >>>>>> modify the class and add your systems Serial ports into the code >>>>>> and >>> >>>>>> execute. >>>>>> >>>>>> java TestOpenClosePort 100 >>>>>> >>>>>> It will open and close all the serial ports 100 times in there own >>>>>> thread. >>>>>> >>>>>> Please let me know, I will be available thru out this weekend and >>>>>> can >>>> >>>>>> help you as much as I can with testing. >>>>>> >>>>> >>>>> How reproducable is the problem with the above testcase? I'm >>>>> running >>> >>>>> 100's of iterations without reproducing the problem. >>>>> >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> >>>> >>> >> > From iinjlv01 at gmail.com Mon Aug 7 06:22:07 2006 From: iinjlv01 at gmail.com (J LV) Date: Mon, 7 Aug 2006 14:22:07 +0200 Subject: [Rxtx] Data lost or Slow sampling Message-ID: Hello I am using RXTX to comm with a motion controller using Serial Port and i can write the commands using SerialPort or RXTXPort without problems, but when i try write and read at high sampling rate, for example to know the position and speed at every moment of a trajectory, i obtain a very irregular response times. I am using the most simple algorimth: 1-Write the command "is trajectory finished?" and wait for SerialPortEvent.DATA_AVAILABLE 2-Read the InputStreamReader of serial port while not empty 3-If trajectory finished then stop program, else, continue 4-Read actual time using System.currentTimeMillis() (t0) 5-Write the command "give me position" and wait for SerialPortEvent.DATA_AVAILABLE 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) 7-Read the InputStreamReader of serial port while not empty 8-Save position in Vector or ArrayList and repeat from 1 I don't know if the problem is the RXTX, my program or the motion controller hardware but i have response times from 16 millis to 78 millis at 19200 bauds!. I am using SwingWorked to threading SerialPort reading/writing process. Any idea or similar data leak problem? Thanks for RXTX project and sorry for my badde english! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/909a4cb3/attachment-0002.html From tjarvi at qbang.org Mon Aug 7 06:50:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:50:10 -0600 (MDT) Subject: [Rxtx] Data lost or Slow sampling In-Reply-To: References: Message-ID: On Mon, 7 Aug 2006, J LV wrote: > Hello > > I am using RXTX to comm with a motion controller using Serial Port and i can > write the commands using SerialPort or RXTXPort without problems, but when i > try write and read at high sampling rate, for example to know the position > and speed at every moment of a trajectory, i obtain a very irregular > response times. I am using the most simple algorimth: > 1-Write the command "is trajectory finished?" and wait for > SerialPortEvent.DATA_AVAILABLE > 2-Read the InputStreamReader of serial port while not empty > 3-If trajectory finished then stop program, else, continue > 4-Read actual time using System.currentTimeMillis() (t0) > 5-Write the command "give me position" and wait for > SerialPortEvent.DATA_AVAILABLE > 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) > 7-Read the InputStreamReader of serial port while not empty > 8-Save position in Vector or ArrayList and repeat from 1 > > > I don't know if the problem is the RXTX, my program or the motion controller > hardware but i have response times from 16 millis to 78 millis at 19200 > bauds!. I am using SwingWorked to threading SerialPort reading/writing > process. > > Any idea or similar data leak problem? > > Thanks for RXTX project and sorry for my badde english! > This can be platform dependant. What you may do for a starting point is use a loopback connection and time the same thing at 19200. Write the date, wait for data available, read the data. I would expect from write to data available to take around 10 ms from past experiences. You can experiment with turning on and off buffering in the port settings of the OS, if the OS supports more realtime like interrupts, that could help. You have a java schedual and the kernel schedual. Serial interrupts traditionally have very high priority but modern OSs tend to realize thats not good for GUIs, ... and delay responding to the interrupts. You should be able to have usec response times in a realtime OS. Windows and Linux are not typically setup as realtime OSs. For comparison, the last time I looked which was about 5 years ago, windows NT4 came back with data available in 8 ms and Linux came back in 10 ms. I would be interested in seeing what you get today. -- Trent Jarvi tjarvi at qbang.org From gergg at cox.net Mon Aug 7 09:21:56 2006 From: gergg at cox.net (Gregg Wonderly) Date: Mon, 07 Aug 2006 10:21:56 -0500 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? In-Reply-To: References: Message-ID: <44D75A94.9030205@cox.net> Ed wrote: > Are there any examples I can work off of? If so, please advise. Just read the javax.comm javadocs. You need to take the parallel port and write values to it based on which bits of which lines you want on and off. Gregg Wonderly From pete.flugstad at gmail.com Mon Aug 7 09:36:19 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 7 Aug 2006 10:36:19 -0500 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44D67450.8010100@gmail.com> References: <44CFFE3B.90001@comcast.net> <44D67450.8010100@gmail.com> Message-ID: <84d4a6d50608070836v97e9a29q96e98441ea903ac7@mail.gmail.com> FYI, I'm talking to a USB<->Serial dongle just fine under Windows XP Pro. I did have to install a driver for the thing - Windows XP by default, did not recognize it. Once installed, it just showed up as another COM port, and I've been pushing data over it with no problems. Pete From savagobr at yahoo.com Mon Aug 7 10:13:06 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Mon, 7 Aug 2006 09:13:06 -0700 (PDT) Subject: [Rxtx] Port Locking / JVM Crashing: 2 ports (Serial + usb) Message-ID: <20060807161306.9648.qmail@web53803.mail.yahoo.com> Trent This is curious, since I did reproduced the aformentioned bug using only 2 ports: /dev/ttyS0 and /dev/ttyUSB0. It only need to run for 500 times: $ java -cp . TestOpenClosePort 500 500 Port /dev/ttyS0 is Closed Excpetion ::: Thread ::: /dev/ttyUSB0null Exiting Thread ::: /dev/ttyUSB0 Cycle No (Thread ::: /dev/ttyUSB0) ::::::: 227 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 184 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x203d2044, pid=32368, tid=2986859424 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing) # Problematic frame: # C 0x203d2044 # # An error report file with more information is saved as /tmp/hs_err_pid32368.log # # If you would like to submit a bug report, please visit: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Best regards Savago ps: Test environment $ uname -a Linux localhost.localdomain 2.6.15-1.2054_FC5 #1 Tue Mar 14 15:48:33 EST 2006 i686 i686 i386 GNU/Linux $ java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) $gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.1 20060525 (Red Hat 4.1.1-1) --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/c6ca8094/attachment-0002.html From Pawan.Kharbanda at dot.state.co.us Mon Aug 7 17:23:25 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 7 Aug 2006 17:23:25 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Trent, I think I got the problem fixed after some code changes in the C (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the staging environment (with 10 devices) with real time data and haven't seen a JVM lock/ Port locking since last night. I am going to do further stress testing and will send all my code changes and my findings in next few days. I believe the problem was causing due to the digi drivers and how the Linux kernel talked to it, so after making some code changes and synchronization fixes, I got it to work. I am keeping my fingers crossed :) Thanks for all your help. You have been a great help. Will keep you posted. Cheers ~pk PS : We are going to test my new RXTX changes with the 2.6 Red Hat kernel (currently using 2.4.21-37.ELsmp) too. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 5:08 PM To: Kharbanda, Pawan Subject: RE: Port Locking / JVM Crashing Hi Pawan As mentioned I did reproduce the error but after several hours of cycles. I'm looking at RXTXPort.java and thinking about what may be happening. The error is in the C layer but it may be preventable in the java code. lets say two closes are overlapping or an operation is trying to happen while another port is closing. The structure may be out of sync by the time the code using the structure in another thread gets to the event info struct. So I'm wondering if synchronization in RXTXPort() and close() may help you. A second thing that may help is you can put printf("got here\n"); in each of the lines in initialize event info struct to verify that the problem is in walking the linked list. Thats my suspicion. So a properly timed close() while calling the constructor may be catching rxtx off guard. You can synchronize to test that and it may do away with the problem. From tjarvi at qbang.org Mon Aug 7 18:01:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 18:01:54 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Message-ID: Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do further > stress testing and will send all my code changes and my findings in next > few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to happen > while another port is closing. The structure may be out of sync by the > time the code using the structure in another thread gets to the event > info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may do > away with the problem. > From Pawan.Kharbanda at dot.state.co.us Tue Aug 8 13:49:14 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 8 Aug 2006 13:49:14 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Trent, I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and have absolutely no problem with JVM crashing or Port Locking even after 10000 operations (now I am trying 100,000 :). This is all with the original RXTX 2.1.7 (final) api's without any of my fixes that I have been trying for last 2-3 weeks. I will suggest that we update the INSTALL or Readme file accompnying the RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: 82000685_G 02/02/2006). This should helped everybody using the RXTX API's with RedHat Linux atleast. Regards Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 6:02 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do > further stress testing and will send all my code changes and my > findings in next few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers > crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to > happen while another port is closing. The structure may be out of > sync by the time the code using the structure in another thread gets > to the event info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may > do away with the problem. > From jimo at earthlink.net Wed Aug 9 21:21:00 2006 From: jimo at earthlink.net (Jim Owen) Date: Wed, 9 Aug 2006 20:21:00 -0700 Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat Message-ID: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Hi All, I've run into some difficulties with rxtx that have me baffled and need some help. I have an application that has used earlier versions of rxtx successfully and on a variety of platforms. We recently needed to deploy this application into an environment where we could not utilize lock files. I pulled down the 2.0.7 pre1 source distribution and executed configure with --disable-lockfiles. I then executed make and make install. When I execute the program, as root, I get the following error: ************************************************************************ Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) # Problematic frame: # C 0x00001004 # # An error report file with more information is saved as hs_err_pid20151.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # **************************************************************************** If I execute as a normal user, I get no errors, but no ports listed: (Using an earlier version, I get a serial and parallel port listed.) **************************************************************************** [jim at linuxDev ingenicoApp]$ java VerifyCommBuild Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Some ports appear to have been found, let's try to enumerate them. Complete. **************************************************************************** When I built rxtx, there was a warning given of the following: **************************************************************************** conftest.c: In function 'main': conftest.c:6: warning: incompatible implicit declaration of built-in function 'printf' conftest.c:7: warning: incompatible implicit declaration of built-in function 'exit' WARNING: Kernel include files do not match the current kernel **************************************************************************** uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux JAVA_HOME=/usr/java/j2sdk1.4.2_11 javax.comm.properties: Driver=gnu.io.RXTXCommDriver Here's the code for VerifyCommBuild.java that I'm using to test: **************************************************************************** import javax.comm.*; import java.util.Enumeration; /** * A quick app to check that the javax.comm (Serial) Communications extension has been properly * installed and configured on this machine. * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. */ public class VerifyCommBuild { public static void main(String args[]) { Enumeration ports; System.out.println("Verifying Comm Build Environment"); try { ports = CommPortIdentifier.getPortIdentifiers(); if (ports == null) { System.out.println("No comm ports found!"); return; } System.out.println("Some ports appear to have been found, let's try to enumerate them."); while (ports.hasMoreElements()) { System.out.println("Here is a port [" + ((CommPortIdentifier)ports.nextElement()).getName() + "]"); } } catch (Exception e) { System.out.println("Failed to enumerate ports [" + e.getMessage() + "]"); e.printStackTrace(); } System.out.println("Complete."); } } **************************************************************************** Any suggestions as to what I'm missing? Thanks, Jim Owen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060809/92503a81/attachment-0002.html From tjarvi at qbang.org Thu Aug 10 05:39:36 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 05:39:36 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Message-ID: On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even after > 10000 operations (now I am trying 100,000 :). This is all with the > original RXTX 2.1.7 (final) api's without any of my fixes that I have > been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying the > RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp > and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From oliver.archner at bayceer.uni-bayreuth.de Wed Aug 9 06:13:36 2006 From: oliver.archner at bayceer.uni-bayreuth.de (Oliver Archner) Date: Wed, 09 Aug 2006 14:13:36 +0200 Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() Message-ID: <44D9D170.5020806@bayceer.uni-bayreuth.de> Dear Users, i would like to send a byte to a parallel device. The following piece of code works well but throws an IOException in LPRPort$ParallelOutputStream.write() saying that everything is ok ?! Oliver import java.io.*; import gnu.io.*; public class Test { public static void main(String[] args) { RXTXCommDriver TxPort = new RXTXCommDriver(); ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", CommPortIdentifier.PORT_PARALLEL); OutputStream oStream = null; try { oStream = pPort.getOutputStream(); oStream.write((byte)0x51); } catch (IOException e) { e.printStackTrace(); } finally { try { if (oStream != null) oStream.close(); } catch (IOException e) { e.printStackTrace(); } } } } Output: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Der Vorgang wurde erfolgreich beendet. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at Test.main(Test.java:12) From tjarvi at qbang.org Thu Aug 10 18:12:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 18:12:27 -0600 (MDT) Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() In-Reply-To: <44D9D170.5020806@bayceer.uni-bayreuth.de> References: <44D9D170.5020806@bayceer.uni-bayreuth.de> Message-ID: On Wed, 9 Aug 2006, Oliver Archner wrote: > Dear Users, > > i would like to send a byte to a parallel device. > The following piece of code works well but throws an IOException in > LPRPort$ParallelOutputStream.write() saying that everything is ok ?! > > Oliver > > > import java.io.*; > import gnu.io.*; > > public class Test { > > public static void main(String[] args) { > RXTXCommDriver TxPort = new RXTXCommDriver(); > ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", > CommPortIdentifier.PORT_PARALLEL); > OutputStream oStream = null; > try { > oStream = pPort.getOutputStream(); > oStream.write((byte)0x51); > } catch (IOException e) { > e.printStackTrace(); > } finally { > try { > if (oStream != null) oStream.close(); > } catch (IOException e) { > e.printStackTrace(); > > } > } > > } > } > > Output: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Der Vorgang wurde erfolgreich beendet. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at Test.main(Test.java:12) WriteFile is returning a negative value or 0. I do not know what that exception is saying but it should be an IO Exception. The native code in question is line 405 in ParallelImp.c. If you find the documentation pointing out how the code is wrong, we can fix it. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 08:12:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 09:12:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question Message-ID: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Hello, I'm trying to send data over a serial port using the RXTX libraries. I've got the binaries for Windows XP from qbang.org. On the receiving side, I'm using event notification (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial Ports InputStream. Similarly on the transmist side, I use SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. First question: does this make sense? The code was largely adopted from an existing Windows C++ program and that's more or less how it operated (overlapped io using ReadFile, WriteFile, GetOverlappedResult, Events, etc). Second question: in a small standalone test program I wrote, everything seems to work just fine - whenever SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good chunk of data available (I explicitly set the in/out buffers to 1024 bytes) to read. However, when I pull my "library" into a much larger environment (OSGI framework based, but same JVM/OS/etc), whenever SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a byte or two available. Needless to say, this really kills performance. Everything appears to still operate properly, just really, really slowly. So, has anyone seen this problem before? I haven't dived into the details of RXTX library, and I'm wondering what the mechanism is here? How does the RXTX thread determine when to issue the SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to tweak in RXTX or the JVM to get this to operate more like the small test program? Seems like I want RXTX to call me back _less_ often. Thanks, Pete From tjarvi at qbang.org Fri Aug 11 09:55:23 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 09:55:23 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Hello, > > I'm trying to send data over a serial port using the RXTX > libraries. I've got the binaries for Windows XP from qbang.org. > > On the receiving side, I'm using event notification > (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial > Ports InputStream. Similarly on the transmist side, I use > SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. > > First question: does this make sense? The code was largely adopted > from an existing Windows C++ program and that's more or less how it > operated (overlapped io using ReadFile, WriteFile, > GetOverlappedResult, Events, etc). > > Second question: in a small standalone test program I wrote, > everything seems to work just fine - whenever > SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good > chunk of data available (I explicitly set the in/out buffers to 1024 > bytes) to read. > > However, when I pull my "library" into a much larger environment > (OSGI framework based, but same JVM/OS/etc), whenever > SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a > byte or two available. Needless to say, this really kills > performance. Everything appears to still operate properly, just > really, really slowly. > > So, has anyone seen this problem before? I haven't dived into the > details of RXTX library, and I'm wondering what the mechanism is here? > How does the RXTX thread determine when to issue the > SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to > tweak in RXTX or the JVM to get this to operate more like the small > test program? > Seems like I want RXTX to call me back _less_ often. > Hi Pete RXTX is doing overlapped IO in termios.c. In this file we map the windows functionality to termios (mostly POSIX). From there, we just talk termios to all platforms. What I guess is happening is the eventloop is waiting a specified amount of time. As you application uses more cpu cycles, you observe the difference in behavior. You could go into the C code and change this after looking at the eventLoop() code in serialImp.c and following that to the serial_ioctl() and serial_select() in termios.c Another option is to go into RXTXPort.java and put a sleep in the sendEvent() code. This way you would not have to recompile the native code (not very easy at this point). -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 13:27:36 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:27:36 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > Another option is to go into RXTXPort.java and put a sleep in the > sendEvent() code. This way you would not have to recompile the native > code (not very easy at this point). Are the instructions in the INSTALL file still valid? If so, it wasn't very hard to build it (I already had MinGW installed). Everything seemed to build just fine. Haven't tried to install/use it yet, but it wasn't a big deal (assuming those instructions were correct. Thanks, Pete From pete.flugstad at gmail.com Fri Aug 11 13:42:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:42:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, but there doesn't appear to be a way to select that via RXTX (which appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control is selected). Is there a way I'm not seeing? Thanks, Pete From eddythejekyll at gmail.com Fri Aug 11 15:20:44 2006 From: eddythejekyll at gmail.com (Ed) Date: Fri, 11 Aug 2006 15:20:44 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion Message-ID: I'm trying to read and write a parallel port on a standard (Dell) pc running RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. I'm having problems getting rxtx to return a port enumeration from getPortIdentifiers. I'm using a file PortChooser.java as a test file to get things going. This is from the Java CookBook 2nd edition (Chapter 12). The call // get list of ports available on this particular computer, // by calling static method in CommPortIdentifier. Enumeration pList = CommPortIdentifier.getPortIdentifiers(); returns a null pList; I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and compile without --disable-lockfiles I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ... When I compile with --disable-lockfiles the call to getPortIdentifiers simply returns a null Enumeration. I've read the documention and threads about this issue and I feel like I've tried everything, so at the moment I'm stumped. I can supply any further info that may help. Thanks in advance. Ed -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060811/80c4eeec/attachment-0002.html From tjarvi at qbang.org Fri Aug 11 18:29:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:29:48 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > On 8/11/06, Trent Jarvi wrote: >> Another option is to go into RXTXPort.java and put a sleep in the >> sendEvent() code. This way you would not have to recompile the native >> code (not very easy at this point). > > Are the instructions in the INSTALL file still valid? If so, it > wasn't very hard to build it > (I already had MinGW installed). Everything seemed to build just > fine. Haven't tried to install/use it yet, but it wasn't a big deal > (assuming those instructions were correct. > Hi Pete The instructions are correct. You will want to make sure that the exports worked. If the library does not work properly, then the exports failed. The exports are currently generated with nm, sed and grep in the Makefile which is often commented out. If the def file is old, it will cause problems. You should be good to go then. Look at the serial_select and eventLoop code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:33:32 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:33:32 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > but there doesn't appear to be a way to select that via RXTX (which > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > is selected). > > Is there a way I'm not seeing? > Hi Pete I'm guessing I didn't know the difference. At the time, I really didn't have windows API documentation. I just had some pages I found with altivista/google. Later microsoft made their documentation available on msdn or I learned about it. For rxtx, the calls need to be platform neutral. So if you see how to do each in termios, then we can get it going. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:45:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:45:24 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Fri, 11 Aug 2006, Ed wrote: > I'm trying to read and write a parallel port on a standard (Dell) pc running > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. > > I'm having problems getting rxtx to return a port enumeration from > getPortIdentifiers. I'm using a file > PortChooser.java as a test file to get things going. This is from the Java > CookBook 2nd edition (Chapter 12). The call > > // get list of ports available on this particular computer, > // by calling static method in CommPortIdentifier. > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > returns a null pList; > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and > compile without --disable-lockfiles I get: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > ... > > When I compile with --disable-lockfiles the call to getPortIdentifiers > simply returns a null Enumeration. > > I've read the documention and threads about this issue and I feel like I've > tried everything, so at the moment I'm stumped. > > I can supply any further info that may help. > > Thanks in advance. > > Ed > Hi Ed You may want to check the permissions of /dev/lp*. Also make sure lp or your kernel support for lp is loaded. It should show up in dmesg and lsmod. For my laptop with no printer port enabled in BIOS is see: lp: driver loaded but no devices found in desg |grep lp [] $ ls -l /dev/lp* crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 here root and group lp can read and write. Normal users cannot. Try a simple read as a user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: Permission denied Fix as root [] chmod 666 /dev/lp* [] $ ls -l /dev/lp* crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 Now as user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: No such device or address So this is saying there is no lp0 on my laptop. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:58:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:58:31 -0600 (MDT) Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat In-Reply-To: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> References: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Message-ID: On Wed, 9 Aug 2006, Jim Owen wrote: > Hi All, > > I've run into some difficulties with rxtx that have me baffled and need > some help. > > I have an application that has used earlier versions of rxtx > successfully and on a variety of platforms. We recently needed to deploy > this application into an environment where we could not utilize lock files. > > I pulled down the 2.0.7 pre1 source distribution and executed configure > with --disable-lockfiles. I then executed make and make install. > > When I execute the program, as root, I get the following error: > > ************************************************************************ > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) > # Problematic frame: > # C 0x00001004 > # > # An error report file with more information is saved as hs_err_pid20151.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > **************************************************************************** > > If I execute as a normal user, I get no errors, but no ports listed: > (Using an earlier version, I get a serial and parallel port listed.) > > **************************************************************************** > [jim at linuxDev ingenicoApp]$ java VerifyCommBuild > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Some ports appear to have been found, let's try to enumerate them. > Complete. > **************************************************************************** > > When I built rxtx, there was a warning given of the following: > > **************************************************************************** > conftest.c: In function 'main': > conftest.c:6: warning: incompatible implicit declaration of built-in > function 'printf' > conftest.c:7: warning: incompatible implicit declaration of built-in > function 'exit' > > WARNING: Kernel include files do not match the current kernel > **************************************************************************** > > > uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 > Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux > > JAVA_HOME=/usr/java/j2sdk1.4.2_11 > > javax.comm.properties: Driver=gnu.io.RXTXCommDriver > > Here's the code for VerifyCommBuild.java that I'm using to test: > > > **************************************************************************** > import javax.comm.*; > import java.util.Enumeration; > /** > * A quick app to check that the javax.comm (Serial) Communications > extension has been properly > * installed and configured on this machine. > * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. > */ > public class VerifyCommBuild > { > public static void main(String args[]) > { > Enumeration ports; > System.out.println("Verifying Comm Build Environment"); > try > { > ports = CommPortIdentifier.getPortIdentifiers(); > if (ports == null) > { > System.out.println("No comm ports found!"); > return; > } > System.out.println("Some ports appear to have been found, let's > try to enumerate them."); > while (ports.hasMoreElements()) > { > System.out.println("Here is a port [" + > ((CommPortIdentifier)ports.nextElement()).getName() > + "]"); > } > } catch (Exception e) > { > System.out.println("Failed to enumerate ports [" + > e.getMessage() + "]"); > e.printStackTrace(); > } > System.out.println("Complete."); > } > } > Hi Jim This is a new one to me. Have you tried it on another system. Maybe something isnt sane in your toolchain. -- Trent Jarvi tarvi at qbang.org From eddythejekyll at gmail.com Sat Aug 12 11:45:39 2006 From: eddythejekyll at gmail.com (Ed) Date: Sat, 12 Aug 2006 11:45:39 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Trent, Right after I sent the results indicated below I re-ran the app and it apparently found the parallel port. The difference was that I set the permissions to : /dev: wildcard lp* crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 I'm still not sure how to interpret the dmesg and lsmod before. However I'm thinking that since the user now has permission to access the lp* port, a request to access it loaded the lp and parport modules automatically and allowed me access. Here's the output of lsmod now: ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp lp 5540 0 (autoclean) parport 21608 1 (autoclean) [parport_pc lp] and dmesg: ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp On node 0 totalpages: 161776 lp0: using parport0 (polling). So I think I'm good, and ready to move on the next steps. Thanks Trent! Ed On 8/12/06, Ed wrote: > > Thanks for the reply Trent. > > I'm on a different system today but am trying your suggestons. This is a > debian 3.1r2 system and I'm running jdk 1.5.0_04. > > Take a look below, but I think I have no parallel port support on this > kernel, however I never get the "No such device or address" return from the > cat call as you did so I'm not sure how to interpret the results. > > When I run the test program (PortChooser.java), the getPortIdentifiers > call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is > more than I found on the RedHat system. Incidently --disable-lockfiles has > no effect. > > It looks as though there is no parallel support in this kernel: > falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > On node 0 totalpages: 161776 > falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > > I'm a little confused by the results when I cat to the lp0 device. It > seems from the dmesg output that I don't have parallel printer support, but > when I cat to the lp0 device, I get permission denied if I'm non-root user > and input/output error if I'm root. Apparently this means I have the device, > but no support in the kernel? > > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > ed at falcon:~/src/workspace/EASServer/src$ su > Password: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > > Here's my lp* device permissions. > /dev: > wildcard lp* > crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > If I change it to > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I get: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > falcon:/home/ed/src/workspace/EASServer/src# exit > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > cat: /dev/lp0: Input/output error > ed at falcon:~/src/workspace/EASServer/src$ > > What do you think? Should I recompile the kernel or is it something else? > > By the way, I added the user ed to the lp and uucp groups on this system. > > Thanks again, > > Ed > > On 8/11/06, Trent Jarvi wrote: > > > > On Fri, 11 Aug 2006, Ed wrote: > > > > > I'm trying to read and write a parallel port on a standard (Dell) pc > > running > > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > > gates. > > > > > > I'm having problems getting rxtx to return a port enumeration from > > > getPortIdentifiers. I'm using a file > > > PortChooser.java as a test file to get things going. This is from the > > Java > > > CookBook 2nd edition (Chapter 12). The call > > > > > > // get list of ports available on this particular computer, > > > // by calling static method in CommPortIdentifier. > > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > > > > > returns a null pList; > > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure > > and > > > compile without --disable-lockfiles I get: > > > > > > Stable Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7 > > > Java lib Version = RXTX-2.1-7 > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > ... > > > > > > When I compile with --disable-lockfiles the call to getPortIdentifiers > > > > > simply returns a null Enumeration. > > > > > > I've read the documention and threads about this issue and I feel like > > I've > > > tried everything, so at the moment I'm stumped. > > > > > > I can supply any further info that may help. > > > > > > Thanks in advance. > > > > > > Ed > > > > > > > Hi Ed > > > > You may want to check the permissions of /dev/lp*. Also make sure lp or > > your kernel support for lp is loaded. It should show up in dmesg and > > lsmod. > > > > For my laptop with no printer port enabled in BIOS is see: > > > > lp: driver loaded but no devices found > > > > in desg |grep lp > > > > [] $ ls -l /dev/lp* > > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > here root and group lp can read and write. Normal users cannot. > > > > Try a simple read as a user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > > > > Fix as root > > > > [] chmod 666 /dev/lp* > > [] $ ls -l /dev/lp* > > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > Now as user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: No such device or address > > > > So this is saying there is no lp0 on my laptop. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > > > -- > > Ed > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060812/c2afe1f8/attachment-0002.html From tjarvi at qbang.org Sat Aug 12 14:01:52 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 12 Aug 2006 14:01:52 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Remember that the lp code expects a printer - or something like it. There is a line that specifies the printer is online. If you are doing hobby work, you will need to raise that line or loop it back to something that is raised. If you just try reading a port with no device connected and online, there will be an error while trying to read. This should be addressed in the mail-list archives. On Sat, 12 Aug 2006, Ed wrote: > Trent, > Right after I sent the results indicated below I re-ran the app and it > apparently found the parallel port. The difference was that I set the > permissions to : > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I'm still not sure how to interpret the dmesg and lsmod before. However I'm > thinking that since the user now has permission to access the lp* port, a > request to access it loaded the lp and parport modules automatically and > allowed me access. Here's the output of lsmod now: > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > lp 5540 0 (autoclean) > parport 21608 1 (autoclean) [parport_pc lp] > > and dmesg: > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > On node 0 totalpages: 161776 > lp0: using parport0 (polling). > > So I think I'm good, and ready to move on the next steps. > > Thanks Trent! > > Ed > > > On 8/12/06, Ed wrote: >> >> Thanks for the reply Trent. >> >> I'm on a different system today but am trying your suggestons. This is a >> debian 3.1r2 system and I'm running jdk 1.5.0_04. >> >> Take a look below, but I think I have no parallel port support on this >> kernel, however I never get the "No such device or address" return from the >> cat call as you did so I'm not sure how to interpret the results. >> >> When I run the test program (PortChooser.java), the getPortIdentifiers >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is >> more than I found on the RedHat system. Incidently --disable-lockfiles has >> no effect. >> >> It looks as though there is no parallel support in this kernel: >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp >> On node 0 totalpages: 161776 >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp >> >> I'm a little confused by the results when I cat to the lp0 device. It >> seems from the dmesg output that I don't have parallel printer support, but >> when I cat to the lp0 device, I get permission denied if I'm non-root user >> and input/output error if I'm root. Apparently this means I have the >> device, >> but no support in the kernel? >> >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> >> cat: /dev/lp0: Permission denied >> ed at falcon:~/src/workspace/EASServer/src$ su >> Password: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> >> Here's my lp* device permissions. >> /dev: >> wildcard lp* >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> If I change it to >> /dev: >> wildcard lp* >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> I get: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> falcon:/home/ed/src/workspace/EASServer/src# exit >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> ed at falcon:~/src/workspace/EASServer/src$ >> >> What do you think? Should I recompile the kernel or is it something else? >> >> By the way, I added the user ed to the lp and uucp groups on this system. >> >> Thanks again, >> >> Ed >> >> On 8/11/06, Trent Jarvi wrote: >> > >> > On Fri, 11 Aug 2006, Ed wrote: >> > >> > > I'm trying to read and write a parallel port on a standard (Dell) pc >> > running >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the >> > gates. >> > > >> > > I'm having problems getting rxtx to return a port enumeration from >> > > getPortIdentifiers. I'm using a file >> > > PortChooser.java as a test file to get things going. This is from the >> > Java >> > > CookBook 2nd edition (Chapter 12). The call >> > > >> > > // get list of ports available on this particular computer, >> > > // by calling static method in CommPortIdentifier. >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); >> > > >> > > returns a null pList; >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure >> > and >> > > compile without --disable-lockfiles I get: >> > > >> > > Stable Library >> > > ========================================= >> > > Native lib Version = RXTX-2.1-7 >> > > Java lib Version = RXTX-2.1-7 >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > ... >> > > >> > > When I compile with --disable-lockfiles the call to getPortIdentifiers >> > >> > > simply returns a null Enumeration. >> > > >> > > I've read the documention and threads about this issue and I feel like >> > I've >> > > tried everything, so at the moment I'm stumped. >> > > >> > > I can supply any further info that may help. >> > > >> > > Thanks in advance. >> > > >> > > Ed >> > > >> > >> > Hi Ed >> > >> > You may want to check the permissions of /dev/lp*. Also make sure lp or >> > your kernel support for lp is loaded. It should show up in dmesg and >> > lsmod. >> > >> > For my laptop with no printer port enabled in BIOS is see: >> > >> > lp: driver loaded but no devices found >> > >> > in desg |grep lp >> > >> > [] $ ls -l /dev/lp* >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > here root and group lp can read and write. Normal users cannot. >> > >> > Try a simple read as a user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: Permission denied >> > >> > Fix as root >> > >> > [] chmod 666 /dev/lp* >> > [] $ ls -l /dev/lp* >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > Now as user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: No such device or address >> > >> > So this is saying there is no lp0 on my laptop. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > >> >> >> >> -- >> >> Ed >> > > > > From pete.flugstad at gmail.com Mon Aug 14 07:51:41 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 08:51:41 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: <84d4a6d50608140651h3cb2266ap90c47780abace00@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > On Fri, 11 Aug 2006, Pete Flugstad wrote: > > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > > but there doesn't appear to be a way to select that via RXTX (which > > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > > is selected). > > I'm guessing I didn't know the difference. At the time, I really didn't > have windows API documentation. I just had some pages I found with > altivista/google. Later microsoft made their documentation available on > msdn or I learned about it. > > For rxtx, the calls need to be platform neutral. So if you see how to do > each in termios, then we can get it going. so, RTSCTS_IN/OUT at the COMM API is mapped to HARDWARE_FLOW_CONTROL in the POSIX layer. Which termios.c maps to RTS_CONTROL_HANDSHAKE and fOutxCtsFlow = true. Since termios.c is Windows only anway... Would it work to change the mapping in termios.c to map hardware flow control to RTS_CONTROL_TOGGLE? I just wondering (I'm going to go look, but there's a lot of code in there) if the code does anything special playing with flow control signals? Thanks, Pete From pete.flugstad at gmail.com Mon Aug 14 09:42:48 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 10:42:48 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> On 8/3/06, Trent Jarvi wrote: > On Thu, 3 Aug 2006, Pete Flugstad wrote: > > Okay, I can understand that, but from the PORTMON output, it looks > > like it's opening each port TWICE: > > I think this problem is in RXTXCommDriver.java. I've just not tracked it > down but it should be in the java code, not the native code so easy > enough to track down. Okay, I'm trying to track this down... Looks like the CommPortIdentifier static initializer loads RXTXCommDriver, and then calls RXTXDriver.initialize. But then CommPortIdentifier.getPortIdentifiers does the exact same thing. So that's where the two scans are coming from. I would guess that one or the other can be removed? Probably the one in the CommPortIdentifier.getPortIdentifiers? Doing so removes the 2nd scan. Pete PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) val = System.getProperty("gnu.io.SerialPorts"); Shouldn't the comparison be != null? getProperty returns null if the variable is NOT found, and you only want to assign to val if it IS found, right? Same thing for the parallel port case. End result is the same I guess, since you check for null later, but probably should be fixed. From eddythejekyll at gmail.com Mon Aug 14 11:55:17 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 11:55:17 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: When I try to get the mode with int mode = pPort.getMode(); it returns 0 which isn't any of the valid modes. I tried setting it explicitely with pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced the requested mode in nativeSetSerialPortParams at gnu.io.LPRPort.setLPRMode(Native Method) at gnu.io.LPRPort.setMode(LPRPort.java:87) Except for LPT_MODE_ANY, but the getMode call still failed out with an invalid state. I'm wondering if it's because I don't have the line pulled high like you said. This isn't a printer connected. It's a relay board with pins 2-9 tied to data, and 18-25 to gnd. The rest are open. I looked at a DB25 pinout diagram and I'm not sure which pin I need to tie high, and I looked through the archives, but didn't find a reference to something definitive. Can someone help me with which pin is the "online" pin as Trent mentioned? DB25 spec has ( I hope this formats correctly in this email) BUSY (11), SEL (13) or INIT (16) are candidates, but I'm guessing. Any clues? *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Thanks, Ed On 8/12/06, Trent Jarvi wrote: > > > Remember that the lp code expects a printer - or something like it. There > is a line that specifies the printer is online. If you are doing hobby > work, you will need to raise that line or loop it back to something that > is raised. > > If you just try reading a port with no device connected and online, there > will be an error while trying to read. This should be addressed in the > mail-list archives. > > On Sat, 12 Aug 2006, Ed wrote: > > > Trent, > > Right after I sent the results indicated below I re-ran the app and it > > apparently found the parallel port. The difference was that I set the > > permissions to : > > /dev: > > wildcard lp* > > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > > > I'm still not sure how to interpret the dmesg and lsmod before. However > I'm > > thinking that since the user now has permission to access the lp* port, > a > > request to access it loaded the lp and parport modules automatically and > > allowed me access. Here's the output of lsmod now: > > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > > lp 5540 0 (autoclean) > > parport 21608 1 (autoclean) [parport_pc lp] > > > > and dmesg: > > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > > On node 0 totalpages: 161776 > > lp0: using parport0 (polling). > > > > So I think I'm good, and ready to move on the next steps. > > > > Thanks Trent! > > > > Ed > > > > > > On 8/12/06, Ed wrote: > >> > >> Thanks for the reply Trent. > >> > >> I'm on a different system today but am trying your suggestons. This is > a > >> debian 3.1r2 system and I'm running jdk 1.5.0_04. > >> > >> Take a look below, but I think I have no parallel port support on this > >> kernel, however I never get the "No such device or address" return from > the > >> cat call as you did so I'm not sure how to interpret the results. > >> > >> When I run the test program (PortChooser.java), the getPortIdentifiers > >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this > is > >> more than I found on the RedHat system. Incidently --disable-lockfiles > has > >> no effect. > >> > >> It looks as though there is no parallel support in this kernel: > >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > >> On node 0 totalpages: 161776 > >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > >> > >> I'm a little confused by the results when I cat to the lp0 device. It > >> seems from the dmesg output that I don't have parallel printer support, > but > >> when I cat to the lp0 device, I get permission denied if I'm non-root > user > >> and input/output error if I'm root. Apparently this means I have the > >> device, > >> but no support in the kernel? > >> > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> > >> cat: /dev/lp0: Permission denied > >> ed at falcon:~/src/workspace/EASServer/src$ su > >> Password: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> > >> Here's my lp* device permissions. > >> /dev: > >> wildcard lp* > >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> If I change it to > >> /dev: > >> wildcard lp* > >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> I get: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> falcon:/home/ed/src/workspace/EASServer/src# exit > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> ed at falcon:~/src/workspace/EASServer/src$ > >> > >> What do you think? Should I recompile the kernel or is it something > else? > >> > >> By the way, I added the user ed to the lp and uucp groups on this > system. > >> > >> Thanks again, > >> > >> Ed > >> > >> On 8/11/06, Trent Jarvi wrote: > >> > > >> > On Fri, 11 Aug 2006, Ed wrote: > >> > > >> > > I'm trying to read and write a parallel port on a standard (Dell) > pc > >> > running > >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > >> > gates. > >> > > > >> > > I'm having problems getting rxtx to return a port enumeration from > >> > > getPortIdentifiers. I'm using a file > >> > > PortChooser.java as a test file to get things going. This is from > the > >> > Java > >> > > CookBook 2nd edition (Chapter 12). The call > >> > > > >> > > // get list of ports available on this particular computer, > >> > > // by calling static method in CommPortIdentifier. > >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > >> > > > >> > > returns a null pList; > >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I > configure > >> > and > >> > > compile without --disable-lockfiles I get: > >> > > > >> > > Stable Library > >> > > ========================================= > >> > > Native lib Version = RXTX-2.1-7 > >> > > Java lib Version = RXTX-2.1-7 > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > ... > >> > > > >> > > When I compile with --disable-lockfiles the call to > getPortIdentifiers > >> > > >> > > simply returns a null Enumeration. > >> > > > >> > > I've read the documention and threads about this issue and I feel > like > >> > I've > >> > > tried everything, so at the moment I'm stumped. > >> > > > >> > > I can supply any further info that may help. > >> > > > >> > > Thanks in advance. > >> > > > >> > > Ed > >> > > > >> > > >> > Hi Ed > >> > > >> > You may want to check the permissions of /dev/lp*. Also make sure lp > or > >> > your kernel support for lp is loaded. It should show up in dmesg and > >> > lsmod. > >> > > >> > For my laptop with no printer port enabled in BIOS is see: > >> > > >> > lp: driver loaded but no devices found > >> > > >> > in desg |grep lp > >> > > >> > [] $ ls -l /dev/lp* > >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > here root and group lp can read and write. Normal users cannot. > >> > > >> > Try a simple read as a user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: Permission denied > >> > > >> > Fix as root > >> > > >> > [] chmod 666 /dev/lp* > >> > [] $ ls -l /dev/lp* > >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > Now as user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: No such device or address > >> > > >> > So this is saying there is no lp0 on my laptop. > >> > > >> > -- > >> > Trent Jarvi > >> > tjarvi at qbang.org > >> > > >> > >> > >> > >> -- > >> > >> Ed > >> > > > > > > > > > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/59164078/attachment-0002.html From eddythejekyll at gmail.com Mon Aug 14 14:19:58 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 14:19:58 -0600 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? Message-ID: I'm using the ParallelPort class to drive a relay board. According to Mr. Jarvi, since this board isn't a printer, there will be a read error unless I hold the "printer online" line high in order to make the API think I'm talking to a printer. The problem is, I can't figure out which line is the "printer online". My DB25 spec lists the following: *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Anyone know which one I should tie high? I tried the busy line and it still errored out on the read. Thanks in advance, -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/66cf3c3e/attachment-0002.html From tjarvi at qbang.org Mon Aug 14 18:06:29 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:06:29 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Mon, 14 Aug 2006, Ed wrote: > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > which isn't any of the valid modes. I tried setting it explicitely with > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced > the requested mode in nativeSetSerialPortParams > at gnu.io.LPRPort.setLPRMode(Native Method) > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > invalid state. This is because rxtx only supports the basics. JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } One could program in more support. When I did that I just had a daisy wheel printer to test with and doing any more would have been blind. So that behavior is expected. I'll look to see if the Parallel Complete book mentions which pins you need to raise. If you look in the source code [ParallelImp.c] you can see this code isn't well tested. It has worked for hobby use in the past as I'd guess you are trying to do. But my experience with the code is as is mentioned in the top of the source: /* fear he who enter here. It appears that things have changed. An attempt has been made to put things the way the should be. It compiles and ParallelBlackBox runs. No further guarantees. Well... One.. it will print "Hello World!" on an epson DX 10 printer. you know.. the 10 character per second daisy wheel printer ;) - Trent Jarvi */ That comment is from 1997 or so. Since then some windows support was contributed but it is still very green code. We get about four requests for parallel support a year so its just not a well traveled area. It would be nice to have some documentation for the people trying to hook parallel ports to electronic projects. That appears to be the exclusive use of the Parallel support. The wiki pages are intended to let people share information like this to help each other in their projects as they figure out the details. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Aug 14 18:40:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:40:40 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: > PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): > > if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) > val = System.getProperty("gnu.io.SerialPorts"); > > Shouldn't the comparison be != null? getProperty returns null if the > variable is NOT found, and you only want to assign to val if it IS > found, right? Same thing for the > parallel port case. End result is the same I guess, since you check > for null later, > but probably should be fixed. I think this is just a fallback to the second property. gnu.io.SerialPorts isn't documented but perhaps it is used. It should behave properly as documented in INSTALL. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 14 18:56:55 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 19:56:55 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: <44E11BD7.5030102@gmail.com> Trent Jarvi wrote: >> PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): >> >> if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) >> val = System.getProperty("gnu.io.SerialPorts"); >> > > I think this is just a fallback to the second property. > gnu.io.SerialPorts isn't documented but perhaps it is used. It should > behave properly as documented in INSTALL. Doh - yup, I missed the fact that the property names were different... Pete From berkland at spamcop.net Mon Aug 14 19:58:21 2006 From: berkland at spamcop.net (Doug Berkland) Date: Mon, 14 Aug 2006 21:58:21 -0400 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? In-Reply-To: References: Message-ID: <269e40090608141858g698c2579v8d962deca3f4df53@mail.gmail.com> Based on memory and this page as confirmation, I would say pin 13 is the "Online" pin for SPP (standard parallel port). http://www.quatech.com/support/comm-over-parallel.php On 8/14/06, Ed wrote: > > I'm using the ParallelPort class to drive a relay board. According to Mr. > Jarvi, since this board isn't a printer, there will be a read error unless I > hold the "printer online" line high in order to make the API think I'm > talking to a printer. The problem is, I can't figure out which line is the > "printer online". My DB25 spec lists the following: > > *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and > Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data > Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 > D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select > 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select > In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit > 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 > Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and > Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground > > Anyone know which one I should tie high? I tried the busy line and it > still errored out on the read. > > Thanks in advance, > > -- > Ed > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/842bb770/attachment-0002.html From eddythejekyll at gmail.com Mon Aug 14 20:25:42 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 20:25:42 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Ah, I see. I've seen the caveats about limited Parallel support, but I thought it was mainly about the javax.comm package. The gnu.io is derived from javax.comm package right? That is, is the parallel support in rxtx is a superset of what's in javax.comm? I'm using this not for hobby usage, but for some simple instrumenation and control. If the project mandates it, I'll gladly work on extending the support. In the meantime, I need to get some sanity checks working, and repair my relay board (I smoked the ULN2803 chip, apparently by tying the BUSY (pin 11) to vcc). I guess I'll try the SEL pin next (and a supply of 2803s) with a ~1K pullup. The caveat in the comment block isn't very encouraging (!), but I borrowed an old Epson Stylus Color 600 printer to see what I can do. If I can write out characters to it I'll be happy. Parallel printers aren't easy to find these days. I haven't yet looked at the native source, yet, but I've just imported it into eclipse and I'll surf around a bit. Ed On 8/14/06, Trent Jarvi wrote: > > On Mon, 14 Aug 2006, Ed wrote: > > > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > > which isn't any of the valid modes. I tried setting it explicitely with > > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to > proced > > the requested mode in nativeSetSerialPortParams > > at gnu.io.LPRPort.setLPRMode(Native Method) > > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > > invalid state. > > This is because rxtx only supports the basics. > > JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > jclass jclazz, jint mode) > { > switch(mode) > { > case LPT_MODE_ANY: > break; > case LPT_MODE_SPP: > case LPT_MODE_PS2: > case LPT_MODE_EPP: > case LPT_MODE_ECP: > case LPT_MODE_NIBBLE: > default: > throw_java_exception( env, > UNSUPPORTED_COMM_OPERATION, > "nativeSetSerialPortParams", > "setLPRMode was unable to proced the > requested \ > mode" > ); > } > return(JNI_TRUE); > } > > One could program in more support. When I did that I just had a daisy > wheel printer to test with and doing any more would have been blind. > > So that behavior is expected. I'll look to see if the Parallel Complete > book mentions which pins you need to raise. If you look in the source > code [ParallelImp.c] you can see this code isn't well tested. It has > worked for hobby use in the past as I'd guess you are trying to do. But > my experience with the code is as is mentioned in the top of the source: > > /* > fear he who enter here. It appears that things have changed. An > attempt > has been made to put things the way the should be. > > It compiles and ParallelBlackBox runs. No further guarantees. > > Well... One.. it will print "Hello World!" on an epson DX 10 > printer. > you know.. the 10 character per second daisy wheel printer ;) > > - Trent Jarvi > */ > > That comment is from 1997 or so. > > Since then some windows support was contributed but it is still very green > code. We get about four requests for parallel support a year so its just > not a well traveled area. > > It would be nice to have some documentation for the people trying to hook > parallel ports to electronic projects. That appears to be the exclusive > use of the Parallel support. The wiki pages are intended to let people > share information like this to help each other in their projects as they > figure out the details. > > -- > Trent Jarvi > tjarvi at qbang.org > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/fbb5ddb4/attachment-0002.html From lyon at docjava.com Tue Aug 15 06:06:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 15 Aug 2006 08:06:27 -0400 Subject: [Rxtx] smoking is bad for your health In-Reply-To: References: Message-ID: Hi All, If you are connecting to the parallel port and smoking chips, it is time for extra stuff to buffer the parallel port. You may be want more current, in which case driver transistors are needed, or, if you are using the port as an output only device, you may like to add your own bus transceiver (e.g., 74245), set for output. Do be careful to design this properly; http://www.beyondlogic.org/spp/parallel.htm Some people like to use Octal D-type F.F's with OC outputs, like a 74374, http://upgrade.cntc.ac.kr/data/ttl/74374.html I like this one, as it has the D FF's and can latch the outputs for presentation to slower electronics (like relays). But careful! A relay that needs more current than the family of the device you have selected will look like a short to ground, and you will smoke your bug! And MOBO's do NOT come with the ability to drive any load you like. Check the power specs on your relay and be sure to protect the chip against back EMF with a diode. It is best to smoke test this on a bread board BEFORE hooking it to the computer. And be sure you smoke test the corner points in the ckt for a while, lest it fail in the field. - Doug >Ah, I see. I've seen the caveats about limited >Parallel support, but I thought it was mainly >about the javax.comm package. The >gnu.io is derived from javax.comm >package right? That is, is the parallel support >in rxtx is a superset of what's in javax.comm? > >I'm using this not for hobby usage, but for some >simple instrumenation and control. If the >project mandates it, I'll gladly work on >extending the support. In the meantime, I need >to get some sanity checks working, and repair my >relay board (I smoked the ULN2803 chip, >apparently by tying the BUSY (pin 11) to vcc). I >guess I'll try the SEL pin next (and a supply of >2803s) with a ~1K pullup. > >The caveat in the comment block isn't very >encouraging (!), ?but?I borrowed an old Epson >Stylus Color 600 printer to see what I can do. >?If I can write out characters to it I'll be >happy. Parallel printers aren't easy to find >these days. > > I haven't yet looked at the native source, yet, >but I've just imported it into eclipse and I'll >surf around a bit. > >Ed > >On 8/14/06, Trent Jarvi <tjarvi at qbang.org> wrote: > >On Mon, 14 Aug 2006, Ed wrote: > >> When I try to get the mode with int mode = pPort.getMode(); it returns 0 >> which isn't any of the valid modes. I tried setting it explicitely with >> pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with >> >> gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced >> the requested mode in nativeSetSerialPortParams >> at gnu.io.LPRPort.setLPRMode(Native Method) >> at gnu.io.LPRPort.setMode(LPRPort.java:87) >> >> Except for LPT_MODE_ANY, but the getMode call still failed out with an >> invalid state. > >This is because rxtx only supports the basics. > >JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > ???????jclass jclazz, jint mode) >{ > ???????switch(mode) > ???????{ > ???????????????case LPT_MODE_ANY: > ???????????????????????break; > ???????????????case LPT_MODE_SPP: > ???????????????case LPT_MODE_PS2: > ???????????????case LPT_MODE_EPP: > ???????????????case LPT_MODE_ECP: > ???????????????case LPT_MODE_NIBBLE: > ???????????????default: > ???????????????????????throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, > ???????????????????????????????"nativeSetSerialPortParams", > ???????????????????????????????"setLPRMode was >unable to proced the requested \ > ???????????????????????????????mode" > ???????????????????????); > ???????} > ???????return(JNI_TRUE); >} > >One could program in more support.??When I did that I just had a daisy >wheel printer to test with and doing any more would have been blind. > >So that behavior is expected.??I'll look to see if the Parallel Complete >book mentions which pins you need to raise.??If you look in the source >code [ParallelImp.c] you can see this code isn't well tested.??It has >worked for hobby use in the past as I'd guess you are trying to do.??But >my experience with the code is as is mentioned in the top of the source: > >/* > fear he who enter here.??It appears that things have changed.??An attempt > has been made to put things the way the should be. > > ???????It compiles and ParallelBlackBox runs.??No further guarantees. > > ???????Well... One.. it will print "Hello World!" on an epson DX 10 printer. > ???????you know.. the 10 character per second daisy wheel printer ;) > > ???????- Trent Jarvi >*/ > >That comment is from 1997 or so. > >Since then some windows support was contributed but it is still very green >code.??We get about four requests for parallel support a year so its just >not a well traveled area. > >It would be nice to have some documentation for the people trying to hook >parallel ports to electronic projects.??That appears to be the exclusive >use of the Parallel support.??The wiki pages are intended to let people >share information like this to help each other in their projects as they >figure out the details. > >-- >Trent Jarvi >tjarvi at qbang.org > > > > >-- >Ed > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 15 13:26:16 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 15 Aug 2006 14:26:16 -0500 Subject: [Rxtx] crash with too much memory Message-ID: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded from qbang.org. I'm exercising the RXTX COMM serial interface, both in a small standalone test and with the same code pulled into a large OSGI framework setup. If I use the stock .jar/.dll's, then everything works correctly in both situations. I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 (mingw-special)). If I use my locally built version, then my small test case works just fine, both when run inside Eclipse and when run standalone on the command line. However, when I try and use my locally built .jar/.dll's in the large framework environment, then I get a JVM crash with the attached log. Normally this would lead me to think that I was running out of memory or something in the large environment, and when I try and play with the JVM memory args, some interesting things show up. In our large environment, we have -Xms32M/-Xmx1024M - this appears to be the problem. If I set max to something like 64M, then things work. The cross over point from working to failing seems to be around 32M/110M (works) and 32M/111M (fails). But 128M/128M works while 128M/129M fails. So it seems to have to do with how much memory is actually available, or something like that. The thing that occurs to me is if my GCC is somehow generating something like "near" calls. But when the JVM has a lot of RAM available, it puts the DLL up somehwere in the address space and then the near calls fail - far calls are needed. So, I'm thinking this is probably a difference in the MinGW GCC I'm using and the one that was used to build the stock binaries from qbang, or maybe some command line args were changed? So, I'm hoping someone will have an idea of what's going on here... Thanks, Pete From tjarvi at qbang.org Tue Aug 15 18:54:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 15 Aug 2006 18:54:04 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: On Tue, 15 Aug 2006, Pete Flugstad wrote: > I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded > from qbang.org. > > I'm exercising the RXTX COMM serial interface, both in a small > standalone test and with the same code pulled into a large OSGI > framework setup. > > If I use the stock .jar/.dll's, then everything works correctly in > both situations. > > I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 > (mingw-special)). > > If I use my locally built version, then my small test case works just > fine, both when run inside Eclipse and when run standalone on the > command line. However, when I try and use my locally built > .jar/.dll's in the large framework environment, then I get a JVM crash > with the attached log. > > Normally this would lead me to think that I was running out of memory > or something in the large environment, and when I try and play with > the JVM memory args, some interesting things show up. > > In our large environment, we have -Xms32M/-Xmx1024M - this appears to > be the problem. If I set max to something like 64M, then things work. > The cross over point from working to failing seems to be around > 32M/110M (works) and 32M/111M (fails). > But 128M/128M works while 128M/129M fails. So it seems to have to do > with how much memory is actually available, or something like that. > > The thing that occurs to me is if my GCC is somehow generating > something like "near" calls. But when the JVM has a lot of RAM > available, it puts the DLL up somehwere in the address space and then > the near calls fail - far calls are needed. > > So, I'm thinking this is probably a difference in the MinGW GCC I'm > using and the one that was used to build the stock binaries from > qbang, or maybe some command line args were changed? > > So, I'm hoping someone will have an idea of what's going on here... > Hi Pete The binaries are from the src. They should be reproducable. I did extensive testing of rxtx several years ago using mingw as the compiler. The version was 2.95. I have not changed versions since. There are way too many variables as it is. I have a linux->mingw cross compiler rpm I use for all windows use. If you want a copy of it you can have it. It isn't anything 'special' :) -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Thu Aug 17 11:49:24 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 17 Aug 2006 12:49:24 -0500 Subject: [Rxtx] crash with too much memory In-Reply-To: References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> On 8/15/06, Trent Jarvi wrote: > I did extensive testing of rxtx several years ago using mingw as the > compiler. The version was 2.95. I have not changed versions since. > There are way too many variables as it is. FYI, I believe I've solved this problem by changing how the dll's were built. The original mingw makefile was generating Serial.def, then performing various operations with dlltool and ld. I modified the makefile to create the dll using this page: as a guide. With that, there's no longer any need to deal with Serial.def and the makefile becomes _much_ simpler. This appears to have addressed my problems with crashing. FWIW, GCC 2.95 is _really_ old - you should consider investigating upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is supposed to generate a native binary (i.e. just like MinGW). Thanks, Pete From claretlc at yahoo.com Thu Aug 17 12:34:48 2006 From: claretlc at yahoo.com (Clare Cooley) Date: Thu, 17 Aug 2006 11:34:48 -0700 (PDT) Subject: [Rxtx] parallel port communication Message-ID: <20060817183448.76911.qmail@web53908.mail.yahoo.com> Hi, I'm trying to write a 1 to a bit 15 on a parallel port cable that isn't attached to a printer.(It's a control box for eye-tracking equipment.)I need to do this in Java. I looked at the javax.comm documentation, and it said, "Application programs should not directly create ParallelPortEvent objects." So is there a way to do this with your package? If not, do you have any suggestions of where to look? It really needs to be done in Java. Thanks, Clare Cooley __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From pat at xvalheru.org Thu Aug 17 13:13:52 2006 From: pat at xvalheru.org (pat) Date: Thu, 17 Aug 2006 21:13:52 +0200 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060817190751.M5586@xvalheru.org> Hi there, I've question(s) for you. I need to communicate with scale, I've used the Sun's direver. Now I've switched to Rxtx and the speed of the communication is perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, but the difference between the crash time is 5 second ... . My question is: Is there a stable driver ??? Or what I have to do to have stable enough serial port driver ??? OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. Thanks to all for the help. Pat From tjarvi at qbang.org Fri Aug 18 05:13:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 05:13:42 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> Message-ID: On Thu, 17 Aug 2006, Pete Flugstad wrote: > On 8/15/06, Trent Jarvi wrote: >> I did extensive testing of rxtx several years ago using mingw as the >> compiler. The version was 2.95. I have not changed versions since. >> There are way too many variables as it is. > > FWIW, GCC 2.95 is _really_ old - you should consider investigating > upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is > supposed to generate a native binary (i.e. just like MinGW). > It is really old but also well known like C itself. I have considered upgrading. The ToyBox builds should be gcc 3* cross-compiled. I'm not going to be validating gcc 3* w32 binaries though. It's looking like we will need to focus support on MSFT's toolchain for 64 bit windows support until it is possible for gcc to support w64. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Aug 18 05:32:10 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 07:32:10 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: Hi All, Does anyone know how to produce mac intel binaries on a Fedora Linux box? Thanks! - Doug From tjarvi at qbang.org Fri Aug 18 06:42:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 06:42:05 -0600 (MDT) Subject: [Rxtx] cross compilation for the mac In-Reply-To: References: Message-ID: On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Does anyone know how to produce > mac intel binaries on a Fedora Linux > box? > > Thanks! > - Doug Hi Doug You need to build the cross toolchain which means copying the Darwin/Mac binaries over to fedora. It would be nontrivial but possible. Do the Darwin libraries work with Mac in general? I'm not aware of the licensing issues associated with grabbing Mac binaries. Same with OpenSolaris/Solaris. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Aug 18 08:15:26 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 10:15:26 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> In theory building against Darwin would be sufficient to getting things working on MacOS X. You need to remember that Darwin is the low-level OS, while MacOS X adds the everything else on top. IOKit, which is the I/O API, is available as part of Darwin. The only thing you will need extra are the Java libraries. One thing is that I would recommend that when producing binaries for the Mac, is to ensure they are Universal binaries (PPC+Intel). Andre > > From: Trent Jarvi > Date: 2006/08/18 Fri AM 08:42:05 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] cross compilation for the mac > > On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > > > Hi All, > > Does anyone know how to produce > > mac intel binaries on a Fedora Linux > > box? > > > > Thanks! > > - Doug > > Hi Doug > > You need to build the cross toolchain which means copying the Darwin/Mac > binaries over to fedora. It would be nontrivial but possible. > > Do the Darwin libraries work with Mac in general? I'm not aware of the > licensing issues associated with grabbing Mac binaries. > > Same with OpenSolaris/Solaris. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Aug 18 13:43:16 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 15:43:16 -0400 Subject: [Rxtx] cross compilation for the mac In-Reply-To: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: >In theory building against Darwin would be sufficient to getting >things working on MacOS X. You need to remember that Darwin is the >low-level OS, while MacOS X adds the everything else on top. IOKit, >which is the I/O API, is available as part of Darwin. The only thing >you will need extra are the Java libraries. > >One thing is that I would recommend that when producing binaries for >the Mac, is to ensure they are Universal binaries (PPC+Intel). > >Andre I find the xcode ide for generating a mix of universal binaries and java very difficult to make work. Is there a way to do this with make files? Thanks! - Doug From ajmas at sympatico.ca Fri Aug 18 13:54:55 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 15:54:55 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818195455.PGAP29052.tomts13-srv.bellnexxia.net@smtp1.sympatico.ca> It should be doable. XCode hands off the compilation process to gcc et al, for the compilation of C/C++ code and to javac et al. for the Java side. While ant is the favoured tool for 'automated' Java compilation, make can easily be used. All is needed is someone to volounteer to do the work. Andre "Dr. Douglas Lyon" wrote > > >In theory building against Darwin would be sufficient to getting > >things working on MacOS X. You need to remember that Darwin is the > >low-level OS, while MacOS X adds the everything else on top. IOKit, > >which is the I/O API, is available as part of Darwin. The only thing > >you will need extra are the Java libraries. > > > >One thing is that I would recommend that when producing binaries for > >the Mac, is to ensure they are Universal binaries (PPC+Intel). > > > >Andre > > I find the xcode ide for generating a mix of universal binaries > and java very difficult to make work. Is there a way to do this > with make files? > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Fri Aug 18 16:34:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 16:34:46 -0600 (MDT) Subject: [Rxtx] serial driver newbe question and problem In-Reply-To: <20060817190751.M5586@xvalheru.org> References: <20060817190751.M5586@xvalheru.org> Message-ID: On Thu, 17 Aug 2006, pat wrote: > Hi there, > > I've question(s) for you. I need to communicate with scale, I've used the > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > but the difference between the crash time is 5 second ... . > > My question is: Is there a stable driver ??? Or what I have to do to have > stable enough serial port driver ??? > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > Thanks to all for the help. > > Pat > Could you describe the hardware you have, the version of rxtx and provide the log of the crash? Did you download binaries? I've not been seeing a jvm crash with rxtx -- Trent Jarvi tjarvi at qbang.org From lunareclipse03 at web.de Sat Aug 19 12:11:48 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 19 Aug 2006 20:11:48 +0200 Subject: [Rxtx] Problem solved! Message-ID: <920065539@web.de> Hi everybody, I posted some months ago and asked about some help on my very special problem concerning my win32 port of a communications library. Now I just want to inform you that no further "mindstorming" is needed because I solved the problem by completely rewriting the win32 port of the library. Now everything works fine. Thank you all for your time and patience. --Sven Ahlemann __________________________________________________________________________ Erweitern Sie FreeMail zu einem noch leistungsst?rkeren E-Mail-Postfach! Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131 From ajmas at sympatico.ca Mon Aug 21 09:58:23 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 21 Aug 2006 11:58:23 -0400 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060821155823.TLSM18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Next time that happens, including a copy of the crash log, produced by Windows could probably help too. Andre Trent Jarvi wrote: > > On Thu, 17 Aug 2006, pat wrote: > > > Hi there, > > > > I've question(s) for you. I need to communicate with scale, I've used the > > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > > but the difference between the crash time is 5 second ... . > > > > My question is: Is there a stable driver ??? Or what I have to do to have > > stable enough serial port driver ??? > > > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > > > Thanks to all for the help. > > > > Pat > > > > Could you describe the hardware you have, the version of rxtx and > provide the log of the crash? Did you download binaries? > > I've not been seeing a jvm crash with rxtx > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From adrian.l.parker at gmail.com Thu Aug 24 09:10:39 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Thu, 24 Aug 2006 11:10:39 -0400 Subject: [Rxtx] Portability issues Message-ID: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use RXTX 2.0? Does it provide system librairies that javax.comm does not? I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, or 2000, or server 2003). Can this be done with a single implementation of RXTX? I don't want to have different versions of Java code that have different package names. References: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Message-ID: On Thu, 24 Aug 2006, Adrian Parker wrote: > Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use > RXTX 2.0? Does it provide system librairies that javax.comm does not? > > I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's > OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, > or 2000, or server 2003). Can this be done with a single implementation of > RXTX? I don't want to have different versions of Java code that have > different package names. > Hi Adrian. The native code can support all of the platforms you mention. I've never compiled for unixware or openunix but the patches are in the code. So you would need to compile for that target. >From there you would probably be best off going with rxtx 2.1 so you have all the classes in one package. You can opt to use rxtx 2.0 with Sun's commapi for Solaris v 2. The main differences are rxtx 2.1 comes with all the source/classes and is in package gnu.io while Sun's requires rxtx for some platforms but is in package javax.comm. The low level code is the same in either case as far as rxtx is concerned. -- Trent Jarvi tarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 04:12:52 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 06:12:52 -0400 Subject: [Rxtx] Serial.addEventListener bug? Message-ID: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on OpenServer 5.0.7). Its what Sun packages. I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an exception. It seems to throw the exception if no listener was previously declared (although I've not had chance to verify). Is this desireable behaviour? Sun's original API doesn't mention anything about an exception on this function, http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) Of course this is an old version of RXTX, so perhaps this has been changed. -- Adrian Parker Simulation Software Developer DLCSPM 4-4-3 (c) Building A31, CFB Kingston Tel: (613) 541-5010 x3020 CSN: 271-3020 Email: parker at lsec.dnd.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/22e2ea57/attachment-0002.html From tjarvi at qbang.org Fri Aug 25 05:15:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 25 Aug 2006 05:15:44 -0600 (MDT) Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: On Fri, 25 Aug 2006, Adrian Parker wrote: > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > OpenServer 5.0.7). Its what Sun packages. > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > exception. It seems to throw the exception if no listener was previously > declared (although I've not had chance to verify). > > Is this desireable behaviour? Sun's original API doesn't mention anything > about an exception on this function, > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > Of course this is an old version of RXTX, so perhaps this has been changed. > > > What exception was thrown? You can replace 1.4-8 with 2.0 for testing purposes. They are the same package. I doubt Sun shipped or packaged that. I think Caldera/SCOx/... did at one point. There may still be updates on their pages. I recall them sending patches here which are in current rxtx. -- Trent Jarvi tjarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 05:28:32 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 07:28:32 -0400 Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: <7da71e910608250428q32b86632g9a67b1b4efe69830@mail.gmail.com> On 8/25/06, Trent Jarvi wrote: > > On Fri, 25 Aug 2006, Adrian Parker wrote: > > > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > > OpenServer 5.0.7). Its what Sun packages. > > > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > > exception. It seems to throw the exception if no listener was > previously > > declared (although I've not had chance to verify). > > > > Is this desireable behaviour? Sun's original API doesn't mention > anything > > about an exception on this function, > > > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > > > Of course this is an old version of RXTX, so perhaps this has been > changed. > > > > > > > > What exception was thrown? Its weird. I catch an Exception. But when on that exception I call getClass().getName() I end up with a NullPointerException. You can replace 1.4-8 with 2.0 for testing > purposes. They are the same package. > > I doubt Sun shipped or packaged that. Doh! I meant to say SCO sorry. I was surfing Sun's site when I wrote that :) Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/e43aed3a/attachment-0002.html From sjudd at seas.upenn.edu Sat Aug 26 16:42:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Sat, 26 Aug 2006 18:42:09 -0400 Subject: [Rxtx] Mac commapi Message-ID: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? If so, where do I get it? Sun has various versions at http://www.sun.com/download/products.xml?id=43208d3d but they are for SolarisSparc, SolarisX86, Linux, and Generic. Do I use the Generic one? If so, read on; otherwise redirect me. While using the Generic version, my attempt to run the BlackBox sample program elicits a message saying it "can't find javax.comm.properties". I found a note in the rxtx.org HowTo (for Linux) saying to create this thing in /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties but where should it go on the Mac? After reading many versions of documentation around, and updates and revisions and re-authorings, I have worked my way into a state of confusion and high uncertainty. Please release me. sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060826/02d6b163/attachment-0002.html From tod at todbot.com Sat Aug 26 17:08:33 2006 From: tod at todbot.com (Tod E. Kurt) Date: Sat, 26 Aug 2006 16:08:33 -0700 Subject: [Rxtx] Mac commapi In-Reply-To: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Message-ID: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> You don't need Sun's CommAPI. You just need RXTX. Once you download RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and the native library is ("librxtxSerial.jnilib" on Mac OS X) via the standard methods. For instance, if you've placed those two files in a directory called 'rxtxlib' and you want to run a Java class called HelloWorld in the current directory, do the following: % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar HelloWorld On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? > If so, where do I get it? Sun has various versions at > http://www.sun.com/download/products.xml?id=43208d3d > but they are for SolarisSparc, SolarisX86, Linux, and Generic. > Do I use the Generic one? > If so, read on; otherwise redirect me. > > While using the Generic version, my attempt to run the BlackBox > sample program > elicits a message saying it "can't find javax.comm.properties". > I found a note in the rxtx.org HowTo (for Linux) saying to create > this thing in > /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties > but where should it go on the Mac? > > After reading many versions of documentation around, and updates > and revisions > and re-authorings, I have worked my way into a state of confusion > and high > uncertainty. Please release me. > > sj > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From sjudd at seas.upenn.edu Sun Aug 27 22:55:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Mon, 28 Aug 2006 00:55:09 -0400 Subject: [Rxtx] Mac commapi In-Reply-To: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> Message-ID: This was immensely helpful. Thank you, Tod. I wish it had been explicit somewhere in the documentation; it would have saved me 2 days of grief. One hugely valuable thing like this little set of instructions is that it implicitly lists all the hundreds of things you DON"T have to do. I know it seems obvious to those in the know, but every little bit of help on an arcane topic like this opens up the product to an exponentially wider group of dilettantes. I managed to get the SerialDemo program (from Sun) to work too. Hurrah! However, it required changing all the javax.comm references to gnu.io which I had heard of due to all my rambling readings. Is there not a demo program on rxtx.org already available that would not have needed this? BTW, the link on the Projects page for jPIC[Source] sends a *.hex file to a PIC 16F877 or similar chip... takes me to nowhere useful. I do not understand what the name "Toybox" is meant to imply. Thanks, sj On 2006 Aug 26, at 7:08 PM, Tod E. Kurt wrote: > You don't need Sun's CommAPI. You just need RXTX. Once you download > RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and > the native library is ("librxtxSerial.jnilib" on Mac OS X) via the > standard methods. > > For instance, if you've placed those two files in a directory called > 'rxtxlib' and you want to run a Java class called HelloWorld in the > current directory, do the following: > > % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar > HelloWorld > > > On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > >> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? >> If so, where do I get it? Sun has various versions at >> http://www.sun.com/download/products.xml?id=43208d3d >> but they are for SolarisSparc, SolarisX86, Linux, and Generic. >> Do I use the Generic one? >> If so, read on; otherwise redirect me. >> >> While using the Generic version, my attempt to run the BlackBox >> sample program >> elicits a message saying it "can't find javax.comm.properties". >> I found a note in the rxtx.org HowTo (for Linux) saying to create >> this thing in >> /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties >> but where should it go on the Mac? >> >> After reading many versions of documentation around, and updates >> and revisions and re-authorings, I have worked my way into a state >> of confusion and high uncertainty. Please release me. >> >> sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060827/b80d6389/attachment-0002.html From pete.flugstad at gmail.com Mon Aug 28 12:38:27 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 13:38:27 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE Message-ID: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Okay, my understanding is that originally, RTS meant "Request to Send" - the DTE (the PC) would assert this and the DCE (modem) would assert "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send data. This really only provided uni-directional flow control, from the PC to the modem. Now, as I understand it, the more modern usage of RTS is that it is used for the DTE to assert flow control back to the DCE - basically it means "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) raises this, then the DCE(modem) is free to send data to the DTE - this allows the DTE(PC) to exert flow control back towards the DCE(modem). This discussion is based on the Serial HOWTO from: and lots of other reading... Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which is defined as: > Enables RTS flow-control handshaking. The driver raises the RTS line, > enabling the DCE to send, when the input buffer has enough room to > receive data. The driver lowers the RTS line, preventing the DCE to > send, when the input buffer does not have enough room to receive > data. If this value is used, it is an error for the application to adjust > the line with EscapeCommFunction. which clearly reflects the newer usage style - it keeps the RTS line high as long as there is space to _receive_ data. And takes it low when the receive/input buffer is getting full to stop the modem from sending it data. Does this jive with other peoples understanding of RTS usage? Unfortunately, the hardware I'm trying to talk to wants to use the OLD style of RTS line usage. An existing Windows C++ program uses RTS_CONTROL_TOGGLE, which documentation states: > Specifies that the RTS line will be high if bytes are available for transmission. > After all buffered bytes have been sent, the RTS line will be low. If this value is > set, it would be an error for an application to adjust the line with > EscapeCommFunction. This value is ignored in Windows 95; it causes the > driver to act as if RTS_CONTROL_ENABLE were specified. This seems to be the OLD RTS behavior, right? So, what I seem to need is to be able to control the RTS line, either using TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS when getting ready to TX and clear it when the output buffer is empty). Does this make sense, or am I off in the weeds? Thanks, Pete From tjarvi at qbang.org Mon Aug 28 18:21:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 28 Aug 2006 18:21:10 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: On Mon, 28 Aug 2006, Pete Flugstad wrote: > Okay, my understanding is that originally, RTS meant "Request to Send" > - the DTE (the PC) would assert this and the DCE (modem) would assert > "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send > data. This really only provided uni-directional flow control, from the PC to > the modem. > > Now, as I understand it, the more modern usage of RTS is that it is used > for the DTE to assert flow control back to the DCE - basically it means > "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) > raises this, then the DCE(modem) is free to send data to the DTE - this > allows the DTE(PC) to exert flow control back towards the DCE(modem). > > This discussion is based on the Serial HOWTO from: > > > > and lots of other reading... > > Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > is defined as: > >> Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > > which clearly reflects the newer usage style - it keeps the RTS line high > as long as there is space to _receive_ data. And takes it low when the > receive/input buffer is getting full to stop the modem from sending it data. > > Does this jive with other peoples understanding of RTS usage? > > Unfortunately, the hardware I'm trying to talk to wants to use the OLD > style of RTS line usage. An existing Windows C++ program uses > RTS_CONTROL_TOGGLE, which documentation states: > >> Specifies that the RTS line will be high if bytes are available for transmission. >> After all buffered bytes have been sent, the RTS line will be low. If this value is >> set, it would be an error for an application to adjust the line with >> EscapeCommFunction. This value is ignored in Windows 95; it causes the >> driver to act as if RTS_CONTROL_ENABLE were specified. > > This seems to be the OLD RTS behavior, right? > > So, what I seem to need is to be able to control the RTS line, either using > TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS > when getting ready to TX and clear it when the output buffer is empty). > > Does this make sense, or am I off in the weeds? > Hi Pete OK. That sounds right. I do not know how you would communicate the difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through CommAPI as it stands. I take it you did not find anything either? Perhaps the best thing to do for your code is to toggle the RTS yourself. This could be a feature in the future JSR API perhaps. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 28 20:54:34 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 21:54:34 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <44F3AC6A.10908@gmail.com> Trent Jarvi wrote: > OK. That sounds right. I do not know how you would communicate the > difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through > CommAPI as it stands. I take it you did not find anything either? > > Perhaps the best thing to do for your code is to toggle the > RTS yourself. This could be a feature in the future JSR API perhaps. Yeah, this is what I ended up doing. I had to modify the dll in order to be able to set hardware flow control (which I do want), but leave the RTS flow control at RS_CONTROL_ENABLE. After that I just toggle setRTS(true) when I'm ready to send and setRTS(false) when I get a OUTPUT_BUFFER_EMPTY notification. Haven't tested with real hardware yet, but it seems to work OK. Thanks for the feedback! Pete From Bob_Jacobsen at lbl.gov Tue Aug 29 08:49:02 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 29 Aug 2006 07:49:02 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >is defined as: > > > Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > >which clearly reflects the newer usage style - it keeps the RTS line high >as long as there is space to _receive_ data. And takes it low when the >receive/input buffer is getting full to stop the modem from sending it data. > >Does this jive with other peoples understanding of RTS usage? Can you point to any devices that actually implement this "new" understanding? I think the person who wrote that documentation paragraph is just confused. The original "RTS/CTS" handshaking was extended to input (from DCE to DTE) handshaking via the DTR (Data Terminal Ready) line. I think the person who wrote the double-quoted paragraph above was just confused between the directions, and mixed them up. If you change "RTS" to "DTR" in that paragraph, you get: > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > enabling the DCE to send, when the input buffer has enough room to > > receive data. The driver lowers the DTR line, preventing the DCE to > > send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. which describes how dozens of devices actually work for controlling flow into the DTE (computer). This then leaves RTS/CTS (with RTS usually just stuck high) for controlling flow into the DCE (peripheral). Again, lots of hardware devices actually do this. I don't work on Windows, so can't be sure of what happens. But on the MacOS X version of RXTX, CTS low stops transmission, exactly as the "old" style would expect. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From mschned at basis.com Tue Aug 29 12:57:45 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 12:57:45 -0600 Subject: [Rxtx] Porting to AIX Message-ID: <01f201c6cb9d$034d4f20$341416ac@basis.com> Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar From mschned at basis.com Tue Aug 29 13:58:05 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 13:58:05 -0600 Subject: [Rxtx] Porting to AIX References: <01f201c6cb9d$034d4f20$341416ac@basis.com> Message-ID: <024901c6cba5$714c3560$341416ac@basis.com> After looking through the build messages closer, there is an error building SerialImp.c: gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type Looks like B57600 is not defined and there are no definitions for DEVICEDIR and LOCKDIR on AIX. Can I just a the following to SerialImp.h? #if defined(__aix__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __aix__ */ Mark Schnedar ----- Original Message ----- From: "Mark E. Schnedar" To: Sent: Tuesday, August 29, 2006 12:57 PM Subject: [Rxtx] Porting to AIX Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 29 15:25:35 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 29 Aug 2006 16:25:35 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <84d4a6d50608291425i1fb819d3i615cf9b85b1e9617@mail.gmail.com> On 8/29/06, Bob Jacobsen wrote: > Can you point to any devices that actually implement this "new" understanding? > > I think the person who wrote that documentation paragraph is just confused. The paragraph is from the Windows documentation of its DCB structure which is used to configure the Serial Device. This is what RXTX uses internally. My version is from MSDN, and Google finds the same text here: (search for fRtsControl). I have not seen any mention anywhere of it being incorrect (and yes, I did look, because I thought the same thing). My discussion is based on trying to use RXTX to talk to a device that used the old style of one-way flow control (RTS is raised to SEND data from the PC to the device). An existing VC++ app use the old-style RTS_CONTROL_TOGGLE. RXTX did not - it used the newer style RTS_CONTROL_HANDSHAKE, so things didn't work - the device was seeing RTS HIGH all the time, so it was thinking that the PC was ready to TX all the time. When I switch RXTX to using RTS_CONTROL_ENABLED and manually control RTS, then things work correctly. The behavior is consistent with this understanding if I hook two serial ports on Windows XP in lookback (via null modem). I'd be very surprised if this had not been corrected by M$ by this time. The same structure has been around since WinNT (mid 1990's) - their documentation is typically pretty good. > > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > > enabling the DCE to send, when the input buffer has enough room to > > > receive data. The driver lowers the DTR line, preventing the DCE to > > > send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. There is a seperate field, fDtrControl, which you can set to DTR_CONTROL_HANDSHAKE, that appears to do exactly this. > This then leaves RTS/CTS (with RTS usually just stuck high) for > controlling flow into the DCE (peripheral). Again, lots of hardware > devices actually do this. > > I don't work on Windows, so can't be sure of what happens. But on > the MacOS X version of RXTX, CTS low stops transmission, exactly as > the "old" style would expect. Well, the Linux Serial HOWTO is where I got most of my information. And yes, I thought it was wrong as well, but it's apparently how things are implemented: Donno - but it works for me... Pete From tjarvi at qbang.org Tue Aug 29 19:11:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 29 Aug 2006 19:11:40 -0600 (MDT) Subject: [Rxtx] Porting to AIX In-Reply-To: <024901c6cba5$714c3560$341416ac@basis.com> References: <01f201c6cb9d$034d4f20$341416ac@basis.com> <024901c6cba5$714c3560$341416ac@basis.com> Message-ID: Hi Mark That should do it. You can put ifdef around the B57600 as we did with higher baudrates. You may want to use tip, minicom, kermit or some other serial application on the AIX to confirm that the lockfiles created are correct. Neat stuff. On Tue, 29 Aug 2006, Mark E. Schnedar wrote: > After looking through the build messages closer, > there is an error building SerialImp.c: > > gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o > /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type > > Looks like B57600 is not defined and there are no > definitions for DEVICEDIR and LOCKDIR on AIX. > > Can I just a the following to SerialImp.h? > > #if defined(__aix__) > # define DEVICEDIR "/dev/" > # define LOCKDIR "/var/lock" > # define LOCKFILEPREFIX "LCK.." > # define FHS > #endif /* __aix__ */ > > Mark Schnedar > > > ----- Original Message ----- > From: "Mark E. Schnedar" > To: > Sent: Tuesday, August 29, 2006 12:57 PM > Subject: [Rxtx] Porting to AIX > > > Hi, > > I'm new to rxtx. Currently my company has an interpreter product > that uses rxtx on Windows and Linux. I am trying to get rxtx to > build on AIX. I downloaded rxtx, ran ./configure and make. When > I run make I get the following error: > > libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object > make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 > > Do you have any suggestions on how to fix this problem? > > I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error > on both systems). I did have our system administrator load > automake, autoconf, make (gnu), and gcc. Here are the versions: > > AIX 4.3.3 AIX 5.3.0 > rxtx: 2.1-7r2 2.1-7r2 > autoconf: 2.53 2.59 > automake: 1.5 1.8.5 > make: 3.79.1 3.80 > gcc: (used native cc) 4.0.0 > > Any help would be appreciated. > > Mark Schnedar > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From guille at sms.nl Wed Aug 30 01:14:32 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 09:14:32 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <7.0.1.0.0.20060830091204.03652de0@sms.nl> At 16:49 29/08/2006, Bob Jacobsen wrote: >At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > > > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >is defined as: > > > > > Enables RTS flow-control handshaking. The driver raises the RTS line, > >> enabling the DCE to send, when the input buffer has enough room to > >> receive data. The driver lowers the RTS line, preventing the DCE to > >> send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. > > > >which clearly reflects the newer usage style - it keeps the RTS line high > >as long as there is space to _receive_ data. And takes it low when the > >receive/input buffer is getting full to stop the modem from sending it data. > > > >Does this jive with other peoples understanding of RTS usage? > >Can you point to any devices that actually implement this "new" understanding? Many (most) of the embedded devices we work with implement this kind of flow control. The host (DTE) raises RTS when it can receive data, and lowers it when the input buffers are full. In turn it watches the CTS line to see whether it can send data to the DCE. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From tjarvi at qbang.org Wed Aug 30 01:23:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 30 Aug 2006 01:23:46 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830091204.03652de0@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 16:49 29/08/2006, Bob Jacobsen wrote: >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: >>> >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >>> is defined as: >>> >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, >>>> enabling the DCE to send, when the input buffer has enough room to >>>> receive data. The driver lowers the RTS line, preventing the DCE to >>>> send, when the input buffer does not have enough room to receive >>>> data. If this value is used, it is an error for the application to adjust >>>> the line with EscapeCommFunction. >>> >>> which clearly reflects the newer usage style - it keeps the RTS line high >>> as long as there is space to _receive_ data. And takes it low when the >>> receive/input buffer is getting full to stop the modem from sending it data. >>> >>> Does this jive with other peoples understanding of RTS usage? >> >> Can you point to any devices that actually implement this "new" understanding? > > Many (most) of the embedded devices we work with implement this kind of flow > control. The host (DTE) raises RTS when it can receive data, and lowers it > when the input buffers are full. In turn it watches the CTS line to see > whether it can send data to the DCE. > I think this explains some hardware control 'bugs' I've seen. -- Trent Jarvi tjarvi at qbang.org From guille at sms.nl Wed Aug 30 02:01:35 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 10:01:35 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> At 09:23 30/08/2006, Trent Jarvi wrote: >On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > > > At 16:49 29/08/2006, Bob Jacobsen wrote: > >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >>> > >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >>> is defined as: > >>> > >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, > >>>> enabling the DCE to send, when the input buffer has enough room to > >>>> receive data. The driver lowers the RTS line, preventing the DCE to > >>>> send, when the input buffer does not have enough room to receive > >>>> data. If this value is used, it is an error for the > application to adjust > >>>> the line with EscapeCommFunction. > >>> > >>> which clearly reflects the newer usage style - it keeps the RTS line high > >>> as long as there is space to _receive_ data. And takes it low when the > >>> receive/input buffer is getting full to stop the modem from > sending it data. > >>> > >>> Does this jive with other peoples understanding of RTS usage? > >> > >> Can you point to any devices that actually implement this "new" > understanding? > > > > Many (most) of the embedded devices we work with implement this > kind of flow > > control. The host (DTE) raises RTS when it can receive data, and lowers it > > when the input buffers are full. In turn it watches the CTS line to see > > whether it can send data to the DCE. > > > >I think this explains some hardware control 'bugs' I've seen. I think the above is the most widespread use, but that may just mean it is the most widespread use in our specific segment (embedded systems). Some UART chips (e.g. from Exar) implement this kind of flow control directly in hardware. For example the Exar can be configured to suspend transmission when it sees CTS low, and resume transmission when it sees CTS high. This is also consistent with our experience. Maybe this helps clarify: http://www.tldp.org/HOWTO/Text-Terminal-HOWTO-10.html#ss10.7 Note the "Old RTS/CTS handshaking is different" section, which refers to "older terminals" whereas newer equipment would use RTS/CTS flow control (or equivalently DTR/DTS) as described above. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From Bob_Jacobsen at lbl.gov Wed Aug 30 07:55:31 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 30 Aug 2006 06:55:31 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> <7.0.1.0.0.20060830095557.0374ff28@sms.nl> Message-ID: I think we all agree that CTS inactive means "Send no more from DTE to DCE". The question is how to express the other direction, "Send no more from DCE to DTE". There are two parts to this question: What do various DTE-like devices do, and what do various DCE-like devices expect? Electrically, the lines that go that direction are DTR, DCD, and RTS (plus some special-purpose lines that are rarely present). All three devices I work most with respect the DTR lead. On the other hand, the FTDI chips for doing serial over USB provide either (RTS and CTS) or (DTR and DSR) as the two leads. What we're probably seeing is two different approaches, that have propagated separately. That's a problem. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From Pawan.Kharbanda at dot.state.co.us Wed Aug 30 09:07:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 30 Aug 2006 09:07:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0455E5E5@hqexchange3.dot.state.co.us> Trent, Sorry for not responding earlier to your email. I was actually waiting for the release of our software on the new Hardware. As I mentioned in my previous emails, RXTX crashes and locks up serial ports with the older version of Redhat (Linux 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:28:55 EDT 2005 i686 i686 i386 GNU/Linux), it might work ok if you are using one or 2 ports but anything more than that it has issues. I was using JDK1.5.0_06 and older firmwares of Digi boxes. Let me know if you need any more specific information of the older system. Thanks Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Thursday, August 10, 2006 5:40 AM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even > after 10000 operations (now I am trying 100,000 :). This is all with > the original RXTX 2.1.7 (final) api's without any of my fixes that I > have been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying > the RXTX saying the suggested kernel for Redhat Linux is > 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Aug 1 01:11:30 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 1 Aug 2006 09:11:30 +0200 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <34B6BC40-1405-4A13-8054-0FC6CE10466A@buechse.de> This is a problem with lock files. You should find it somewhere in the documentation... On 01.08.2006, at 03:53, Richard P. Welty wrote: > trying to get my app running on a Mac OS X powerbook, when > the following is executed as the first thing inside the > run method of a Thread: > > > try { > port = (SerialPort) selectedPort.open( > this.getClass().getName(), 2000); > } catch ( PortInUseException ex){ > ex.printStackTrace(); > return; > } > > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java: > 354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run > (ScaleWatcher.java:143) > > i've not seen any documentation suggesting that rxtx would be finicky > about application names... > > thanks for any suggestions, > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From rwelty at suespammers.org Tue Aug 1 05:37:53 2006 From: rwelty at suespammers.org (Richard P. Welty) Date: Tue, 01 Aug 2006 07:37:53 -0400 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <44CF3D11.9060108@suespammers.org> Richard P. Welty wrote: > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) Aha, a confusing error message. it's really a lock file problem; the code is trying to fill in the application name but when it's getting "Unknown Application" and filling that in... richard From ajmas at sympatico.ca Tue Aug 1 13:10:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:10:59 -0400 Subject: [Rxtx] Application Name? Message-ID: <20060801191059.HFCD18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> You need the source code in CVS. The forth coming 2.18 will correct this, but currently the only place to find the correction is in CVS. No idea when 2.18 is due. > > From: "Richard P. Welty" > Date: 2006/08/01 Tue AM 07:37:53 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Application Name? > > Richard P. Welty wrote: > > > i get the following: > > > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > at > > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) > > Aha, a confusing error message. it's really a lock file problem; the > code is trying to fill in the application name but when it's getting > "Unknown Application" and filling that in... > > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:15:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:15:57 -0400 Subject: [Rxtx] Do interfaces break backwards compatibility? Message-ID: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> It is the class that decides to add serializable that needs to worry about those issues. For the most part serial ports and their connection states should be considered as transient, since there is no guarantee they will still be present or that their state will be, especially in a USB world. What you can store is the port settings and port id and then simply test for port availability next time. Nothing else should be assumed. > > From: Gregg Wonderly > Date: 2006/07/31 Mon PM 01:21:19 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Do interfaces break backwards compatibility? > > Doug Berkland wrote: > > As far as I can tell, nothing in either RXTX or Sun's JavaCOMM > > implements Serializable. Therefore, there are no worries from that > > either. (I can't think of a reason anything in JavaCOMM should > > implement Serializable either.) > > Any interface in javax.comm can become implemented by a serializable object. > Thus, if someone wants to provide remote access to a serial port, then they > might (and I think this is not wise) choose to subclass and add Serializable to > the interface list. > > It's that kind of Serialization compatibility that I'm talking about. > > Gregg Wonderly > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:18:11 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:18:11 -0400 Subject: [Rxtx] precompiled for Intel Mac? Message-ID: <20060801191811.FLJY27612.tomts16-srv.bellnexxia.net@smtp1.sympatico.ca> > > From: Joachim Buechse > There will be. However not before we have figured out some remaining issues. What issues are remaining? Andre From Pawan.Kharbanda at dot.state.co.us Tue Aug 1 16:55:08 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 1 Aug 2006 16:55:08 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Hi, I am also experiencing occasional JVM crash thru the native code. I am attaching the log from the crash. Any ideas what might be causing it???? Regards Pawan Kharbanda # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # --------------- T H R E A D --------------- Current thread (0x8d000480): JavaThread "Thread-119" [_thread_in_native, id=111 51] siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba Registers: EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 Top of Stack: (sp=0x8d3482b8) 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 0x8d348308: 00000000 00000002 00000000 00000000 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 Instructions: (pc=0xb75e39b2) 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~StubRoutines::call_stub V [libjvm.so+0x2607ec] V [libjvm.so+0x423828] V [libjvm.so+0x260045] V [libjvm.so+0x2600de] V [libjvm.so+0x2d7745] V [libjvm.so+0x4c2ba3] V [libjvm.so+0x424338] C [libpthread.so.0+0x4dd8] 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 ) =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, id=11026] 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, id=11023] From tjarvi at qbang.org Tue Aug 1 18:46:21 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 1 Aug 2006 18:46:21 -0600 (MDT) Subject: [Rxtx] JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Message-ID: On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) > C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] > 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, > id=11034] > 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, > id=11033] > 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, > id=11032] > 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, > id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] > 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, > id=11028] > 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, > id=11027] > 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, > id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] > 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- Index: termios.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/termios.c,v retrieving revision 1.9.2.57 diff -u -r1.9.2.57 termios.c --- termios.c 4 Jun 2006 02:50:01 -0000 1.9.2.57 +++ termios.c 11 Jun 2006 21:51:10 -0000 @@ -1048,26 +1048,29 @@ if ( !first_tl ) { port->prev = NULL; + port->next = NULL; first_tl = port; } else { - while ( index->next ) + while ( ( index->fd < port->fd ) && index->next ) index = index->next; - if ( port == first_tl ) + if ( index->fd > port->fd ) { - port->prev = NULL; - port->next = first_tl; - first_tl->prev = port; - first_tl = port; + /* inserting previously closed fd */ + port->prev = index->prev; + port->next=index + index->prev->next = port; + index->prev = port; } else { + /* adding to end of list */ port->prev = index; + port->next = NULL; index->next = port; } } - port->next = NULL; LEAVE( "add_port" ); return port; From gergg at cox.net Tue Aug 1 23:25:19 2006 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 02 Aug 2006 00:25:19 -0500 Subject: [Rxtx] Do interfaces break backwards compatibility? In-Reply-To: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <44D0373F.7020600@cox.net> Andre-John Mas wrote: > It is the class that decides to add serializable that needs to worry about those issues. > For the most part serial ports and their connection states should be considered as > transient, since there is no guarantee they will still be present or that their state > will be, especially in a USB world. Right, but when you provide an interface as the standard, that opens the doors for a lot more interpretation and variation. An abstract class can indicate a lot more about what the expected implementation is. Gregg Wonderly From lyon at docjava.com Wed Aug 2 06:02:15 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:02:15 -0400 Subject: [Rxtx] jsr spec and license issues Message-ID: Hi All, Trent and I have been discussing the license issues of the JSR spec and code that we develop, as a community. Here is what we have come up with: >During the development, the new JSR spec that we derive >will be >covered under the LGPL license. Since it is >just interfaces, any contributions will come back to me, for inclusion >into the specification. The goal is to provide a detailed set of >interfaces that >document the present state of our reference model. I am using >the RXTX as the reference model. If there is something missing from >the reference model, or if the reference model has something that should >not be there, we will need to discuss it. > >After Sun accepts the JSR, I, as the copyright holder, can issue >a version with a JSR compatible license. > >The goal is to migrate the interfaces into javax.comm. Does this sound like a reasonable plan to everyone? Thanks! - Doug From joachim at buechse.de Wed Aug 2 06:21:03 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 14:21:03 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Good day, quite frankly I think that this is a very bad idea. This specification (!) should be in the public domain and nowhere else. Defining a spec under the (L)GPL makes absolutely no sense. After all it is a specification not an implementation. There is no or only trivial code attached to it. So while nothing can be gained by putting it under the LGPL, a lot can be lost - for example the contribution of companies that do not like to open source their implementations. Furthermore you are plain wrong assuming you will be the copyright holder to additions made by other people. Best regards, Joachim On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for >> inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that >> should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Aug 2 06:39:28 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:39:28 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Hi All, I don't know anything about licensing issues. The below sounds reasonable. If we make this public domain, will that be compatible with Sun's JSR? Thanks! - DL P.S. I really don't care what we do, as long as there is some sort of collective agreement. >Good day, > >quite frankly I think that this is a very bad idea. This specification >(!) should be in the public domain and nowhere else. > >Defining a spec under the (L)GPL makes absolutely no sense. After all? >it is a specification not an implementation. There is no or only? >trivial code attached to it. So while nothing can be gained by? >putting it under the LGPL, a lot can be lost - for example the? >contribution of companies that do not like to open source their? >implementations. > >Furthermore you are plain wrong assuming you will be the copyright? >holder to additions made by other people. > >Best regards, >Joachim > > >On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for? >>> inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that? >>> should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> >> Does this sound like a reasonable plan to everyone? >> >> Thanks! >> - Doug >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 07:50:09 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 10:50:09 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D0AD91.4080103@gmail.com> Hi, I have been searching the web and here it is: http://jcp.org/en/resources/license_reference Here there is a list of the licenses that are compatible with the JCP for JSR submitting. I think that Apache, CDDL, CPL and OSL are the one that are compatible with our needs. But I think that Apache is the best for us, Doug why do not make a votation? Regards, Manuel > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. > >> Good day, >> >> quite frankly I think that this is a very bad idea. This specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From lyon at docjava.com Wed Aug 2 08:10:55 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 10:10:55 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D0AD91.4080103@gmail.com> References: <44D0AD91.4080103@gmail.com> Message-ID: Hi All, I have no objection to an Apache license for the JSR interfaces that we produce. Would anyone care to comment? Joachim: Does this address your public domain concerns? How does this impact the reference implementation (i.e. RXTX)? Thanks! - DL >Hi, >I have been searching the web and here it is: >http://jcp.org/en/resources/license_reference >Here there is a list of the licenses that are compatible with the JCP >for JSR submitting. >I think that Apache, CDDL, CPL and OSL are the one that are compatible >with our needs. >But I think that Apache is the best for us, Doug why do not make a votation? >Regards, >Manuel > >> Hi All, >> I don't know anything about licensing issues. >> The below sounds reasonable. If we make this public domain, >> will that be compatible with Sun's JSR? >> Thanks! >> - DL >> P.S. I really don't care what we do, as long as there is >> some sort of collective agreement. >>?? >>> Good day, >>> >>> quite frankly I think that this is a very bad idea. This specification >>> (!) should be in the public domain and nowhere else. >>> >>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>> it is a specification not an implementation. There is no or only >>> trivial code attached to it. So while nothing can be gained by >>> putting it under the LGPL, a lot can be lost - for example the >>> contribution of companies that do not like to open source their >>> implementations. >>> >>> Furthermore you are plain wrong assuming you will be the copyright >>> holder to additions made by other people. >>> >>> Best regards, > >> Joachim >>> >>> >>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>> >>>???? >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>?????? >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for >>>>> inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that >>>>> should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>>>???????? >>>> Does this sound like a reasonable plan to everyone? >>>> >>>> Thanks! >>>> - Doug >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>?????? >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>???? >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 08:20:29 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 11:20:29 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D0AD91.4080103@gmail.com> Message-ID: <44D0B4AD.2050106@gmail.com> Doug; > How does this impact the reference implementation (i.e. RXTX)? > Fuck I have not thinked about that, we would need that everyone who had colaborated with RXTX and have putted code on it to agree a license chaging. Or start from sractch. I don't know if Trent have the right to do that. Regards, Manuel > > >> Hi, >> I have been searching the web and here it is: >> http://jcp.org/en/resources/license_reference >> Here there is a list of the licenses that are compatible with the JCP >> for JSR submitting. >> I think that Apache, CDDL, CPL and OSL are the one that are compatible >> with our needs. >> But I think that Apache is the best for us, Doug why do not make a votation? >> Regards, >> Manuel >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> >> >> Joachim >> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 08:21:15 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 16:21:15 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Putting something in the public domain means, that it can be used by anyone for whatever (s)he thinks is appropriate. The authors define no restriction regarding it's use. That's how any specification should be. Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From berkland at spamcop.net Wed Aug 2 08:50:50 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 10:50:50 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> You may want to consider making it available under two separate licenses. 1 - LGPL as it is today The LGPL can be used by anyone wanting to extend the current functionality, as long as they provide code for anything they change. 2 - Sun Community Source License (SCSL) http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf The SCSL will allow anyone who wants to do a closed source implementation from the ground up to do so, if I'm reading it correctly, as long as they don't use any of the code from the Reference Implementation. This will satisfy any company that wants to have a closed-source implementation, but not help them out very much. On 8/2/06, Joachim Buechse wrote: > Putting something in the public domain means, that it can be used by > anyone for whatever (s)he thinks is appropriate. The authors define > no restriction regarding it's use. That's how any specification > should be. > > Best regards, > Joachim > > > On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > > > Hi All, > > I don't know anything about licensing issues. > > The below sounds reasonable. If we make this public domain, > > will that be compatible with Sun's JSR? > > Thanks! > > - DL > > P.S. I really don't care what we do, as long as there is > > some sort of collective agreement. > >> Good day, > >> > >> quite frankly I think that this is a very bad idea. This > >> specification > >> (!) should be in the public domain and nowhere else. > >> > >> Defining a spec under the (L)GPL makes absolutely no sense. After all > >> it is a specification not an implementation. There is no or only > >> trivial code attached to it. So while nothing can be gained by > >> putting it under the LGPL, a lot can be lost - for example the > >> contribution of companies that do not like to open source their > >> implementations. > >> > >> Furthermore you are plain wrong assuming you will be the copyright > >> holder to additions made by other people. > >> > >> Best regards, > >> Joachim > >> > >> > >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> > >>> Hi All, > >>> Trent and I have been discussing the license issues of the > >>> JSR spec and code that we develop, as a community. > >>> Here is what we have come up with: > >>> > >>>> During the development, the new JSR spec that we derive > >>>> will be > >>>> covered under the LGPL license. Since it is > >>>> just interfaces, any contributions will come back to me, for > >>>> inclusion > >>>> into the specification. The goal is to provide a detailed set of > >>>> interfaces that > >>>> document the present state of our reference model. I am using > >>>> the RXTX as the reference model. If there is something missing > >>>> from > >>>> the reference model, or if the reference model has something that > >>>> should > >>>> not be there, we will need to discuss it. > >>>> > >>>> After Sun accepts the JSR, I, as the copyright holder, can issue > >>>> a version with a JSR compatible license. > >>>> > >>>> The goal is to migrate the interfaces into javax.comm. > >>> > >>> Does this sound like a reasonable plan to everyone? > >>> > >>> Thanks! > >>> - Doug > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From naranjo.manuel at gmail.com Wed Aug 2 09:03:02 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 12:03:02 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> References: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> Message-ID: <44D0BEA6.2040408@gmail.com> Or even better, you can use Apache v2, which allows both Open Source and Closed Source forms ;-) > You may want to consider making it available under two separate licenses. > > 1 - LGPL as it is today > > The LGPL can be used by anyone wanting to extend the current > functionality, as long as they provide code for anything they change. > > 2 - Sun Community Source License (SCSL) > http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf > > The SCSL will allow anyone who wants to do a closed source > implementation from the ground up to do so, if I'm reading it > correctly, as long as they don't use any of the code from the > Reference Implementation. This will satisfy any company that wants to > have a closed-source implementation, but not help them out very much. > > On 8/2/06, Joachim Buechse wrote: > >> Putting something in the public domain means, that it can be used by >> anyone for whatever (s)he thinks is appropriate. The authors define >> no restriction regarding it's use. That's how any specification >> should be. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This >>>> specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> Joachim >>>> >>>> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing >>>>>> from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 09:46:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 17:46:25 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> I assume that javax.comm/RXTX is to be redefined using Interfaces. In this case we should separate 2 things: 1) The specification and it's incarnation in the form of java classes defining the interfaces. 2) The actual implementation of the functionality. It is possible that 1) may contain some trivial code in abstract or none abstract classes (ie PortFactory, PortRegistry, etc). Doug's original question was regarding 1) - unless I misunderstood. I personally think that 1) should be in the public domain. It should not be covered by any restrictions what-so-ever. Let it be free as in "totally free in any respect". I do not care under which license 2) is released. Why? Because it is in my very interest that all/almost all vendors include implementations with their distributions. Which will only happen if they do not need to respect open source licenses. (javax.comm is not nearly as important as the Apache web server or MySql, so nobody will take licensing risks). Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ssbello at gmail.com Wed Aug 2 10:28:30 2006 From: ssbello at gmail.com (Simone) Date: Wed, 2 Aug 2006 18:28:30 +0200 Subject: [Rxtx] pocketPC 2003 Message-ID: <39ed505d0608020928k6ceb01aen470c2e6a78c5a6b0@mail.gmail.com> Does anyone know if the Rxtx works on PocketPc 2003? If yes, could you, please, give me some suggestion. Thanks, Simone Bell? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/72e0fb87/attachment-0003.html From berkland at spamcop.net Wed Aug 2 13:00:10 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 15:00:10 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> Message-ID: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> How about these for the "Business Terms" of the new JSR: > The specification will be released in accordance with standard terms > as specified by the JCP process. > > The reference implementation (RI) will be delivered in binary form > free of charge from http://rxtx.org. Licensing details are expected to > be under the Binary Code License (BCL). > > The source for the reference implementation is expected to be > delivered via the Limited GNU Public License (LGPL) and available free > of charge. > > The TCK will be made available free of charge to all J2SE and J2EE licensees. > > The TCK will be offered for license at no charge, without support or > any trademark license rights, to qualified not-for-profit entities > (including not-for-profit) academic institutions) and qualified > individuals engaged in efforts to create compatible implementations of > the Specification. From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 13:13:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 13:13:33 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E495@hqexchange3.dot.state.co.us> Trent, I didn't exactly get it. Again I am not a C guy, maybe its very simple for you but I don't see any checks for FD (as written in the patch for termios.c) in the initialise_event_info_struct, I see some checks in the interruptEventLoop call. Second as you explained I open three("/dev/cuf01","/dev/cuf01","/dev/cuf01") ports, I close the 2nd ("/dev/cuf02", the other 2 are still open) , I never try to open the third ("/dev/cuf03") port again if it is already open. Are you planning to have a fix for this in the next release 2.1.8. Its very important for me to have a fix for this, its causing some major headaches for our project. I know you have your regular job too, I will appreciate any help. Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, August 01, 2006 6:46 PM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java > VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic > frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) C [librxtxSerial.so+0x69b2] > initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] > Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" > [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: > /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread > "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 > JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon > [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" > daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread > "AdapterThread" daemon [_thread_blocked, id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, > id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Wed Aug 2 13:14:20 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 16:14:20 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> Message-ID: <44D0F98C.1070600@gmail.com> +1 Agree > How about these for the "Business Terms" of the new JSR: > > >> The specification will be released in accordance with standard terms >> as specified by the JCP process. >> >> The reference implementation (RI) will be delivered in binary form >> free of charge from http://rxtx.org. Licensing details are expected to >> be under the Binary Code License (BCL). >> >> The source for the reference implementation is expected to be >> delivered via the Limited GNU Public License (LGPL) and available free >> of charge. >> >> The TCK will be made available free of charge to all J2SE and J2EE licensees. >> >> The TCK will be offered for license at no charge, without support or >> any trademark license rights, to qualified not-for-profit entities >> (including not-for-profit) academic institutions) and qualified >> individuals engaged in efforts to create compatible implementations of >> the Specification. >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From savagobr at yahoo.com Wed Aug 2 13:40:42 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:40:42 -0700 (PDT) Subject: [Rxtx] jsr spec and license issues Message-ID: <20060802194042.83599.qmail@web53807.mail.yahoo.com> Friends Apache seems ok... if I get it right, does it *almost* equals to BSD? Regarding public domain: I think that the good people that spent so much time on this library will like to keep some rights over its own work, don't you think? Best regards Savago --------------------------------- Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/79abdfd5/attachment-0003.html From savagobr at yahoo.com Wed Aug 2 13:58:04 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:58:04 -0700 (PDT) Subject: [Rxtx] JVM Crashing Message-ID: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago --------------------------------- Groups are talking. We´re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/47d561ae/attachment-0003.html From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 14:09:18 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 14:09:18 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E4AD@hqexchange3.dot.state.co.us> Thank You :) ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adenilson Cavalcanti Sent: Wednesday, August 02, 2006 1:58 PM To: rxtx at qbang.org Subject: Re: [Rxtx] JVM Crashing Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago ________________________________ Groups are talking. We?re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/b4eb22cf/attachment-0003.html From tjarvi at qbang.org Wed Aug 2 20:23:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 20:23:42 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > Hi Doug As mentioned off the list, the important point in my mind is that everyone is on the same base more than what license is decided upon. These things are just best addressed early so there isn't confusion. The Apache license is fairly standard in the Open Source community vs several of the relatively unknown [and obviously redundat even by their descriptions] offerings by Sun. Perhaps one option here that would kill a few birds with one stone is to dual license the interface as Apache and LGPL. This would allow everyone to use the interfaces without needing to do wastefull work for internal license requirements. Projects could choose between the two the license that best suits their needs. If there is a software shop doing Java that isn't familiar with the Apache license, they must be doing some strange Java. I do think it is foolhearty to blindly travel in public domain but nobody is trying to undermine the spec files. The intent is to use the work for a JSR submission that everyone can use without confusion later on down the line. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 21:01:16 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 20:01:16 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D166FC.9090005@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> Does this sound like a reasonable plan to everyone? >> > > Hi Doug > > As mentioned off the list, the important point in my mind is that everyone > is on the same base more than what license is decided upon. These things > are just best addressed early so there isn't confusion. > > The Apache license is fairly standard in the Open Source community vs > several of the relatively unknown [and obviously redundat even by > their descriptions] offerings by Sun. The JCP is a reasonable process for what the RxTx project intends to achieve by evolving the API. There isn't much to lose by going the JSR route. The community will benefit from a fair API like so many other that have undergone the process. Sun isn't going to own the API or manipulate it into anything weird anymore than anyone else is. I think your fears are rather vague and unfounded. Which isn't to say that I am a well-informed representative of the JCP, I've only sat through one JSR process and we ended up with javax.usb, and IBM got what it wanted out of the deal and the community got a very nice standard. Paul > > Perhaps one option here that would kill a few birds with one stone is to > dual license the interface as Apache and LGPL. This would allow everyone > to use the interfaces without needing to do wastefull work for internal > license requirements. Projects could choose between the two the license > that best suits their needs. If there is a software shop doing Java that > isn't familiar with the Apache license, they must be doing some strange > Java. > > I do think it is foolhearty to blindly travel in public domain but nobody > is trying to undermine the spec files. The intent is to use the work for > a JSR submission that everyone can use without confusion later on down the > line. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Aug 2 22:10:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 22:10:48 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D166FC.9090005@sun.com> References: <44D166FC.9090005@sun.com> Message-ID: On Wed, 2 Aug 2006, Paul Klissner wrote: > Trent Jarvi wrote: >> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> Does this sound like a reasonable plan to everyone? >>> >> >> Hi Doug >> >> As mentioned off the list, the important point in my mind is that everyone >> is on the same base more than what license is decided upon. These things >> are just best addressed early so there isn't confusion. >> >> The Apache license is fairly standard in the Open Source community vs >> several of the relatively unknown [and obviously redundat even by >> their descriptions] offerings by Sun. > > The JCP is a reasonable process for what the RxTx project intends > to achieve by evolving the API. > > There isn't much to lose by going the JSR route. The community will > benefit from a fair API like so many other that have undergone > the process. Sun isn't going to own the API or manipulate it > into anything weird anymore than anyone else is. I think your > fears are rather vague and unfounded. > > Which isn't to say that I am a well-informed representative > of the JCP, I've only sat through one JSR process and we ended > up with javax.usb, and IBM got what it wanted out of the deal > and the community got a very nice standard. > Hi Paul The JCP should work fine. As our intentions are in line, licensing so that everyone can use the interface code should not be a problem. Note that the current default right now is that the interfaces are copyrighted and no license for distribution is included. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 22:33:51 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 21:33:51 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D166FC.9090005@sun.com> Message-ID: <44D17CAF.1090802@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Paul Klissner wrote: > >> Trent Jarvi wrote: >>> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>> Does this sound like a reasonable plan to everyone? >>>> >>> Hi Doug >>> >>> As mentioned off the list, the important point in my mind is that everyone >>> is on the same base more than what license is decided upon. These things >>> are just best addressed early so there isn't confusion. >>> >>> The Apache license is fairly standard in the Open Source community vs >>> several of the relatively unknown [and obviously redundat even by >>> their descriptions] offerings by Sun. >> The JCP is a reasonable process for what the RxTx project intends >> to achieve by evolving the API. >> >> There isn't much to lose by going the JSR route. The community will >> benefit from a fair API like so many other that have undergone >> the process. Sun isn't going to own the API or manipulate it >> into anything weird anymore than anyone else is. I think your >> fears are rather vague and unfounded. >> >> Which isn't to say that I am a well-informed representative >> of the JCP, I've only sat through one JSR process and we ended >> up with javax.usb, and IBM got what it wanted out of the deal >> and the community got a very nice standard. >> > > Hi Paul > > The JCP should work fine. As our intentions are in line, licensing so > that everyone can use the interface code should not be a problem. Sorry, looks like my concerns were unfounded. I haven't been following the threads closely this week, as work got busy with an escalated issue and new project. Sorry about that. > > Note that the current default right now is that the interfaces are > copyrighted and no license for distribution is included. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Aug 3 03:45:56 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 03 Aug 2006 05:45:56 -0400 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: Hi All, I have been waiting a day for things to cool down. Licensing appears to be a hot-button topic. I have no objection to dual license the interfaces as both Apache and LGPL. Some thoughts: Goal: developers wish to work together on a common piece of code that the team needs. It makes sense that the code base they work on should be Apache-licensed. That makes it possible for the team to use and develop common code, even if the end result is LGPL'd as a whole. If we combine licenses, we must follow the terms of both licenses when distributing the combined work. Thus, the dual license contains the super set of terms in the licenses of Apached and LGPL. This should address concern about using Apache-licensed code within LGPL projects due to the FSF's claim that they are incompatible. Here is a draft statement for RXSL: The RXTX Specification Library (RXSL) uses a dual license strategy for the source code. These licenses are the GNU Lesser General Public License (LGPL) and the Apache License. I strongly encourage users to use the LGPL license and participate fully in the free software community. Dual licensing of the RXSL source code provides open and free access to the technology both for the GPL community and for other developers or companies that cannot use the GPL. Dual license is common practice in open source projects like OpenOffice, Perl and Mozilla. Through the combined use of LGPL and Apache license, developers will have a high degree of freedom yet compatibility and interoperability will be preserved. You can freely modify, extend, and improve the RXSL source code. The only question is whether or not you must provide the source code and contribute modifications to the community. The GNU and Apache licenses allow different ranges of flexibility in this regard, but in the end, regardless of the license used, any and all incompatible changes must be published openly. Note that there is the RXTX Reference Model that uses the org.rxtx package, which itself is protected by the LGPL. This may be part of the distribution, however, it can not be redistributed using a different license. Is everybody OK with this? Thanks Trent, great idea! - Doug From joachim at buechse.de Thu Aug 3 04:15:44 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 3 Aug 2006 12:15:44 +0200 Subject: [Rxtx] JVM Crashing In-Reply-To: <20060802195804.70935.qmail@web53812.mail.yahoo.com> References: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Message-ID: <6ABA2AB2-CECE-4C4B-A7D6-0CDF8B9C95A8@buechse.de> I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of > rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jvermillard at archean.fr Thu Aug 3 04:26:48 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Thu, 03 Aug 2006 12:26:48 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <1154600808.16732.18.camel@localhost.localdomain> Hi, I'm a developer of the Apache MINA framework. It's a network application framework which helps users develop high performance and high scalability network applications easily. http://directory.apache.org/subprojects/mina/index.html . I would like to integrate serial connection to the framework (actualy supporting TCP, UDP (broadcast) and in VM communications), but LGPL is an issue for me. An Apache License would be pretty usefull for me and integrate rxtx functionnalities easly. Thanks, Julien Le jeudi 03 ao?t 2006 ? 05:45 -0400, Dr. Douglas Lyon a ?crit : > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/755cca7f/smime-0003.bin From pascal at quies.net Thu Aug 3 04:32:35 2006 From: pascal at quies.net (Pascal S. de Kloe) Date: Thu, 3 Aug 2006 12:32:35 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <200608031232.35838.pascal@quies.net> Hi Doug, The Apache license is unnessesary complex. It puts all kinds of limitations on the usage. Is there a particular reason why people chose this or was it just the familiar name? I agree with Joachim (again) that the specification and the interfaces should be public domain. However, if we realy need a license then have a look at the X11 license because that one is compatible with the GPL and suits our needs: http://www.fsf.org/licensing/licenses/index_html http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3 ---- start: implementation Copyright (C) 2006 Sun Microsystems, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Sun Microsystems shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Sun Microsystems. Java is a trademark of Sun Microsystems, Inc. ---- end Op donderdag 3 augustus 2006 11:45, schreef Dr. Douglas Lyon: > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Aug 3 05:17:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 05:17:07 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154600808.16732.18.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: On Thu, 3 Aug 2006, Julien Vermillard wrote: > Hi, > > I'm a developer of the Apache MINA framework. It's a network application > framework which helps users develop high performance and high > scalability network applications easily. > http://directory.apache.org/subprojects/mina/index.html . I would like > to integrate serial connection to the framework (actualy supporting TCP, > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > An Apache License would be pretty usefull for me and integrate rxtx > functionnalities easly. > > Thanks, > > Julien > Hi Julien The rxtx license itself will not change. This is just the interface. You would be free to implement an rxtx replacement if the LGPL low level code is a problem for you. These licensing details would make it possible to take the interface code instead of needing to recode them for a new project. You are probably confusing the license problems with the GPL not the LGPL though you can share links to concerns off the list if you would like to go through them. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 11:59:48 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 11:59:48 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E516@hqexchange3.dot.state.co.us> Joachim, I think my both problems (JVM crashing & Port Locking) are being caused by the corruption of "Event Info Struct / EIS" I have noticed with in EIS my "FD" and "Closing" value being overwritten. The problem is definitely in SerialImp.c file. I am trying to understand what the code does and try to pin point the problem by trying few other options. I will keep everybody posted. Regards Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Joachim Buechse Sent: Thursday, August 03, 2006 4:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Thu Aug 3 13:50:07 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 14:50:07 -0500 Subject: [Rxtx] slow startup Message-ID: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete From brian at mbari.org Thu Aug 3 14:05:57 2006 From: brian at mbari.org (Brian Schlining) Date: Thu, 3 Aug 2006 13:05:57 -0700 Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> References: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Message-ID: Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B > Greetings, > I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/ > qbang.org). > > In testing things out, I ran the list ports example from the Wiki, > and it seems to take quite a while for the library to initialize? > Like on the order of 30+ seconds or so after startup (and the RXTX > banner prints), and before the application starts running. > > Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then > I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ > terminal server) and I'm wondering if they are not responding properly > and this is causing the slow startup? Or is this a known problem of > some kind, or maybe something on my system is screwy? > > Thanks, > Pete > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/6123f730/attachment-0003.html From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 14:13:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 14:13:47 -0600 Subject: [Rxtx] slow startup Message-ID: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Hi Pete, RXTX does open and close the ports in Windows. Try downloading utility like PORTMON(only for windows) and you can see that whenever you load RXTX it tries to register all the available COMM ports in the system. It is a little slow if you have virtual ports, we use digi as a terminal server, Its going to get worst of you have comm ports in 100's Thanks Pawan Kharbanda ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Brian Schlining Sent: Thursday, August 03, 2006 2:06 PM To: RXTX Developers and Users Subject: Re: [Rxtx] slow startup Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/94fd105d/attachment-0003.html From pete.flugstad at gmail.com Thu Aug 3 14:32:04 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 15:32:04 -0500 Subject: [Rxtx] slow startup In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Message-ID: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> On 8/3/06, Kharbanda, Pawan wrote: > RXTX does open and close the ports in Windows. Try downloading utility > like PORTMON(only for windows) and you can see that whenever you load RXTX > it tries to register all the available COMM ports in the system. It is a > little slow if you have virtual ports, we use digi as a terminal server, Its > going to get worst of you have comm ports in 100's Okay, I can understand that, but from the PORTMON output, it looks like it's opening each port TWICE: 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS ... 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS Also, assuming instead of listing the ports I wanted to just open one, I'm still seeing the 30 second delay, so it's scanning at startup regardless of what the Java code is going to do. Probably necessary, but annoying. I know, I know, contribute patches... :-) Thanks, Pete From tjarvi at qbang.org Thu Aug 3 15:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 15:04:42 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: On Thu, 3 Aug 2006, Pete Flugstad wrote: > On 8/3/06, Kharbanda, Pawan wrote: >> RXTX does open and close the ports in Windows. Try downloading utility >> like PORTMON(only for windows) and you can see that whenever you load RXTX >> it tries to register all the available COMM ports in the system. It is a >> little slow if you have virtual ports, we use digi as a terminal server, Its >> going to get worst of you have comm ports in 100's > > Okay, I can understand that, but from the PORTMON output, it looks > like it's opening each port TWICE: > > 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > ... > 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > > Also, assuming instead of listing the ports I wanted to just open one, > I'm still seeing the 30 second delay, so it's scanning at startup > regardless of what the Java code is going to do. Probably necessary, > but annoying. > > I know, I know, contribute patches... :-) > I think this problem is in RXTXCommDriver.java. I've just not tracked it down but it should be in the java code, not the native code so easy enough to track down. -- Trent Jarvi tjarvi at qbang.org From jvermillard at archean.fr Fri Aug 4 03:43:28 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:43:28 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: <1154684608.6181.4.camel@localhost.localdomain> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > Hi, > > > > I'm a developer of the Apache MINA framework. It's a network application > > framework which helps users develop high performance and high > > scalability network applications easily. > > http://directory.apache.org/subprojects/mina/index.html . I would like > > to integrate serial connection to the framework (actualy supporting TCP, > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > An Apache License would be pretty usefull for me and integrate rxtx > > functionnalities easly. > > > > Thanks, > > > > Julien > > > > Hi Julien > > The rxtx license itself will not change. This is just the interface. > You would be free to implement an rxtx replacement if the LGPL low level > code is a problem for you. These licensing details would make it possible > to take the interface code instead of needing to recode them for a new > project. > > You are probably confusing the license problems with the GPL not the LGPL > though you can share links to concerns off the list if you would like to > go through them. > > -- > Trent Jarvi > tjarvi at qbang.org Hi, I'm not a license expert but some guys at ASF said me you can't call LGPLed libs from java. some peoples interprete that as static linking and not dynamic linking (no idea why). So ASF/BSD licensied interface willl solve the license probleme. If you got some questions about the ASL and the way you can dual license LGPL/ASL you can ask it on legal-discuss at apache.org Julien -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/8d46c0aa/smime-0003.bin From jvermillard at archean.fr Fri Aug 4 03:51:30 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:51:30 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <1154685091.6181.6.camel@localhost.localdomain> erm from java -> from ASLed Java code Le vendredi 04 ao?t 2006 ? 11:43 +0200, Julien Vermillard a ?crit : > Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > Hi, > > I'm not a license expert but some guys at ASF said me you can't call > LGPLed libs from java. some peoples interprete that as static linking > and not dynamic linking (no idea why). So ASF/BSD licensied interface > willl solve the license probleme. > > If you got some questions about the ASL and the way you can dual license > LGPL/ASL you can ask it on legal-discuss at apache.org > > Julien > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dcc29d70/smime-0003.bin From guille at sms.nl Fri Aug 4 04:35:24 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Fri, 04 Aug 2006 12:35:24 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <7.0.1.0.0.20060804123322.036dc748@sms.nl> At 11:43 04/08/2006, Julien Vermillard wrote: >Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > >Hi, > >I'm not a license expert but some guys at ASF said me you can't call >LGPLed libs from java. some peoples interprete that as static linking >and not dynamic linking (no idea why). This interpretation is wrong. See the official position of the FSF regarding the LGPL and Java: http://www.gnu.org/licenses/lgpl-java.html http://www.fsf.org/licensing/licenses/lgpl-java.html Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From hambyiii at hotmail.com Fri Aug 4 04:52:47 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 10:52:47 +0000 Subject: [Rxtx] error getting InputStream Message-ID: Hi, I have written a program in Java for Windows xp using RXTX (which is why I am using this mailing list :). However, I am getting a problem. I am connecting to a serial port, like so: private CommPortIdentifier portID; private boolean openPort(String selectedPort) { boolean portFound = false; Enumeration portList; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portID.getName().equals(selectedPort)) { portFound = true; break; } } } return portFound; } and then I try and get the serial port input stream (leaving out the try and catch for the sake of space): SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); InputStream inputStream = serialPort.getInputStream(); but on the getInputStream() I get the following error message: Bad file descriptor in nativeavailable I cannot figure out where it is going wrong...anyone any ideas. A quick answer would be wonderful, as I am kinda under the hammer to get this fixed quickly Thanks in Advance Keith From tjarvi at qbang.org Fri Aug 4 05:13:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 05:13:19 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <7.0.1.0.0.20060804123322.036dc748@sms.nl> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> <7.0.1.0.0.20060804123322.036dc748@sms.nl> Message-ID: On Fri, 4 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 11:43 04/08/2006, Julien Vermillard wrote: >> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : >>> On Thu, 3 Aug 2006, Julien Vermillard wrote: >>> >>>> Hi, >>>> >>>> I'm a developer of the Apache MINA framework. It's a network application >>>> framework which helps users develop high performance and high >>>> scalability network applications easily. >>>> http://directory.apache.org/subprojects/mina/index.html . I would like >>>> to integrate serial connection to the framework (actualy supporting TCP, >>>> UDP (broadcast) and in VM communications), but LGPL is an issue for me. >>>> >>>> An Apache License would be pretty usefull for me and integrate rxtx >>>> functionnalities easly. >>>> >>>> Thanks, >>>> >>>> Julien >>>> >>> >>> Hi Julien >>> >>> The rxtx license itself will not change. This is just the interface. >>> You would be free to implement an rxtx replacement if the LGPL low level >>> code is a problem for you. These licensing details would make it possible >>> to take the interface code instead of needing to recode them for a new >>> project. >>> >>> You are probably confusing the license problems with the GPL not the LGPL >>> though you can share links to concerns off the list if you would like to >>> go through them. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >> >> Hi, >> >> I'm not a license expert but some guys at ASF said me you can't call >> LGPLed libs from java. some peoples interprete that as static linking >> and not dynamic linking (no idea why). > > This interpretation is wrong. See the official position of the FSF regarding > the LGPL and Java: > > http://www.gnu.org/licenses/lgpl-java.html > > http://www.fsf.org/licensing/licenses/lgpl-java.html > What I do with legal groups that go down that rat hole is give them a copy of the rxtx 2.0 license. Since the confused legal folks are going in a direction that does not represent the intent of the license or authors at that point and are confused about basic things in our industry that most consider facts, the discussions are very short. The rxtx 2.0 license just adds the following and has for 6 years or so. Not because the lawyers are right. They get confused about intent and even facts. The following is added to make confused lawyers that cant understand intent go far away and never come back. period. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. From hambyiii at hotmail.com Fri Aug 4 05:42:21 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 11:42:21 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Okay, I made a little mistake in my last message. The error is not occuring where I thought it was. Instead it is occuring when I do the following: byte[] readBuffer = new byte[128]; try { int numBytes = 0; try { Thread.sleep(500); } catch (InterruptedException e) {} while (inputStream.available() > 0) { numBytes = inputStream.read(readBuffer); } processReceivedData(readBuffer, numBytes); } catch (IOException e) { System.out.println(e.getMessage()); } So I guess the error is happening on the inputStream.read(readBuffer) again, any help is appreciated and again, thanks in advance Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 10:52:47 +0000 > >Hi, > >I have written a program in Java for Windows xp using RXTX (which is why I >am using this mailing list :). However, I am getting a problem. I am >connecting to a serial port, like so: > private CommPortIdentifier portID; > > private boolean openPort(String selectedPort) > { > boolean portFound = false; > Enumeration portList; > > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portID.getName().equals(selectedPort)) > { > portFound = true; > break; > } > } > } > > return portFound; > } > >and then I try and get the serial port input stream (leaving out the try >and >catch for the sake of space): > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >InputStream inputStream = serialPort.getInputStream(); > >but on the getInputStream() I get the following error message: > >Bad file descriptor in nativeavailable > >I cannot figure out where it is going wrong...anyone any ideas. A quick >answer would be wonderful, as I am kinda under the hammer to get this fixed >quickly > >Thanks in Advance >Keith > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From hambyiii at hotmail.com Fri Aug 4 07:08:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:08:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Hi, I know I am replying to myself a lot at the moment, but more information has come to light (These errors are actually happening on a client machine, on software that has worked for the past month, and only now has started to fail, which is why I am a little slow finding things out) The errors I have already written about are only symptoms of an orignal error. The original error occurs the first time I try to WRITE thte OutputStream: OutputStream oStream = serialPort.getOutputStream(); serialPort.notifyOnOutputEmpty(true); byte[] bs = encodeMessage(configString.toString()); oStream.write(bs); oStream.flush(); The error occurs on oStream.write(bs); and is: Input/output error in writeArray Now writeArray is native code, so I have no idea what is going on there. Any help would be appreciated Thanks Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 11:42:21 +0000 > >Okay, I made a little mistake in my last message. > >The error is not occuring where I thought it was. Instead it is occuring >when I do the following: > >byte[] readBuffer = new byte[128]; > >try { > > int numBytes = 0; > try { > Thread.sleep(500); > } > catch (InterruptedException e) > {} > > while (inputStream.available() > 0) > { > numBytes = inputStream.read(readBuffer); > } > > processReceivedData(readBuffer, numBytes); >} >catch (IOException e) >{ > System.out.println(e.getMessage()); >} > >So I guess the error is happening on the inputStream.read(readBuffer) > >again, any help is appreciated and again, thanks in advance >Keith > > >From: "Keith Thorne" > >Reply-To: RXTX Developers and Users > >To: rxtx at qbang.org > >Subject: [Rxtx] error getting InputStream > >Date: Fri, 04 Aug 2006 10:52:47 +0000 > > > >Hi, > > > >I have written a program in Java for Windows xp using RXTX (which is why >I > >am using this mailing list :). However, I am getting a problem. I am > >connecting to a serial port, like so: > > private CommPortIdentifier portID; > > > > private boolean openPort(String selectedPort) > > { > > boolean portFound = false; > > Enumeration portList; > > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > > while (portList.hasMoreElements()) > > { > > portID = (CommPortIdentifier) portList.nextElement(); > > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > > { > > if (portID.getName().equals(selectedPort)) > > { > > portFound = true; > > break; > > } > > } > > } > > > > return portFound; > > } > > > >and then I try and get the serial port input stream (leaving out the try > >and > >catch for the sake of space): > > > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); > >InputStream inputStream = serialPort.getInputStream(); > > > >but on the getInputStream() I get the following error message: > > > >Bad file descriptor in nativeavailable > > > >I cannot figure out where it is going wrong...anyone any ideas. A quick > >answer would be wonderful, as I am kinda under the hammer to get this >fixed > >quickly > > > >Thanks in Advance > >Keith > > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Aug 4 07:26:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: Hi Keith Can you tell us more about the physical serial port? Might it be 'vanishing?' On Fri, 4 Aug 2006, Keith Thorne wrote: > Hi, > > I know I am replying to myself a lot at the moment, but more information has > come to light (These errors are actually happening on a client machine, on > software that has worked for the past month, and only now has started to > fail, which is why I am a little slow finding things out) > > The errors I have already written about are only symptoms of an orignal > error. The original error occurs the first time I try to WRITE thte > OutputStream: > > OutputStream oStream = serialPort.getOutputStream(); > serialPort.notifyOnOutputEmpty(true); > > byte[] bs = encodeMessage(configString.toString()); > > oStream.write(bs); > oStream.flush(); > > The error occurs on oStream.write(bs); and is: > > Input/output error in writeArray > > Now writeArray is native code, so I have no idea what is going on there. Any > help would be appreciated > Thanks > Keith > > >> From: "Keith Thorne" >> Reply-To: RXTX Developers and Users >> To: rxtx at qbang.org >> Subject: Re: [Rxtx] error getting InputStream >> Date: Fri, 04 Aug 2006 11:42:21 +0000 >> >> Okay, I made a little mistake in my last message. >> >> The error is not occuring where I thought it was. Instead it is occuring >> when I do the following: >> >> byte[] readBuffer = new byte[128]; >> >> try { >> >> int numBytes = 0; >> try { >> Thread.sleep(500); >> } >> catch (InterruptedException e) >> {} >> >> while (inputStream.available() > 0) >> { >> numBytes = inputStream.read(readBuffer); >> } >> >> processReceivedData(readBuffer, numBytes); >> } >> catch (IOException e) >> { >> System.out.println(e.getMessage()); >> } >> >> So I guess the error is happening on the inputStream.read(readBuffer) >> >> again, any help is appreciated and again, thanks in advance >> Keith >> >>> From: "Keith Thorne" >>> Reply-To: RXTX Developers and Users >>> To: rxtx at qbang.org >>> Subject: [Rxtx] error getting InputStream >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 >>> >>> Hi, >>> >>> I have written a program in Java for Windows xp using RXTX (which is why >> I >>> am using this mailing list :). However, I am getting a problem. I am >>> connecting to a serial port, like so: >>> private CommPortIdentifier portID; >>> >>> private boolean openPort(String selectedPort) >>> { >>> boolean portFound = false; >>> Enumeration portList; >>> >>> portList = CommPortIdentifier.getPortIdentifiers(); >>> >>> while (portList.hasMoreElements()) >>> { >>> portID = (CommPortIdentifier) portList.nextElement(); >>> if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) >>> { >>> if (portID.getName().equals(selectedPort)) >>> { >>> portFound = true; >>> break; >>> } >>> } >>> } >>> >>> return portFound; >>> } >>> >>> and then I try and get the serial port input stream (leaving out the try >>> and >>> catch for the sake of space): >>> >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >>> InputStream inputStream = serialPort.getInputStream(); >>> >>> but on the getInputStream() I get the following error message: >>> >>> Bad file descriptor in nativeavailable >>> >>> I cannot figure out where it is going wrong...anyone any ideas. A quick >>> answer would be wonderful, as I am kinda under the hammer to get this >> fixed >>> quickly >>> >>> Thanks in Advance >>> Keith >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From hambyiii at hotmail.com Fri Aug 4 07:52:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:52:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more information >has > > come to light (These errors are actually happening on a client machine, >on > > software that has worked for the past month, and only now has started to > > fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an orignal > > error. The original error occurs the first time I try to WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); > >> } > >> catch (IOException e) > >> { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance > >> Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I am > >>> connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Fri Aug 4 08:21:07 2006 From: gergg at cox.net (Gregg Wonderly) Date: Fri, 04 Aug 2006 09:21:07 -0500 Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: <44D357D3.40303@cox.net> Keith Thorne wrote: > Okay, I made a little mistake in my last message. > > The error is not occuring where I thought it was. Instead it is occuring > when I do the following: > > byte[] readBuffer = new byte[128]; > > try { > > } > catch (IOException e) > { > System.out.println(e.getMessage()); > } > > So I guess the error is happening on the inputStream.read(readBuffer) This is one of the most frustrating things to see over and over. The exception tells you exactly which line the error is occuring on, if you will use it to see where. In Java, these days, every class should do the following. import java.util.logging.*; public class MyClass { Logger log = Logger.getLogger( getClass().getName() ); ...in some method... { String data = ...; // any extra data like addresses or // ports which might be wrong and // cause an exception. try { ... } catch( SomeException ex ) { log.log( Level.SEVERE, ex.toString()+": "+data, ex ); } } } By default, you will see all of the appropriate details of any exception logged at the WARNING or SEVERE level. You can read the javadocs about logging to get more information too. Once you do this, people can then turn up logging and get more information, or otherwise manage it with a logging configuration file or other tools such as JMX or my http://logman.dev.java.net project. Gregg Wonderly From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 09:15:24 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 09:15:24 -0600 Subject: [Rxtx] error getting InputStream Message-ID: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Keith, Please send the full stack trace of the exception, may be I can help you. On Trent's question regarding physical 'Serial Port', do you mean you have a USB(Connected to Client Machine) to 9 Pin Serial cable(Connected to H/W device)? Also please mention which java version you are using? Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Keith Thorne Sent: Friday, August 04, 2006 7:52 AM To: rxtx at qbang.org Subject: Re: [Rxtx] error getting InputStream The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more > > information >has > > come to light (These errors are actually happening on a client > > machine, >on > > software that has worked for the past month, and only now has > > started to fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an > > orignal error. The original error occurs the first time I try to > > WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); } catch (IOException > >> e) { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the > >> inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which > >>> is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I > >>> am connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out > >>> the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get > >>> this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 14:36:16 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 14:36:16 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Trent, As discussed over the phone yesterday, I am emailing you all the details of the bugs I have been experiencing. We do not use Serial Ports like most of the applications. Our application uses approx 80 -100 serial ports (attached thru Digi boxes) which are opened and closed every 20 sec to 1 minute depending upon the type of device. Some Serial ports are left opened all the time and receive event based serial calls while other devices uses polling (request and reply) to collect data. So the opening and closing of the Serial Ports is not really in a sequential order as you mentioned in our conversation yesterday. Also 2 same serial ports can never be opened at one time we have business locks to prevent that from happening. Our findings so far (of course with the help of RXTX user group): The real culprit is in the SerialImp.c file, somehow the other the Event Info Structure in the Linked List gets damaged and loses references to the original EIS structure. I believe both the problems are caused because of the corruption of EIS packet. I have noticed that the link list traversal of EIS in the following methods under SerialImp.c : 1)initialise_event_info_struct 2)finalize_event_info_struct 3)interruptEventLoop So culprit code might be in one of these methods. I am currently using JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and Fedora Core 5). I am also attaching a Test Class to replicate the problem. You need to modify the class and add your systems Serial ports into the code and execute. java TestOpenClosePort 100 It will open and close all the serial ports 100 times in there own thread. Please let me know, I will be available thru out this weekend and can help you as much as I can with testing. Regards Pawan Kharbanda CDOT-ITS 303-478-2991 (cell) 303-985-4350 (home) -------------- next part -------------- A non-text attachment was scrubbed... Name: TestOpenClosePort.java Type: application/octet-stream Size: 6139 bytes Desc: TestOpenClosePort.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dd3754d9/TestOpenClosePort-0003.obj From tjarvi at qbang.org Fri Aug 4 15:43:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 15:43:09 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: Thanks, I'll look at it tomorrow morning. I don't know when I'll find the solution but you may check email tomorrow afternoon to see if I think I found it. On Fri, 4 Aug 2006, Kharbanda, Pawan wrote: > Trent, > As discussed over the phone yesterday, I am emailing you all the > details of the bugs I have been experiencing. We do not use Serial Ports > like most of the applications. Our application uses approx 80 -100 > serial ports (attached thru Digi boxes) which are opened and closed > every 20 sec to 1 minute depending upon the type of device. Some Serial > ports are left opened all the time and receive event based serial calls > while other devices uses polling (request and reply) to collect data. So > the opening and closing of the Serial Ports is not really in a > sequential order as you mentioned in our conversation yesterday. Also 2 > same serial ports can never be opened at one time we have business locks > to prevent that from happening. > > Our findings so far (of course with the help of RXTX user group): > > The real culprit is in the SerialImp.c file, somehow the other the Event > Info Structure in the Linked List gets damaged and loses references to > the original EIS structure. I believe both the problems are caused > because of the corruption of EIS packet. I have noticed that the link > list traversal of EIS in the following methods under SerialImp.c : > > 1)initialise_event_info_struct > 2)finalize_event_info_struct > 3)interruptEventLoop > > So culprit code might be in one of these methods. I am currently using > JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and > Fedora Core 5). > > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > > Regards > Pawan Kharbanda > CDOT-ITS > 303-478-2991 (cell) > 303-985-4350 (home) > > > > > > > > > > From tjarvi at qbang.org Sat Aug 5 12:32:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:32:40 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:34:27 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:34:27 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> You need to run it few times. More the number of ports, more frequently you can reproduce. With just 2 ports it will be hard to reproduce frequently. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:33 PM To: Kharbanda, Pawan Cc: tjarvi at qbang.org; RXTX Developers and Users Subject: Re: Port Locking / JVM Crashing > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Aug 5 12:52:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:52:26 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> Message-ID: Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more frequently > you can reproduce. With just 2 ports it will be hard to reproduce > frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:57:49 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:57:49 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Trent, I have 5 ports of Digi and I can reproduce almost every time. Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX version -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:52 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more > frequently you can reproduce. With just 2 ports it will be hard to > reproduce frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need >> to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From tjarvi at qbang.org Sat Aug 5 13:06:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:06:07 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Message-ID: You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few thousand > iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:07:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:07:33 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E659@hqexchange3.dot.state.co.us> We use our own locks but I haven't turned off the RXTX locks. I am still using the RXTX locks that might be the difference. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:13:22 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:13:22 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Trent, How can you turn off the lock files? I can try using that. I never tried that, I thought you can't turn off the file locking. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From tjarvi at qbang.org Sat Aug 5 13:18:53 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:18:53 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Message-ID: Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java > -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except lockfiles > are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:31:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:31:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Trent, I am able to constantly replicate almost everytime even when I have locks disabled. Don't know the reason why you are not able to on your environment. Any suggestions??????? Cycle No (Thread ::: /dev/cuf04) ::::::: 7 Cycle No (Thread ::: /dev/cuf01) ::::::: 7 Cycle No (Thread ::: /dev/cuf02) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) Exiting Thread ::: /dev/cuf03 Cycle No (Thread ::: /dev/cuf03) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent Port /dev/cuf01 is Opened 0x01 Sent Port /dev/cub01 is Opened 0x01 Sent Port /dev/cuf01 is Closed Port /dev/cuf02 is Closed Port /dev/cuf03 is Closed Port /dev/cuf04 is Closed Port /dev/cub01 is Closed Exiting Thread ::: /dev/cuf03 Exiting Thread ::: /dev/cuf02 Cycle No (Thread ::: /dev/cuf03) ::::::: 8 Cycle No (Thread ::: /dev/cuf02) ::::::: 8 Exiting Thread ::: /dev/cuf04 Exiting Thread ::: /dev/cuf01 Cycle No (Thread ::: /dev/cuf01) ::::::: 8 Cycle No (Thread ::: /dev/cuf04) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened 0x01 Sent Port /dev/cuf01 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 # # An error report file with more information is saved as hs_err_pid21386.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:19 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) > 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux > java -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except > lockfiles are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code >>>> and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm >>> running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From tjarvi at qbang.org Sat Aug 5 14:14:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 14:14:49 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: I'd stick a couple $15 dual port serial boards in the machine to see if its kernel driver specific. I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more problematic. They do not get the same number of eyes looking for problems. You could try putting #undef TIOCSERGETLSR #undef TIOCGICOUNT in the very top of SerialImp.h or one or the other to flip bits of code off and on. The kernel here is 2.6.11.4-20a-smp from Suse. glibc is 2.3.4-23.4 from Suse the jre is 1.5.0_06-b05 from Sun. The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC ram. You should be able to reproduce what I'm seeing then go from there. I don't think I'm going to see this problem without having the same cornercase hardware you have. Maybe we can work that out off the list but I doubt I'm going to find it in rxtx at this point. I have seen problems in the past were kernel structs don't match user space struct and bad things happen but I was including a kernel struct to get functionality that had not made its way into user space at the time. The only thing I may be missing is that when I write 0x01 out the port, nothing comes back. That was not specified but you could easily disconnect anything connected to the ports to see if that changes anything. rxtx is far from bug free but I do not see anything yet. On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I am able to constantly replicate almost everytime even when I have > locks disabled. Don't know the reason why you are not able to on your > environment. Any suggestions??????? > > > Cycle No (Thread ::: /dev/cuf04) ::::::: 7 > Cycle No (Thread ::: /dev/cuf01) ::::::: 7 > Cycle No (Thread ::: /dev/cuf02) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > Exiting Thread ::: /dev/cuf03 > Cycle No (Thread ::: /dev/cuf03) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > Port /dev/cuf01 is Opened > 0x01 Sent > Port /dev/cub01 is Opened > 0x01 Sent > Port /dev/cuf01 is Closed > Port /dev/cuf02 is Closed > Port /dev/cuf03 is Closed > Port /dev/cuf04 is Closed > Port /dev/cub01 is Closed > Exiting Thread ::: /dev/cuf03 > Exiting Thread ::: /dev/cuf02 > Cycle No (Thread ::: /dev/cuf03) ::::::: 8 > Cycle No (Thread ::: /dev/cuf02) ::::::: 8 > Exiting Thread ::: /dev/cuf04 > Exiting Thread ::: /dev/cuf01 > Cycle No (Thread ::: /dev/cuf01) ::::::: 8 > Cycle No (Thread ::: /dev/cuf04) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > 0x01 Sent > Port /dev/cuf01 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 > # > # An error report file with more information is saved as > hs_err_pid21386.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > Aborted > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:19 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Lockfiles are a compile time option. I've turned them on now, corrected > a mistake resulting in only 3 ports being used and now have it going > through a few hundred iterations again without a crash. > > To disable lockfiles.. > > ./configure --disable-lockfiles && make install > > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > Port /dev/ttyS5 is Closed > Exiting Thread ::: /dev/ttyS1 > Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: > /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting > Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port > /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS1 is Closed > Port /dev/ttyS4 is Closed > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > > > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, How can you turn off the lock files? I can try using that. I >> never tried that, I thought you can't turn off the file locking. >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:06 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> You may try 4 ports instead of 5 to make sure thats not the issue. >> >> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >> 2.6.11.4-20a-smp >> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >> java -version java version "1.5.0_06" >> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >> >> I'm using rxtx 2.1-7 (final) with default configuration except >> lockfiles are disabled. I gathered that you are doing your own > resource locking. >> >> ... >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> ... >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>> version >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:52 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> Whats a few times? I've got 4 ports here and have run it a few >>> thousand iterations. >>> >>> Is that true for you if you run it with just four of your DIGI ports? >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> You need to run it few times. More the number of ports, more >>>> frequently you can reproduce. With just 2 ports it will be hard to >>>> reproduce frequently. >>>> >>>> ~pk >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:33 PM >>>> To: Kharbanda, Pawan >>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>> Subject: Re: Port Locking / JVM Crashing >>>> >>>>> I am also attaching a Test Class to replicate the problem. You need > >>>>> to >>>> >>>>> modify the class and add your systems Serial ports into the code >>>>> and >> >>>>> execute. >>>>> >>>>> java TestOpenClosePort 100 >>>>> >>>>> It will open and close all the serial ports 100 times in there own >>>>> thread. >>>>> >>>>> Please let me know, I will be available thru out this weekend and >>>>> can >>> >>>>> help you as much as I can with testing. >>>>> >>>> >>>> How reproducable is the problem with the above testcase? I'm >>>> running >> >>>> 100's of iterations without reproducing the problem. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> >>> >> > From rtlane01 at comcast.net Tue Aug 1 19:22:03 2006 From: rtlane01 at comcast.net (Randall T. Lane) Date: Tue, 01 Aug 2006 21:22:03 -0400 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] Message-ID: <44CFFE3B.90001@comcast.net> Rxtx Community: Please see my e-mail to Trent. Does anyone have any experience using rxtx to successfully communicate with hardware via USB? Thanks. Randy Lane -------------- next part -------------- An embedded message was scrubbed... From: Trent Jarvi Subject: Re: Help with RxTx for USB Communication Date: Tue, 1 Aug 2006 18:49:13 -0600 (MDT) Size: 3300 Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060801/9bbbc255/HelpwithRxTxforUSBCommunication-0003.mht From naranjo.manuel at gmail.com Sun Aug 6 16:59:28 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Sun, 06 Aug 2006 19:59:28 -0300 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44CFFE3B.90001@comcast.net> References: <44CFFE3B.90001@comcast.net> Message-ID: <44D67450.8010100@gmail.com> Randy: I have been able to communicate to AIRcable USB Bluetooth Dongle, with success. I'm not sure which are the options that you have to send to RXTX library, but you can indeed. Check that you do not have the port avaible for much long. I have heard of a problem with WinXP that it simply turn off virtual ports when they are too much long with out activity. If you want I can send you my code, because it is avaible under GPL, the new release is not avaible at AIRcable web site, but it should in short time. Regards, Manu > Rxtx Community: > > Please see my e-mail to Trent. Does anyone have any experience using > rxtx to successfully communicate with hardware via USB? > > Thanks. > > Randy Lane > > ------------------------------------------------------------------------ > > Asunto: > Re: Help with RxTx for USB Communication > De: > Trent Jarvi > Fecha: > Tue, 1 Aug 2006 18:49:13 -0600 (MDT) > Para: > "Randall T. Lane" > > Para: > "Randall T. Lane" > CC: > taj at www.linux.org.uk > > > On Tue, 1 Aug 2006, Randall T. Lane wrote: > >> Trent, >> >> I am working on a project written in Java (1.5) and need to >> communicate to an external device via a USB port. >> >> I have downloaded rxtx-2.1-7-bins-r2.zip from www.rxtx.org and setup >> a Java test project to learn how to use rxtx. I am able to list the >> serial ports available, however rxtx does not recognize my USB port. >> I am running on Windows XP. Here is some output from my test project >> ... >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> COM1 - Serial >> COM3 - Serial >> LPT1 - Parallel >> >> I would appreciate any help you could provide in getting rxtx to >> allow me to communicate via my USB port. >> >> Here is my code, if that would help. >> >> public static void main(String[] args) { >> listPorts(); >> // The listPorts() and getPortTypeName() methods are used for >> port identification. >> static void listPorts() >> { >> Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); >> while ( portEnum.hasMoreElements() ) >> { >> CommPortIdentifier portIdentifier = (CommPortIdentifier) >> portEnum.nextElement(); >> System.out.println(portIdentifier.getName() + " - " + >> getPortTypeName(portIdentifier.getPortType()) ); >> } } >> static String getPortTypeName ( int portType ) >> { >> switch ( portType ) >> { >> case CommPortIdentifier.PORT_I2C: >> return "I2C"; >> case CommPortIdentifier.PORT_PARALLEL: >> return "Parallel"; >> case CommPortIdentifier.PORT_RAW: >> return "Raw"; >> case CommPortIdentifier.PORT_RS485: >> return "RS485"; >> case CommPortIdentifier.PORT_SERIAL: >> return "Serial"; >> default: >> return "unknown type"; >> } >> } >> >> Thanks. >> >> Randy Lane >> > > Hi Randy > > The rxtx mail list is a better place to ask as there are more eyes. > I'm swamped with work. > > Be sure to look to see that your serial port dongle shows up as a > serial port in device manager and no other applications have it open. > USB serial dongles do work with rxtx. Some are less complete than > others. > > -- > Trent Jarvi > tjarvi at qbang.org > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From eddythejekyll at gmail.com Sun Aug 6 23:31:45 2006 From: eddythejekyll at gmail.com (Ed) Date: Sun, 6 Aug 2006 23:31:45 -0600 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? Message-ID: I have written a simple client server (RMI) application without using RxTx where the server controls a parallel port simply by addressing the port and banging the bits in order to drive a relay. It also reads the port's. I am doing this by making Runtime.exec calls to a binary that actually does the parallel port bit banging and reading. However, I'd like to use RxTx so it is a pure Java application, and I've so far installed and figured out how to discover the ports, but I'm having trouble finding good examples or some howto type documentation for this. I did find the two examples on the Wiki: one for serial IO and the other to discover the ports on a system. As I said, I have so far installed RxTx and gotten it to compile and run and I can identify the ports. When I run the server I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found Ports! Found port COM1 Found port COM3 Found port LPT1 LPT1 Not Currently owned EASSwitch Server starting. EASSwitch is bound. Server Ready. So it looks like thing are installed and working, but I feel all dressed up and no idea how to proceed. Basically, I just want to be able to toggle the data lines on the parallel port and read them. Very simple. No parallel printer type usage. Are there any examples I can work off of? If so, please advise. Thank you. -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060806/c7e39898/attachment-0003.html From hambyiii at hotmail.com Sun Aug 6 23:53:54 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Mon, 07 Aug 2006 05:53:54 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Message-ID: Hi, sorry I took the weekend to reply, but I was away for the last couple of days. Unfortunately I cannot send the full stack trace yet. The problem is not, unfortunately, happening on my computer, but on a clients computer, which I will go and visit today. I will hopefully be able to get a stack trace then. As to the physical connection, tt is indeed a USB from the computer, connected to a 9 pin serial device that connects to the hard-ware. My java version is 1.5.06 >From: "Kharbanda, Pawan" >Reply-To: RXTX Developers and Users >To: "RXTX Developers and Users" >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 09:15:24 -0600 > >Keith, > Please send the full stack trace of the exception, may be I can help >you. On Trent's question regarding physical 'Serial Port', do you mean >you have a USB(Connected to Client Machine) to 9 Pin Serial >cable(Connected to H/W device)? > >Also please mention which java version you are using? > >Thanks >Pawan Kharbanda > > >-----Original Message----- >From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >Of Keith Thorne >Sent: Friday, August 04, 2006 7:52 AM >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream > >The physical serial port is actually a USB connection that is then >changed to a "virtual serial port", so I can use the serial port >protocols to connect to it. The other end of the connection is a >hardware device that is constantly turned on. I am not sure about the >port 'vanishing'...we have another piece of software that came with the >hardware device, which we can test the device (and with it the virtual >serial port) with. This has no problem connecting to the serial port or >writing to/reading from the device. >It is only when my software is run, that the error occurs. Like I have >said, my software (using rxtx) is connecting to the serial port >successfully, but it is when I try and write to the serial port that I >get the error. > >Although to be truthful, I am not absolutely certain if the error is >happening on the oStream.write() or the oStream.flush(). I only think it >is the write(), because that is where the writeArray() function is >called. > >thanks >Keith > > > >From: Trent Jarvi > >Reply-To: RXTX Developers and Users > >To: RXTX Developers and Users > >Subject: Re: [Rxtx] error getting InputStream > >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > > > > >Hi Keith > > > >Can you tell us more about the physical serial port? Might it be > >'vanishing?' > > > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > > > Hi, > > > > > > I know I am replying to myself a lot at the moment, but more > > > information > >has > > > come to light (These errors are actually happening on a client > > > machine, > >on > > > software that has worked for the past month, and only now has > > > started to fail, which is why I am a little slow finding things out) > > > > > > The errors I have already written about are only symptoms of an > > > orignal error. The original error occurs the first time I try to > > > WRITE thte > > > OutputStream: > > > > > > OutputStream oStream = serialPort.getOutputStream(); > > > serialPort.notifyOnOutputEmpty(true); > > > > > > byte[] bs = encodeMessage(configString.toString()); > > > > > > oStream.write(bs); > > > oStream.flush(); > > > > > > The error occurs on oStream.write(bs); and is: > > > > > > Input/output error in writeArray > > > > > > Now writeArray is native code, so I have no idea what is going on >there. > >Any > > > help would be appreciated > > > Thanks > > > Keith > > > > > > > > >> From: "Keith Thorne" > > >> Reply-To: RXTX Developers and Users > > >> To: rxtx at qbang.org > > >> Subject: Re: [Rxtx] error getting InputStream > > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > > >> > > >> Okay, I made a little mistake in my last message. > > >> > > >> The error is not occuring where I thought it was. Instead it is > >occuring > > >> when I do the following: > > >> > > >> byte[] readBuffer = new byte[128]; > > >> > > >> try { > > >> > > >> int numBytes = 0; > > >> try { > > >> Thread.sleep(500); > > >> } > > >> catch (InterruptedException e) > > >> {} > > >> > > >> while (inputStream.available() > 0) > > >> { > > >> numBytes = inputStream.read(readBuffer); > > >> } > > >> > > >> processReceivedData(readBuffer, numBytes); } catch (IOException > > >> e) { > > >> System.out.println(e.getMessage()); > > >> } > > >> > > >> So I guess the error is happening on the > > >> inputStream.read(readBuffer) > > >> > > >> again, any help is appreciated and again, thanks in advance Keith > > >> > > >>> From: "Keith Thorne" > > >>> Reply-To: RXTX Developers and Users > > >>> To: rxtx at qbang.org > > >>> Subject: [Rxtx] error getting InputStream > > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > > >>> > > >>> Hi, > > >>> > > >>> I have written a program in Java for Windows xp using RXTX (which > > >>> is > >why > > >> I > > >>> am using this mailing list :). However, I am getting a problem. I > > >>> am connecting to a serial port, like so: > > >>> private CommPortIdentifier portID; > > >>> > > >>> private boolean openPort(String selectedPort) > > >>> { > > >>> boolean portFound = false; > > >>> Enumeration portList; > > >>> > > >>> portList = CommPortIdentifier.getPortIdentifiers(); > > >>> > > >>> while (portList.hasMoreElements()) > > >>> { > > >>> portID = (CommPortIdentifier) portList.nextElement(); > > >>> if (portID.getPortType() == > >CommPortIdentifier.PORT_SERIAL) > > >>> { > > >>> if (portID.getName().equals(selectedPort)) > > >>> { > > >>> portFound = true; > > >>> break; > > >>> } > > >>> } > > >>> } > > >>> > > >>> return portFound; > > >>> } > > >>> > > >>> and then I try and get the serial port input stream (leaving out > > >>> the > >try > > >>> and > > >>> catch for the sake of space): > > >>> > > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", > >2000); > > >>> InputStream inputStream = serialPort.getInputStream(); > > >>> > > >>> but on the getInputStream() I get the following error message: > > >>> > > >>> Bad file descriptor in nativeavailable > > >>> > > >>> I cannot figure out where it is going wrong...anyone any ideas. A > >quick > > >>> answer would be wonderful, as I am kinda under the hammer to get > > >>> this > > >> fixed > > >>> quickly > > >>> > > >>> Thanks in Advance > > >>> Keith > > >>> > > >>> > > >>> _______________________________________________ > > >>> Rxtx mailing list > > >>> Rxtx at qbang.org > > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > > >> > > >> > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Aug 7 06:22:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:22:03 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: Hmm.. I left the test running went I went home Saturday. It looks like something did show up after ~30k iterations. I'll look at it more in my free time. Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS5 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 29417 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 29417 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 29417 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00002aab14c2ec63, pid=20573, tid=1095125344 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6c63] initialise_event_info_struct+0x63 # [thread 1087756640 also had an error] Port /dev/ttyS5 is Opened 0x01 Sent [thread 1089861984 also had an error] Port /dev/ttyS4 is Opened 0x01 Sent [thread 1090914656 also had an error] # An error report file with more information is saved as [thread 1090914656 also had an error] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted On Sat, 5 Aug 2006, Trent Jarvi wrote: > > I'd stick a couple $15 dual port serial boards in the machine to see if its > kernel driver specific. > > I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more > problematic. They do not get the same number of eyes looking for problems. > > You could try putting > > #undef TIOCSERGETLSR > #undef TIOCGICOUNT > > in the very top of SerialImp.h or one or the other to flip bits of code off > and on. > > The kernel here is 2.6.11.4-20a-smp from Suse. > glibc is 2.3.4-23.4 from Suse > the jre is 1.5.0_06-b05 from Sun. > > The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC > ram. > > You should be able to reproduce what I'm seeing then go from there. I don't > think I'm going to see this problem without having the same cornercase > hardware you have. Maybe we can work that out off the list but I doubt I'm > going to find it in rxtx at this point. > > I have seen problems in the past were kernel structs don't match user space > struct and bad things happen but I was including a kernel struct to get > functionality that had not made its way into user space at the time. > > The only thing I may be missing is that when I write 0x01 out the port, > nothing comes back. That was not specified but you could easily disconnect > anything connected to the ports to see if that changes anything. > > rxtx is far from bug free but I do not see anything yet. > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, >> I am able to constantly replicate almost everytime even when I have >> locks disabled. Don't know the reason why you are not able to on your >> environment. Any suggestions??????? >> >> >> Cycle No (Thread ::: /dev/cuf04) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> Exiting Thread ::: /dev/cuf03 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> Port /dev/cuf01 is Opened >> 0x01 Sent >> Port /dev/cub01 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Closed >> Port /dev/cuf02 is Closed >> Port /dev/cuf03 is Closed >> Port /dev/cuf04 is Closed >> Port /dev/cub01 is Closed >> Exiting Thread ::: /dev/cuf03 >> Exiting Thread ::: /dev/cuf02 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 8 >> Exiting Thread ::: /dev/cuf04 >> Exiting Thread ::: /dev/cuf01 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf04) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 >> # >> # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 >> # >> # An error report file with more information is saved as >> hs_err_pid21386.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> Aborted >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:19 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Lockfiles are a compile time option. I've turned them on now, corrected >> a mistake resulting in only 3 ports being used and now have it going >> through a few hundred iterations again without a crash. >> >> To disable lockfiles.. >> >> ./configure --disable-lockfiles && make install >> >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> Port /dev/ttyS5 is Closed >> Exiting Thread ::: /dev/ttyS1 >> Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: >> /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting >> Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port >> /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> >> >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, How can you turn off the lock files? I can try using that. I >>> never tried that, I thought you can't turn off the file locking. >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 1:06 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> You may try 4 ports instead of 5 to make sure thats not the issue. >>> >>> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >>> 2.6.11.4-20a-smp >>> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >>> java -version java version "1.5.0_06" >>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >>> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >>> >>> I'm using rxtx 2.1-7 (final) with default configuration except >>> lockfiles are disabled. I gathered that you are doing your own >> resource locking. >>> >>> ... >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> Port /dev/ttyS4 is Closed >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> ... >>> >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>>> version >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:52 PM >>>> To: Kharbanda, Pawan >>>> Cc: Trent Jarvi; RXTX Developers and Users >>>> Subject: RE: Port Locking / JVM Crashing >>>> >>>> >>>> Whats a few times? I've got 4 ports here and have run it a few >>>> thousand iterations. >>>> >>>> Is that true for you if you run it with just four of your DIGI ports? >>>> >>>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>>> >>>>> You need to run it few times. More the number of ports, more >>>>> frequently you can reproduce. With just 2 ports it will be hard to >>>>> reproduce frequently. >>>>> >>>>> ~pk >>>>> >>>>> -----Original Message----- >>>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>>> Sent: Saturday, August 05, 2006 12:33 PM >>>>> To: Kharbanda, Pawan >>>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>>> Subject: Re: Port Locking / JVM Crashing >>>>> >>>>>> I am also attaching a Test Class to replicate the problem. You need >> >>>>>> to >>>>> >>>>>> modify the class and add your systems Serial ports into the code >>>>>> and >>> >>>>>> execute. >>>>>> >>>>>> java TestOpenClosePort 100 >>>>>> >>>>>> It will open and close all the serial ports 100 times in there own >>>>>> thread. >>>>>> >>>>>> Please let me know, I will be available thru out this weekend and >>>>>> can >>>> >>>>>> help you as much as I can with testing. >>>>>> >>>>> >>>>> How reproducable is the problem with the above testcase? I'm >>>>> running >>> >>>>> 100's of iterations without reproducing the problem. >>>>> >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> >>>> >>> >> > From iinjlv01 at gmail.com Mon Aug 7 06:22:07 2006 From: iinjlv01 at gmail.com (J LV) Date: Mon, 7 Aug 2006 14:22:07 +0200 Subject: [Rxtx] Data lost or Slow sampling Message-ID: Hello I am using RXTX to comm with a motion controller using Serial Port and i can write the commands using SerialPort or RXTXPort without problems, but when i try write and read at high sampling rate, for example to know the position and speed at every moment of a trajectory, i obtain a very irregular response times. I am using the most simple algorimth: 1-Write the command "is trajectory finished?" and wait for SerialPortEvent.DATA_AVAILABLE 2-Read the InputStreamReader of serial port while not empty 3-If trajectory finished then stop program, else, continue 4-Read actual time using System.currentTimeMillis() (t0) 5-Write the command "give me position" and wait for SerialPortEvent.DATA_AVAILABLE 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) 7-Read the InputStreamReader of serial port while not empty 8-Save position in Vector or ArrayList and repeat from 1 I don't know if the problem is the RXTX, my program or the motion controller hardware but i have response times from 16 millis to 78 millis at 19200 bauds!. I am using SwingWorked to threading SerialPort reading/writing process. Any idea or similar data leak problem? Thanks for RXTX project and sorry for my badde english! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/909a4cb3/attachment-0003.html From tjarvi at qbang.org Mon Aug 7 06:50:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:50:10 -0600 (MDT) Subject: [Rxtx] Data lost or Slow sampling In-Reply-To: References: Message-ID: On Mon, 7 Aug 2006, J LV wrote: > Hello > > I am using RXTX to comm with a motion controller using Serial Port and i can > write the commands using SerialPort or RXTXPort without problems, but when i > try write and read at high sampling rate, for example to know the position > and speed at every moment of a trajectory, i obtain a very irregular > response times. I am using the most simple algorimth: > 1-Write the command "is trajectory finished?" and wait for > SerialPortEvent.DATA_AVAILABLE > 2-Read the InputStreamReader of serial port while not empty > 3-If trajectory finished then stop program, else, continue > 4-Read actual time using System.currentTimeMillis() (t0) > 5-Write the command "give me position" and wait for > SerialPortEvent.DATA_AVAILABLE > 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) > 7-Read the InputStreamReader of serial port while not empty > 8-Save position in Vector or ArrayList and repeat from 1 > > > I don't know if the problem is the RXTX, my program or the motion controller > hardware but i have response times from 16 millis to 78 millis at 19200 > bauds!. I am using SwingWorked to threading SerialPort reading/writing > process. > > Any idea or similar data leak problem? > > Thanks for RXTX project and sorry for my badde english! > This can be platform dependant. What you may do for a starting point is use a loopback connection and time the same thing at 19200. Write the date, wait for data available, read the data. I would expect from write to data available to take around 10 ms from past experiences. You can experiment with turning on and off buffering in the port settings of the OS, if the OS supports more realtime like interrupts, that could help. You have a java schedual and the kernel schedual. Serial interrupts traditionally have very high priority but modern OSs tend to realize thats not good for GUIs, ... and delay responding to the interrupts. You should be able to have usec response times in a realtime OS. Windows and Linux are not typically setup as realtime OSs. For comparison, the last time I looked which was about 5 years ago, windows NT4 came back with data available in 8 ms and Linux came back in 10 ms. I would be interested in seeing what you get today. -- Trent Jarvi tjarvi at qbang.org From gergg at cox.net Mon Aug 7 09:21:56 2006 From: gergg at cox.net (Gregg Wonderly) Date: Mon, 07 Aug 2006 10:21:56 -0500 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? In-Reply-To: References: Message-ID: <44D75A94.9030205@cox.net> Ed wrote: > Are there any examples I can work off of? If so, please advise. Just read the javax.comm javadocs. You need to take the parallel port and write values to it based on which bits of which lines you want on and off. Gregg Wonderly From pete.flugstad at gmail.com Mon Aug 7 09:36:19 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 7 Aug 2006 10:36:19 -0500 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44D67450.8010100@gmail.com> References: <44CFFE3B.90001@comcast.net> <44D67450.8010100@gmail.com> Message-ID: <84d4a6d50608070836v97e9a29q96e98441ea903ac7@mail.gmail.com> FYI, I'm talking to a USB<->Serial dongle just fine under Windows XP Pro. I did have to install a driver for the thing - Windows XP by default, did not recognize it. Once installed, it just showed up as another COM port, and I've been pushing data over it with no problems. Pete From savagobr at yahoo.com Mon Aug 7 10:13:06 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Mon, 7 Aug 2006 09:13:06 -0700 (PDT) Subject: [Rxtx] Port Locking / JVM Crashing: 2 ports (Serial + usb) Message-ID: <20060807161306.9648.qmail@web53803.mail.yahoo.com> Trent This is curious, since I did reproduced the aformentioned bug using only 2 ports: /dev/ttyS0 and /dev/ttyUSB0. It only need to run for 500 times: $ java -cp . TestOpenClosePort 500 500 Port /dev/ttyS0 is Closed Excpetion ::: Thread ::: /dev/ttyUSB0null Exiting Thread ::: /dev/ttyUSB0 Cycle No (Thread ::: /dev/ttyUSB0) ::::::: 227 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 184 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x203d2044, pid=32368, tid=2986859424 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing) # Problematic frame: # C 0x203d2044 # # An error report file with more information is saved as /tmp/hs_err_pid32368.log # # If you would like to submit a bug report, please visit: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Best regards Savago ps: Test environment $ uname -a Linux localhost.localdomain 2.6.15-1.2054_FC5 #1 Tue Mar 14 15:48:33 EST 2006 i686 i686 i386 GNU/Linux $ java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) $gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.1 20060525 (Red Hat 4.1.1-1) --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/c6ca8094/attachment-0003.html From Pawan.Kharbanda at dot.state.co.us Mon Aug 7 17:23:25 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 7 Aug 2006 17:23:25 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Trent, I think I got the problem fixed after some code changes in the C (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the staging environment (with 10 devices) with real time data and haven't seen a JVM lock/ Port locking since last night. I am going to do further stress testing and will send all my code changes and my findings in next few days. I believe the problem was causing due to the digi drivers and how the Linux kernel talked to it, so after making some code changes and synchronization fixes, I got it to work. I am keeping my fingers crossed :) Thanks for all your help. You have been a great help. Will keep you posted. Cheers ~pk PS : We are going to test my new RXTX changes with the 2.6 Red Hat kernel (currently using 2.4.21-37.ELsmp) too. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 5:08 PM To: Kharbanda, Pawan Subject: RE: Port Locking / JVM Crashing Hi Pawan As mentioned I did reproduce the error but after several hours of cycles. I'm looking at RXTXPort.java and thinking about what may be happening. The error is in the C layer but it may be preventable in the java code. lets say two closes are overlapping or an operation is trying to happen while another port is closing. The structure may be out of sync by the time the code using the structure in another thread gets to the event info struct. So I'm wondering if synchronization in RXTXPort() and close() may help you. A second thing that may help is you can put printf("got here\n"); in each of the lines in initialize event info struct to verify that the problem is in walking the linked list. Thats my suspicion. So a properly timed close() while calling the constructor may be catching rxtx off guard. You can synchronize to test that and it may do away with the problem. From tjarvi at qbang.org Mon Aug 7 18:01:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 18:01:54 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Message-ID: Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do further > stress testing and will send all my code changes and my findings in next > few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to happen > while another port is closing. The structure may be out of sync by the > time the code using the structure in another thread gets to the event > info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may do > away with the problem. > From Pawan.Kharbanda at dot.state.co.us Tue Aug 8 13:49:14 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 8 Aug 2006 13:49:14 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Trent, I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and have absolutely no problem with JVM crashing or Port Locking even after 10000 operations (now I am trying 100,000 :). This is all with the original RXTX 2.1.7 (final) api's without any of my fixes that I have been trying for last 2-3 weeks. I will suggest that we update the INSTALL or Readme file accompnying the RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: 82000685_G 02/02/2006). This should helped everybody using the RXTX API's with RedHat Linux atleast. Regards Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 6:02 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do > further stress testing and will send all my code changes and my > findings in next few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers > crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to > happen while another port is closing. The structure may be out of > sync by the time the code using the structure in another thread gets > to the event info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may > do away with the problem. > From jimo at earthlink.net Wed Aug 9 21:21:00 2006 From: jimo at earthlink.net (Jim Owen) Date: Wed, 9 Aug 2006 20:21:00 -0700 Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat Message-ID: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Hi All, I've run into some difficulties with rxtx that have me baffled and need some help. I have an application that has used earlier versions of rxtx successfully and on a variety of platforms. We recently needed to deploy this application into an environment where we could not utilize lock files. I pulled down the 2.0.7 pre1 source distribution and executed configure with --disable-lockfiles. I then executed make and make install. When I execute the program, as root, I get the following error: ************************************************************************ Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) # Problematic frame: # C 0x00001004 # # An error report file with more information is saved as hs_err_pid20151.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # **************************************************************************** If I execute as a normal user, I get no errors, but no ports listed: (Using an earlier version, I get a serial and parallel port listed.) **************************************************************************** [jim at linuxDev ingenicoApp]$ java VerifyCommBuild Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Some ports appear to have been found, let's try to enumerate them. Complete. **************************************************************************** When I built rxtx, there was a warning given of the following: **************************************************************************** conftest.c: In function 'main': conftest.c:6: warning: incompatible implicit declaration of built-in function 'printf' conftest.c:7: warning: incompatible implicit declaration of built-in function 'exit' WARNING: Kernel include files do not match the current kernel **************************************************************************** uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux JAVA_HOME=/usr/java/j2sdk1.4.2_11 javax.comm.properties: Driver=gnu.io.RXTXCommDriver Here's the code for VerifyCommBuild.java that I'm using to test: **************************************************************************** import javax.comm.*; import java.util.Enumeration; /** * A quick app to check that the javax.comm (Serial) Communications extension has been properly * installed and configured on this machine. * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. */ public class VerifyCommBuild { public static void main(String args[]) { Enumeration ports; System.out.println("Verifying Comm Build Environment"); try { ports = CommPortIdentifier.getPortIdentifiers(); if (ports == null) { System.out.println("No comm ports found!"); return; } System.out.println("Some ports appear to have been found, let's try to enumerate them."); while (ports.hasMoreElements()) { System.out.println("Here is a port [" + ((CommPortIdentifier)ports.nextElement()).getName() + "]"); } } catch (Exception e) { System.out.println("Failed to enumerate ports [" + e.getMessage() + "]"); e.printStackTrace(); } System.out.println("Complete."); } } **************************************************************************** Any suggestions as to what I'm missing? Thanks, Jim Owen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060809/92503a81/attachment-0003.html From tjarvi at qbang.org Thu Aug 10 05:39:36 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 05:39:36 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Message-ID: On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even after > 10000 operations (now I am trying 100,000 :). This is all with the > original RXTX 2.1.7 (final) api's without any of my fixes that I have > been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying the > RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp > and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From oliver.archner at bayceer.uni-bayreuth.de Wed Aug 9 06:13:36 2006 From: oliver.archner at bayceer.uni-bayreuth.de (Oliver Archner) Date: Wed, 09 Aug 2006 14:13:36 +0200 Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() Message-ID: <44D9D170.5020806@bayceer.uni-bayreuth.de> Dear Users, i would like to send a byte to a parallel device. The following piece of code works well but throws an IOException in LPRPort$ParallelOutputStream.write() saying that everything is ok ?! Oliver import java.io.*; import gnu.io.*; public class Test { public static void main(String[] args) { RXTXCommDriver TxPort = new RXTXCommDriver(); ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", CommPortIdentifier.PORT_PARALLEL); OutputStream oStream = null; try { oStream = pPort.getOutputStream(); oStream.write((byte)0x51); } catch (IOException e) { e.printStackTrace(); } finally { try { if (oStream != null) oStream.close(); } catch (IOException e) { e.printStackTrace(); } } } } Output: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Der Vorgang wurde erfolgreich beendet. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at Test.main(Test.java:12) From tjarvi at qbang.org Thu Aug 10 18:12:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 18:12:27 -0600 (MDT) Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() In-Reply-To: <44D9D170.5020806@bayceer.uni-bayreuth.de> References: <44D9D170.5020806@bayceer.uni-bayreuth.de> Message-ID: On Wed, 9 Aug 2006, Oliver Archner wrote: > Dear Users, > > i would like to send a byte to a parallel device. > The following piece of code works well but throws an IOException in > LPRPort$ParallelOutputStream.write() saying that everything is ok ?! > > Oliver > > > import java.io.*; > import gnu.io.*; > > public class Test { > > public static void main(String[] args) { > RXTXCommDriver TxPort = new RXTXCommDriver(); > ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", > CommPortIdentifier.PORT_PARALLEL); > OutputStream oStream = null; > try { > oStream = pPort.getOutputStream(); > oStream.write((byte)0x51); > } catch (IOException e) { > e.printStackTrace(); > } finally { > try { > if (oStream != null) oStream.close(); > } catch (IOException e) { > e.printStackTrace(); > > } > } > > } > } > > Output: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Der Vorgang wurde erfolgreich beendet. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at Test.main(Test.java:12) WriteFile is returning a negative value or 0. I do not know what that exception is saying but it should be an IO Exception. The native code in question is line 405 in ParallelImp.c. If you find the documentation pointing out how the code is wrong, we can fix it. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 08:12:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 09:12:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question Message-ID: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Hello, I'm trying to send data over a serial port using the RXTX libraries. I've got the binaries for Windows XP from qbang.org. On the receiving side, I'm using event notification (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial Ports InputStream. Similarly on the transmist side, I use SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. First question: does this make sense? The code was largely adopted from an existing Windows C++ program and that's more or less how it operated (overlapped io using ReadFile, WriteFile, GetOverlappedResult, Events, etc). Second question: in a small standalone test program I wrote, everything seems to work just fine - whenever SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good chunk of data available (I explicitly set the in/out buffers to 1024 bytes) to read. However, when I pull my "library" into a much larger environment (OSGI framework based, but same JVM/OS/etc), whenever SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a byte or two available. Needless to say, this really kills performance. Everything appears to still operate properly, just really, really slowly. So, has anyone seen this problem before? I haven't dived into the details of RXTX library, and I'm wondering what the mechanism is here? How does the RXTX thread determine when to issue the SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to tweak in RXTX or the JVM to get this to operate more like the small test program? Seems like I want RXTX to call me back _less_ often. Thanks, Pete From tjarvi at qbang.org Fri Aug 11 09:55:23 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 09:55:23 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Hello, > > I'm trying to send data over a serial port using the RXTX > libraries. I've got the binaries for Windows XP from qbang.org. > > On the receiving side, I'm using event notification > (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial > Ports InputStream. Similarly on the transmist side, I use > SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. > > First question: does this make sense? The code was largely adopted > from an existing Windows C++ program and that's more or less how it > operated (overlapped io using ReadFile, WriteFile, > GetOverlappedResult, Events, etc). > > Second question: in a small standalone test program I wrote, > everything seems to work just fine - whenever > SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good > chunk of data available (I explicitly set the in/out buffers to 1024 > bytes) to read. > > However, when I pull my "library" into a much larger environment > (OSGI framework based, but same JVM/OS/etc), whenever > SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a > byte or two available. Needless to say, this really kills > performance. Everything appears to still operate properly, just > really, really slowly. > > So, has anyone seen this problem before? I haven't dived into the > details of RXTX library, and I'm wondering what the mechanism is here? > How does the RXTX thread determine when to issue the > SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to > tweak in RXTX or the JVM to get this to operate more like the small > test program? > Seems like I want RXTX to call me back _less_ often. > Hi Pete RXTX is doing overlapped IO in termios.c. In this file we map the windows functionality to termios (mostly POSIX). From there, we just talk termios to all platforms. What I guess is happening is the eventloop is waiting a specified amount of time. As you application uses more cpu cycles, you observe the difference in behavior. You could go into the C code and change this after looking at the eventLoop() code in serialImp.c and following that to the serial_ioctl() and serial_select() in termios.c Another option is to go into RXTXPort.java and put a sleep in the sendEvent() code. This way you would not have to recompile the native code (not very easy at this point). -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 13:27:36 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:27:36 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > Another option is to go into RXTXPort.java and put a sleep in the > sendEvent() code. This way you would not have to recompile the native > code (not very easy at this point). Are the instructions in the INSTALL file still valid? If so, it wasn't very hard to build it (I already had MinGW installed). Everything seemed to build just fine. Haven't tried to install/use it yet, but it wasn't a big deal (assuming those instructions were correct. Thanks, Pete From pete.flugstad at gmail.com Fri Aug 11 13:42:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:42:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, but there doesn't appear to be a way to select that via RXTX (which appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control is selected). Is there a way I'm not seeing? Thanks, Pete From eddythejekyll at gmail.com Fri Aug 11 15:20:44 2006 From: eddythejekyll at gmail.com (Ed) Date: Fri, 11 Aug 2006 15:20:44 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion Message-ID: I'm trying to read and write a parallel port on a standard (Dell) pc running RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. I'm having problems getting rxtx to return a port enumeration from getPortIdentifiers. I'm using a file PortChooser.java as a test file to get things going. This is from the Java CookBook 2nd edition (Chapter 12). The call // get list of ports available on this particular computer, // by calling static method in CommPortIdentifier. Enumeration pList = CommPortIdentifier.getPortIdentifiers(); returns a null pList; I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and compile without --disable-lockfiles I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ... When I compile with --disable-lockfiles the call to getPortIdentifiers simply returns a null Enumeration. I've read the documention and threads about this issue and I feel like I've tried everything, so at the moment I'm stumped. I can supply any further info that may help. Thanks in advance. Ed -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060811/80c4eeec/attachment-0003.html From tjarvi at qbang.org Fri Aug 11 18:29:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:29:48 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > On 8/11/06, Trent Jarvi wrote: >> Another option is to go into RXTXPort.java and put a sleep in the >> sendEvent() code. This way you would not have to recompile the native >> code (not very easy at this point). > > Are the instructions in the INSTALL file still valid? If so, it > wasn't very hard to build it > (I already had MinGW installed). Everything seemed to build just > fine. Haven't tried to install/use it yet, but it wasn't a big deal > (assuming those instructions were correct. > Hi Pete The instructions are correct. You will want to make sure that the exports worked. If the library does not work properly, then the exports failed. The exports are currently generated with nm, sed and grep in the Makefile which is often commented out. If the def file is old, it will cause problems. You should be good to go then. Look at the serial_select and eventLoop code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:33:32 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:33:32 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > but there doesn't appear to be a way to select that via RXTX (which > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > is selected). > > Is there a way I'm not seeing? > Hi Pete I'm guessing I didn't know the difference. At the time, I really didn't have windows API documentation. I just had some pages I found with altivista/google. Later microsoft made their documentation available on msdn or I learned about it. For rxtx, the calls need to be platform neutral. So if you see how to do each in termios, then we can get it going. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:45:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:45:24 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Fri, 11 Aug 2006, Ed wrote: > I'm trying to read and write a parallel port on a standard (Dell) pc running > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. > > I'm having problems getting rxtx to return a port enumeration from > getPortIdentifiers. I'm using a file > PortChooser.java as a test file to get things going. This is from the Java > CookBook 2nd edition (Chapter 12). The call > > // get list of ports available on this particular computer, > // by calling static method in CommPortIdentifier. > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > returns a null pList; > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and > compile without --disable-lockfiles I get: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > ... > > When I compile with --disable-lockfiles the call to getPortIdentifiers > simply returns a null Enumeration. > > I've read the documention and threads about this issue and I feel like I've > tried everything, so at the moment I'm stumped. > > I can supply any further info that may help. > > Thanks in advance. > > Ed > Hi Ed You may want to check the permissions of /dev/lp*. Also make sure lp or your kernel support for lp is loaded. It should show up in dmesg and lsmod. For my laptop with no printer port enabled in BIOS is see: lp: driver loaded but no devices found in desg |grep lp [] $ ls -l /dev/lp* crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 here root and group lp can read and write. Normal users cannot. Try a simple read as a user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: Permission denied Fix as root [] chmod 666 /dev/lp* [] $ ls -l /dev/lp* crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 Now as user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: No such device or address So this is saying there is no lp0 on my laptop. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:58:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:58:31 -0600 (MDT) Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat In-Reply-To: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> References: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Message-ID: On Wed, 9 Aug 2006, Jim Owen wrote: > Hi All, > > I've run into some difficulties with rxtx that have me baffled and need > some help. > > I have an application that has used earlier versions of rxtx > successfully and on a variety of platforms. We recently needed to deploy > this application into an environment where we could not utilize lock files. > > I pulled down the 2.0.7 pre1 source distribution and executed configure > with --disable-lockfiles. I then executed make and make install. > > When I execute the program, as root, I get the following error: > > ************************************************************************ > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) > # Problematic frame: > # C 0x00001004 > # > # An error report file with more information is saved as hs_err_pid20151.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > **************************************************************************** > > If I execute as a normal user, I get no errors, but no ports listed: > (Using an earlier version, I get a serial and parallel port listed.) > > **************************************************************************** > [jim at linuxDev ingenicoApp]$ java VerifyCommBuild > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Some ports appear to have been found, let's try to enumerate them. > Complete. > **************************************************************************** > > When I built rxtx, there was a warning given of the following: > > **************************************************************************** > conftest.c: In function 'main': > conftest.c:6: warning: incompatible implicit declaration of built-in > function 'printf' > conftest.c:7: warning: incompatible implicit declaration of built-in > function 'exit' > > WARNING: Kernel include files do not match the current kernel > **************************************************************************** > > > uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 > Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux > > JAVA_HOME=/usr/java/j2sdk1.4.2_11 > > javax.comm.properties: Driver=gnu.io.RXTXCommDriver > > Here's the code for VerifyCommBuild.java that I'm using to test: > > > **************************************************************************** > import javax.comm.*; > import java.util.Enumeration; > /** > * A quick app to check that the javax.comm (Serial) Communications > extension has been properly > * installed and configured on this machine. > * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. > */ > public class VerifyCommBuild > { > public static void main(String args[]) > { > Enumeration ports; > System.out.println("Verifying Comm Build Environment"); > try > { > ports = CommPortIdentifier.getPortIdentifiers(); > if (ports == null) > { > System.out.println("No comm ports found!"); > return; > } > System.out.println("Some ports appear to have been found, let's > try to enumerate them."); > while (ports.hasMoreElements()) > { > System.out.println("Here is a port [" + > ((CommPortIdentifier)ports.nextElement()).getName() > + "]"); > } > } catch (Exception e) > { > System.out.println("Failed to enumerate ports [" + > e.getMessage() + "]"); > e.printStackTrace(); > } > System.out.println("Complete."); > } > } > Hi Jim This is a new one to me. Have you tried it on another system. Maybe something isnt sane in your toolchain. -- Trent Jarvi tarvi at qbang.org From eddythejekyll at gmail.com Sat Aug 12 11:45:39 2006 From: eddythejekyll at gmail.com (Ed) Date: Sat, 12 Aug 2006 11:45:39 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Trent, Right after I sent the results indicated below I re-ran the app and it apparently found the parallel port. The difference was that I set the permissions to : /dev: wildcard lp* crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 I'm still not sure how to interpret the dmesg and lsmod before. However I'm thinking that since the user now has permission to access the lp* port, a request to access it loaded the lp and parport modules automatically and allowed me access. Here's the output of lsmod now: ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp lp 5540 0 (autoclean) parport 21608 1 (autoclean) [parport_pc lp] and dmesg: ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp On node 0 totalpages: 161776 lp0: using parport0 (polling). So I think I'm good, and ready to move on the next steps. Thanks Trent! Ed On 8/12/06, Ed wrote: > > Thanks for the reply Trent. > > I'm on a different system today but am trying your suggestons. This is a > debian 3.1r2 system and I'm running jdk 1.5.0_04. > > Take a look below, but I think I have no parallel port support on this > kernel, however I never get the "No such device or address" return from the > cat call as you did so I'm not sure how to interpret the results. > > When I run the test program (PortChooser.java), the getPortIdentifiers > call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is > more than I found on the RedHat system. Incidently --disable-lockfiles has > no effect. > > It looks as though there is no parallel support in this kernel: > falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > On node 0 totalpages: 161776 > falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > > I'm a little confused by the results when I cat to the lp0 device. It > seems from the dmesg output that I don't have parallel printer support, but > when I cat to the lp0 device, I get permission denied if I'm non-root user > and input/output error if I'm root. Apparently this means I have the device, > but no support in the kernel? > > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > ed at falcon:~/src/workspace/EASServer/src$ su > Password: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > > Here's my lp* device permissions. > /dev: > wildcard lp* > crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > If I change it to > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I get: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > falcon:/home/ed/src/workspace/EASServer/src# exit > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > cat: /dev/lp0: Input/output error > ed at falcon:~/src/workspace/EASServer/src$ > > What do you think? Should I recompile the kernel or is it something else? > > By the way, I added the user ed to the lp and uucp groups on this system. > > Thanks again, > > Ed > > On 8/11/06, Trent Jarvi wrote: > > > > On Fri, 11 Aug 2006, Ed wrote: > > > > > I'm trying to read and write a parallel port on a standard (Dell) pc > > running > > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > > gates. > > > > > > I'm having problems getting rxtx to return a port enumeration from > > > getPortIdentifiers. I'm using a file > > > PortChooser.java as a test file to get things going. This is from the > > Java > > > CookBook 2nd edition (Chapter 12). The call > > > > > > // get list of ports available on this particular computer, > > > // by calling static method in CommPortIdentifier. > > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > > > > > returns a null pList; > > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure > > and > > > compile without --disable-lockfiles I get: > > > > > > Stable Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7 > > > Java lib Version = RXTX-2.1-7 > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > ... > > > > > > When I compile with --disable-lockfiles the call to getPortIdentifiers > > > > > simply returns a null Enumeration. > > > > > > I've read the documention and threads about this issue and I feel like > > I've > > > tried everything, so at the moment I'm stumped. > > > > > > I can supply any further info that may help. > > > > > > Thanks in advance. > > > > > > Ed > > > > > > > Hi Ed > > > > You may want to check the permissions of /dev/lp*. Also make sure lp or > > your kernel support for lp is loaded. It should show up in dmesg and > > lsmod. > > > > For my laptop with no printer port enabled in BIOS is see: > > > > lp: driver loaded but no devices found > > > > in desg |grep lp > > > > [] $ ls -l /dev/lp* > > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > here root and group lp can read and write. Normal users cannot. > > > > Try a simple read as a user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > > > > Fix as root > > > > [] chmod 666 /dev/lp* > > [] $ ls -l /dev/lp* > > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > Now as user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: No such device or address > > > > So this is saying there is no lp0 on my laptop. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > > > -- > > Ed > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060812/c2afe1f8/attachment-0003.html From tjarvi at qbang.org Sat Aug 12 14:01:52 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 12 Aug 2006 14:01:52 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Remember that the lp code expects a printer - or something like it. There is a line that specifies the printer is online. If you are doing hobby work, you will need to raise that line or loop it back to something that is raised. If you just try reading a port with no device connected and online, there will be an error while trying to read. This should be addressed in the mail-list archives. On Sat, 12 Aug 2006, Ed wrote: > Trent, > Right after I sent the results indicated below I re-ran the app and it > apparently found the parallel port. The difference was that I set the > permissions to : > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I'm still not sure how to interpret the dmesg and lsmod before. However I'm > thinking that since the user now has permission to access the lp* port, a > request to access it loaded the lp and parport modules automatically and > allowed me access. Here's the output of lsmod now: > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > lp 5540 0 (autoclean) > parport 21608 1 (autoclean) [parport_pc lp] > > and dmesg: > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > On node 0 totalpages: 161776 > lp0: using parport0 (polling). > > So I think I'm good, and ready to move on the next steps. > > Thanks Trent! > > Ed > > > On 8/12/06, Ed wrote: >> >> Thanks for the reply Trent. >> >> I'm on a different system today but am trying your suggestons. This is a >> debian 3.1r2 system and I'm running jdk 1.5.0_04. >> >> Take a look below, but I think I have no parallel port support on this >> kernel, however I never get the "No such device or address" return from the >> cat call as you did so I'm not sure how to interpret the results. >> >> When I run the test program (PortChooser.java), the getPortIdentifiers >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is >> more than I found on the RedHat system. Incidently --disable-lockfiles has >> no effect. >> >> It looks as though there is no parallel support in this kernel: >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp >> On node 0 totalpages: 161776 >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp >> >> I'm a little confused by the results when I cat to the lp0 device. It >> seems from the dmesg output that I don't have parallel printer support, but >> when I cat to the lp0 device, I get permission denied if I'm non-root user >> and input/output error if I'm root. Apparently this means I have the >> device, >> but no support in the kernel? >> >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> >> cat: /dev/lp0: Permission denied >> ed at falcon:~/src/workspace/EASServer/src$ su >> Password: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> >> Here's my lp* device permissions. >> /dev: >> wildcard lp* >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> If I change it to >> /dev: >> wildcard lp* >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> I get: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> falcon:/home/ed/src/workspace/EASServer/src# exit >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> ed at falcon:~/src/workspace/EASServer/src$ >> >> What do you think? Should I recompile the kernel or is it something else? >> >> By the way, I added the user ed to the lp and uucp groups on this system. >> >> Thanks again, >> >> Ed >> >> On 8/11/06, Trent Jarvi wrote: >> > >> > On Fri, 11 Aug 2006, Ed wrote: >> > >> > > I'm trying to read and write a parallel port on a standard (Dell) pc >> > running >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the >> > gates. >> > > >> > > I'm having problems getting rxtx to return a port enumeration from >> > > getPortIdentifiers. I'm using a file >> > > PortChooser.java as a test file to get things going. This is from the >> > Java >> > > CookBook 2nd edition (Chapter 12). The call >> > > >> > > // get list of ports available on this particular computer, >> > > // by calling static method in CommPortIdentifier. >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); >> > > >> > > returns a null pList; >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure >> > and >> > > compile without --disable-lockfiles I get: >> > > >> > > Stable Library >> > > ========================================= >> > > Native lib Version = RXTX-2.1-7 >> > > Java lib Version = RXTX-2.1-7 >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > ... >> > > >> > > When I compile with --disable-lockfiles the call to getPortIdentifiers >> > >> > > simply returns a null Enumeration. >> > > >> > > I've read the documention and threads about this issue and I feel like >> > I've >> > > tried everything, so at the moment I'm stumped. >> > > >> > > I can supply any further info that may help. >> > > >> > > Thanks in advance. >> > > >> > > Ed >> > > >> > >> > Hi Ed >> > >> > You may want to check the permissions of /dev/lp*. Also make sure lp or >> > your kernel support for lp is loaded. It should show up in dmesg and >> > lsmod. >> > >> > For my laptop with no printer port enabled in BIOS is see: >> > >> > lp: driver loaded but no devices found >> > >> > in desg |grep lp >> > >> > [] $ ls -l /dev/lp* >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > here root and group lp can read and write. Normal users cannot. >> > >> > Try a simple read as a user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: Permission denied >> > >> > Fix as root >> > >> > [] chmod 666 /dev/lp* >> > [] $ ls -l /dev/lp* >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > Now as user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: No such device or address >> > >> > So this is saying there is no lp0 on my laptop. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > >> >> >> >> -- >> >> Ed >> > > > > From pete.flugstad at gmail.com Mon Aug 14 07:51:41 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 08:51:41 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: <84d4a6d50608140651h3cb2266ap90c47780abace00@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > On Fri, 11 Aug 2006, Pete Flugstad wrote: > > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > > but there doesn't appear to be a way to select that via RXTX (which > > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > > is selected). > > I'm guessing I didn't know the difference. At the time, I really didn't > have windows API documentation. I just had some pages I found with > altivista/google. Later microsoft made their documentation available on > msdn or I learned about it. > > For rxtx, the calls need to be platform neutral. So if you see how to do > each in termios, then we can get it going. so, RTSCTS_IN/OUT at the COMM API is mapped to HARDWARE_FLOW_CONTROL in the POSIX layer. Which termios.c maps to RTS_CONTROL_HANDSHAKE and fOutxCtsFlow = true. Since termios.c is Windows only anway... Would it work to change the mapping in termios.c to map hardware flow control to RTS_CONTROL_TOGGLE? I just wondering (I'm going to go look, but there's a lot of code in there) if the code does anything special playing with flow control signals? Thanks, Pete From pete.flugstad at gmail.com Mon Aug 14 09:42:48 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 10:42:48 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> On 8/3/06, Trent Jarvi wrote: > On Thu, 3 Aug 2006, Pete Flugstad wrote: > > Okay, I can understand that, but from the PORTMON output, it looks > > like it's opening each port TWICE: > > I think this problem is in RXTXCommDriver.java. I've just not tracked it > down but it should be in the java code, not the native code so easy > enough to track down. Okay, I'm trying to track this down... Looks like the CommPortIdentifier static initializer loads RXTXCommDriver, and then calls RXTXDriver.initialize. But then CommPortIdentifier.getPortIdentifiers does the exact same thing. So that's where the two scans are coming from. I would guess that one or the other can be removed? Probably the one in the CommPortIdentifier.getPortIdentifiers? Doing so removes the 2nd scan. Pete PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) val = System.getProperty("gnu.io.SerialPorts"); Shouldn't the comparison be != null? getProperty returns null if the variable is NOT found, and you only want to assign to val if it IS found, right? Same thing for the parallel port case. End result is the same I guess, since you check for null later, but probably should be fixed. From eddythejekyll at gmail.com Mon Aug 14 11:55:17 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 11:55:17 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: When I try to get the mode with int mode = pPort.getMode(); it returns 0 which isn't any of the valid modes. I tried setting it explicitely with pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced the requested mode in nativeSetSerialPortParams at gnu.io.LPRPort.setLPRMode(Native Method) at gnu.io.LPRPort.setMode(LPRPort.java:87) Except for LPT_MODE_ANY, but the getMode call still failed out with an invalid state. I'm wondering if it's because I don't have the line pulled high like you said. This isn't a printer connected. It's a relay board with pins 2-9 tied to data, and 18-25 to gnd. The rest are open. I looked at a DB25 pinout diagram and I'm not sure which pin I need to tie high, and I looked through the archives, but didn't find a reference to something definitive. Can someone help me with which pin is the "online" pin as Trent mentioned? DB25 spec has ( I hope this formats correctly in this email) BUSY (11), SEL (13) or INIT (16) are candidates, but I'm guessing. Any clues? *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Thanks, Ed On 8/12/06, Trent Jarvi wrote: > > > Remember that the lp code expects a printer - or something like it. There > is a line that specifies the printer is online. If you are doing hobby > work, you will need to raise that line or loop it back to something that > is raised. > > If you just try reading a port with no device connected and online, there > will be an error while trying to read. This should be addressed in the > mail-list archives. > > On Sat, 12 Aug 2006, Ed wrote: > > > Trent, > > Right after I sent the results indicated below I re-ran the app and it > > apparently found the parallel port. The difference was that I set the > > permissions to : > > /dev: > > wildcard lp* > > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > > > I'm still not sure how to interpret the dmesg and lsmod before. However > I'm > > thinking that since the user now has permission to access the lp* port, > a > > request to access it loaded the lp and parport modules automatically and > > allowed me access. Here's the output of lsmod now: > > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > > lp 5540 0 (autoclean) > > parport 21608 1 (autoclean) [parport_pc lp] > > > > and dmesg: > > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > > On node 0 totalpages: 161776 > > lp0: using parport0 (polling). > > > > So I think I'm good, and ready to move on the next steps. > > > > Thanks Trent! > > > > Ed > > > > > > On 8/12/06, Ed wrote: > >> > >> Thanks for the reply Trent. > >> > >> I'm on a different system today but am trying your suggestons. This is > a > >> debian 3.1r2 system and I'm running jdk 1.5.0_04. > >> > >> Take a look below, but I think I have no parallel port support on this > >> kernel, however I never get the "No such device or address" return from > the > >> cat call as you did so I'm not sure how to interpret the results. > >> > >> When I run the test program (PortChooser.java), the getPortIdentifiers > >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this > is > >> more than I found on the RedHat system. Incidently --disable-lockfiles > has > >> no effect. > >> > >> It looks as though there is no parallel support in this kernel: > >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > >> On node 0 totalpages: 161776 > >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > >> > >> I'm a little confused by the results when I cat to the lp0 device. It > >> seems from the dmesg output that I don't have parallel printer support, > but > >> when I cat to the lp0 device, I get permission denied if I'm non-root > user > >> and input/output error if I'm root. Apparently this means I have the > >> device, > >> but no support in the kernel? > >> > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> > >> cat: /dev/lp0: Permission denied > >> ed at falcon:~/src/workspace/EASServer/src$ su > >> Password: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> > >> Here's my lp* device permissions. > >> /dev: > >> wildcard lp* > >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> If I change it to > >> /dev: > >> wildcard lp* > >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> I get: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> falcon:/home/ed/src/workspace/EASServer/src# exit > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> ed at falcon:~/src/workspace/EASServer/src$ > >> > >> What do you think? Should I recompile the kernel or is it something > else? > >> > >> By the way, I added the user ed to the lp and uucp groups on this > system. > >> > >> Thanks again, > >> > >> Ed > >> > >> On 8/11/06, Trent Jarvi wrote: > >> > > >> > On Fri, 11 Aug 2006, Ed wrote: > >> > > >> > > I'm trying to read and write a parallel port on a standard (Dell) > pc > >> > running > >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > >> > gates. > >> > > > >> > > I'm having problems getting rxtx to return a port enumeration from > >> > > getPortIdentifiers. I'm using a file > >> > > PortChooser.java as a test file to get things going. This is from > the > >> > Java > >> > > CookBook 2nd edition (Chapter 12). The call > >> > > > >> > > // get list of ports available on this particular computer, > >> > > // by calling static method in CommPortIdentifier. > >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > >> > > > >> > > returns a null pList; > >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I > configure > >> > and > >> > > compile without --disable-lockfiles I get: > >> > > > >> > > Stable Library > >> > > ========================================= > >> > > Native lib Version = RXTX-2.1-7 > >> > > Java lib Version = RXTX-2.1-7 > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > ... > >> > > > >> > > When I compile with --disable-lockfiles the call to > getPortIdentifiers > >> > > >> > > simply returns a null Enumeration. > >> > > > >> > > I've read the documention and threads about this issue and I feel > like > >> > I've > >> > > tried everything, so at the moment I'm stumped. > >> > > > >> > > I can supply any further info that may help. > >> > > > >> > > Thanks in advance. > >> > > > >> > > Ed > >> > > > >> > > >> > Hi Ed > >> > > >> > You may want to check the permissions of /dev/lp*. Also make sure lp > or > >> > your kernel support for lp is loaded. It should show up in dmesg and > >> > lsmod. > >> > > >> > For my laptop with no printer port enabled in BIOS is see: > >> > > >> > lp: driver loaded but no devices found > >> > > >> > in desg |grep lp > >> > > >> > [] $ ls -l /dev/lp* > >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > here root and group lp can read and write. Normal users cannot. > >> > > >> > Try a simple read as a user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: Permission denied > >> > > >> > Fix as root > >> > > >> > [] chmod 666 /dev/lp* > >> > [] $ ls -l /dev/lp* > >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > Now as user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: No such device or address > >> > > >> > So this is saying there is no lp0 on my laptop. > >> > > >> > -- > >> > Trent Jarvi > >> > tjarvi at qbang.org > >> > > >> > >> > >> > >> -- > >> > >> Ed > >> > > > > > > > > > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/59164078/attachment-0003.html From eddythejekyll at gmail.com Mon Aug 14 14:19:58 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 14:19:58 -0600 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? Message-ID: I'm using the ParallelPort class to drive a relay board. According to Mr. Jarvi, since this board isn't a printer, there will be a read error unless I hold the "printer online" line high in order to make the API think I'm talking to a printer. The problem is, I can't figure out which line is the "printer online". My DB25 spec lists the following: *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Anyone know which one I should tie high? I tried the busy line and it still errored out on the read. Thanks in advance, -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/66cf3c3e/attachment-0003.html From tjarvi at qbang.org Mon Aug 14 18:06:29 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:06:29 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Mon, 14 Aug 2006, Ed wrote: > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > which isn't any of the valid modes. I tried setting it explicitely with > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced > the requested mode in nativeSetSerialPortParams > at gnu.io.LPRPort.setLPRMode(Native Method) > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > invalid state. This is because rxtx only supports the basics. JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } One could program in more support. When I did that I just had a daisy wheel printer to test with and doing any more would have been blind. So that behavior is expected. I'll look to see if the Parallel Complete book mentions which pins you need to raise. If you look in the source code [ParallelImp.c] you can see this code isn't well tested. It has worked for hobby use in the past as I'd guess you are trying to do. But my experience with the code is as is mentioned in the top of the source: /* fear he who enter here. It appears that things have changed. An attempt has been made to put things the way the should be. It compiles and ParallelBlackBox runs. No further guarantees. Well... One.. it will print "Hello World!" on an epson DX 10 printer. you know.. the 10 character per second daisy wheel printer ;) - Trent Jarvi */ That comment is from 1997 or so. Since then some windows support was contributed but it is still very green code. We get about four requests for parallel support a year so its just not a well traveled area. It would be nice to have some documentation for the people trying to hook parallel ports to electronic projects. That appears to be the exclusive use of the Parallel support. The wiki pages are intended to let people share information like this to help each other in their projects as they figure out the details. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Aug 14 18:40:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:40:40 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: > PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): > > if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) > val = System.getProperty("gnu.io.SerialPorts"); > > Shouldn't the comparison be != null? getProperty returns null if the > variable is NOT found, and you only want to assign to val if it IS > found, right? Same thing for the > parallel port case. End result is the same I guess, since you check > for null later, > but probably should be fixed. I think this is just a fallback to the second property. gnu.io.SerialPorts isn't documented but perhaps it is used. It should behave properly as documented in INSTALL. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 14 18:56:55 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 19:56:55 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: <44E11BD7.5030102@gmail.com> Trent Jarvi wrote: >> PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): >> >> if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) >> val = System.getProperty("gnu.io.SerialPorts"); >> > > I think this is just a fallback to the second property. > gnu.io.SerialPorts isn't documented but perhaps it is used. It should > behave properly as documented in INSTALL. Doh - yup, I missed the fact that the property names were different... Pete From berkland at spamcop.net Mon Aug 14 19:58:21 2006 From: berkland at spamcop.net (Doug Berkland) Date: Mon, 14 Aug 2006 21:58:21 -0400 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? In-Reply-To: References: Message-ID: <269e40090608141858g698c2579v8d962deca3f4df53@mail.gmail.com> Based on memory and this page as confirmation, I would say pin 13 is the "Online" pin for SPP (standard parallel port). http://www.quatech.com/support/comm-over-parallel.php On 8/14/06, Ed wrote: > > I'm using the ParallelPort class to drive a relay board. According to Mr. > Jarvi, since this board isn't a printer, there will be a read error unless I > hold the "printer online" line high in order to make the API think I'm > talking to a printer. The problem is, I can't figure out which line is the > "printer online". My DB25 spec lists the following: > > *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and > Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data > Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 > D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select > 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select > In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit > 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 > Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and > Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground > > Anyone know which one I should tie high? I tried the busy line and it > still errored out on the read. > > Thanks in advance, > > -- > Ed > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/842bb770/attachment-0003.html From eddythejekyll at gmail.com Mon Aug 14 20:25:42 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 20:25:42 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Ah, I see. I've seen the caveats about limited Parallel support, but I thought it was mainly about the javax.comm package. The gnu.io is derived from javax.comm package right? That is, is the parallel support in rxtx is a superset of what's in javax.comm? I'm using this not for hobby usage, but for some simple instrumenation and control. If the project mandates it, I'll gladly work on extending the support. In the meantime, I need to get some sanity checks working, and repair my relay board (I smoked the ULN2803 chip, apparently by tying the BUSY (pin 11) to vcc). I guess I'll try the SEL pin next (and a supply of 2803s) with a ~1K pullup. The caveat in the comment block isn't very encouraging (!), but I borrowed an old Epson Stylus Color 600 printer to see what I can do. If I can write out characters to it I'll be happy. Parallel printers aren't easy to find these days. I haven't yet looked at the native source, yet, but I've just imported it into eclipse and I'll surf around a bit. Ed On 8/14/06, Trent Jarvi wrote: > > On Mon, 14 Aug 2006, Ed wrote: > > > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > > which isn't any of the valid modes. I tried setting it explicitely with > > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to > proced > > the requested mode in nativeSetSerialPortParams > > at gnu.io.LPRPort.setLPRMode(Native Method) > > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > > invalid state. > > This is because rxtx only supports the basics. > > JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > jclass jclazz, jint mode) > { > switch(mode) > { > case LPT_MODE_ANY: > break; > case LPT_MODE_SPP: > case LPT_MODE_PS2: > case LPT_MODE_EPP: > case LPT_MODE_ECP: > case LPT_MODE_NIBBLE: > default: > throw_java_exception( env, > UNSUPPORTED_COMM_OPERATION, > "nativeSetSerialPortParams", > "setLPRMode was unable to proced the > requested \ > mode" > ); > } > return(JNI_TRUE); > } > > One could program in more support. When I did that I just had a daisy > wheel printer to test with and doing any more would have been blind. > > So that behavior is expected. I'll look to see if the Parallel Complete > book mentions which pins you need to raise. If you look in the source > code [ParallelImp.c] you can see this code isn't well tested. It has > worked for hobby use in the past as I'd guess you are trying to do. But > my experience with the code is as is mentioned in the top of the source: > > /* > fear he who enter here. It appears that things have changed. An > attempt > has been made to put things the way the should be. > > It compiles and ParallelBlackBox runs. No further guarantees. > > Well... One.. it will print "Hello World!" on an epson DX 10 > printer. > you know.. the 10 character per second daisy wheel printer ;) > > - Trent Jarvi > */ > > That comment is from 1997 or so. > > Since then some windows support was contributed but it is still very green > code. We get about four requests for parallel support a year so its just > not a well traveled area. > > It would be nice to have some documentation for the people trying to hook > parallel ports to electronic projects. That appears to be the exclusive > use of the Parallel support. The wiki pages are intended to let people > share information like this to help each other in their projects as they > figure out the details. > > -- > Trent Jarvi > tjarvi at qbang.org > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/fbb5ddb4/attachment-0003.html From lyon at docjava.com Tue Aug 15 06:06:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 15 Aug 2006 08:06:27 -0400 Subject: [Rxtx] smoking is bad for your health In-Reply-To: References: Message-ID: Hi All, If you are connecting to the parallel port and smoking chips, it is time for extra stuff to buffer the parallel port. You may be want more current, in which case driver transistors are needed, or, if you are using the port as an output only device, you may like to add your own bus transceiver (e.g., 74245), set for output. Do be careful to design this properly; http://www.beyondlogic.org/spp/parallel.htm Some people like to use Octal D-type F.F's with OC outputs, like a 74374, http://upgrade.cntc.ac.kr/data/ttl/74374.html I like this one, as it has the D FF's and can latch the outputs for presentation to slower electronics (like relays). But careful! A relay that needs more current than the family of the device you have selected will look like a short to ground, and you will smoke your bug! And MOBO's do NOT come with the ability to drive any load you like. Check the power specs on your relay and be sure to protect the chip against back EMF with a diode. It is best to smoke test this on a bread board BEFORE hooking it to the computer. And be sure you smoke test the corner points in the ckt for a while, lest it fail in the field. - Doug >Ah, I see. I've seen the caveats about limited >Parallel support, but I thought it was mainly >about the javax.comm package. The >gnu.io is derived from javax.comm >package right? That is, is the parallel support >in rxtx is a superset of what's in javax.comm? > >I'm using this not for hobby usage, but for some >simple instrumenation and control. If the >project mandates it, I'll gladly work on >extending the support. In the meantime, I need >to get some sanity checks working, and repair my >relay board (I smoked the ULN2803 chip, >apparently by tying the BUSY (pin 11) to vcc). I >guess I'll try the SEL pin next (and a supply of >2803s) with a ~1K pullup. > >The caveat in the comment block isn't very >encouraging (!), ?but?I borrowed an old Epson >Stylus Color 600 printer to see what I can do. >?If I can write out characters to it I'll be >happy. Parallel printers aren't easy to find >these days. > > I haven't yet looked at the native source, yet, >but I've just imported it into eclipse and I'll >surf around a bit. > >Ed > >On 8/14/06, Trent Jarvi <tjarvi at qbang.org> wrote: > >On Mon, 14 Aug 2006, Ed wrote: > >> When I try to get the mode with int mode = pPort.getMode(); it returns 0 >> which isn't any of the valid modes. I tried setting it explicitely with >> pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with >> >> gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced >> the requested mode in nativeSetSerialPortParams >> at gnu.io.LPRPort.setLPRMode(Native Method) >> at gnu.io.LPRPort.setMode(LPRPort.java:87) >> >> Except for LPT_MODE_ANY, but the getMode call still failed out with an >> invalid state. > >This is because rxtx only supports the basics. > >JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > ???????jclass jclazz, jint mode) >{ > ???????switch(mode) > ???????{ > ???????????????case LPT_MODE_ANY: > ???????????????????????break; > ???????????????case LPT_MODE_SPP: > ???????????????case LPT_MODE_PS2: > ???????????????case LPT_MODE_EPP: > ???????????????case LPT_MODE_ECP: > ???????????????case LPT_MODE_NIBBLE: > ???????????????default: > ???????????????????????throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, > ???????????????????????????????"nativeSetSerialPortParams", > ???????????????????????????????"setLPRMode was >unable to proced the requested \ > ???????????????????????????????mode" > ???????????????????????); > ???????} > ???????return(JNI_TRUE); >} > >One could program in more support.??When I did that I just had a daisy >wheel printer to test with and doing any more would have been blind. > >So that behavior is expected.??I'll look to see if the Parallel Complete >book mentions which pins you need to raise.??If you look in the source >code [ParallelImp.c] you can see this code isn't well tested.??It has >worked for hobby use in the past as I'd guess you are trying to do.??But >my experience with the code is as is mentioned in the top of the source: > >/* > fear he who enter here.??It appears that things have changed.??An attempt > has been made to put things the way the should be. > > ???????It compiles and ParallelBlackBox runs.??No further guarantees. > > ???????Well... One.. it will print "Hello World!" on an epson DX 10 printer. > ???????you know.. the 10 character per second daisy wheel printer ;) > > ???????- Trent Jarvi >*/ > >That comment is from 1997 or so. > >Since then some windows support was contributed but it is still very green >code.??We get about four requests for parallel support a year so its just >not a well traveled area. > >It would be nice to have some documentation for the people trying to hook >parallel ports to electronic projects.??That appears to be the exclusive >use of the Parallel support.??The wiki pages are intended to let people >share information like this to help each other in their projects as they >figure out the details. > >-- >Trent Jarvi >tjarvi at qbang.org > > > > >-- >Ed > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 15 13:26:16 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 15 Aug 2006 14:26:16 -0500 Subject: [Rxtx] crash with too much memory Message-ID: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded from qbang.org. I'm exercising the RXTX COMM serial interface, both in a small standalone test and with the same code pulled into a large OSGI framework setup. If I use the stock .jar/.dll's, then everything works correctly in both situations. I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 (mingw-special)). If I use my locally built version, then my small test case works just fine, both when run inside Eclipse and when run standalone on the command line. However, when I try and use my locally built .jar/.dll's in the large framework environment, then I get a JVM crash with the attached log. Normally this would lead me to think that I was running out of memory or something in the large environment, and when I try and play with the JVM memory args, some interesting things show up. In our large environment, we have -Xms32M/-Xmx1024M - this appears to be the problem. If I set max to something like 64M, then things work. The cross over point from working to failing seems to be around 32M/110M (works) and 32M/111M (fails). But 128M/128M works while 128M/129M fails. So it seems to have to do with how much memory is actually available, or something like that. The thing that occurs to me is if my GCC is somehow generating something like "near" calls. But when the JVM has a lot of RAM available, it puts the DLL up somehwere in the address space and then the near calls fail - far calls are needed. So, I'm thinking this is probably a difference in the MinGW GCC I'm using and the one that was used to build the stock binaries from qbang, or maybe some command line args were changed? So, I'm hoping someone will have an idea of what's going on here... Thanks, Pete From tjarvi at qbang.org Tue Aug 15 18:54:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 15 Aug 2006 18:54:04 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: On Tue, 15 Aug 2006, Pete Flugstad wrote: > I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded > from qbang.org. > > I'm exercising the RXTX COMM serial interface, both in a small > standalone test and with the same code pulled into a large OSGI > framework setup. > > If I use the stock .jar/.dll's, then everything works correctly in > both situations. > > I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 > (mingw-special)). > > If I use my locally built version, then my small test case works just > fine, both when run inside Eclipse and when run standalone on the > command line. However, when I try and use my locally built > .jar/.dll's in the large framework environment, then I get a JVM crash > with the attached log. > > Normally this would lead me to think that I was running out of memory > or something in the large environment, and when I try and play with > the JVM memory args, some interesting things show up. > > In our large environment, we have -Xms32M/-Xmx1024M - this appears to > be the problem. If I set max to something like 64M, then things work. > The cross over point from working to failing seems to be around > 32M/110M (works) and 32M/111M (fails). > But 128M/128M works while 128M/129M fails. So it seems to have to do > with how much memory is actually available, or something like that. > > The thing that occurs to me is if my GCC is somehow generating > something like "near" calls. But when the JVM has a lot of RAM > available, it puts the DLL up somehwere in the address space and then > the near calls fail - far calls are needed. > > So, I'm thinking this is probably a difference in the MinGW GCC I'm > using and the one that was used to build the stock binaries from > qbang, or maybe some command line args were changed? > > So, I'm hoping someone will have an idea of what's going on here... > Hi Pete The binaries are from the src. They should be reproducable. I did extensive testing of rxtx several years ago using mingw as the compiler. The version was 2.95. I have not changed versions since. There are way too many variables as it is. I have a linux->mingw cross compiler rpm I use for all windows use. If you want a copy of it you can have it. It isn't anything 'special' :) -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Thu Aug 17 11:49:24 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 17 Aug 2006 12:49:24 -0500 Subject: [Rxtx] crash with too much memory In-Reply-To: References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> On 8/15/06, Trent Jarvi wrote: > I did extensive testing of rxtx several years ago using mingw as the > compiler. The version was 2.95. I have not changed versions since. > There are way too many variables as it is. FYI, I believe I've solved this problem by changing how the dll's were built. The original mingw makefile was generating Serial.def, then performing various operations with dlltool and ld. I modified the makefile to create the dll using this page: as a guide. With that, there's no longer any need to deal with Serial.def and the makefile becomes _much_ simpler. This appears to have addressed my problems with crashing. FWIW, GCC 2.95 is _really_ old - you should consider investigating upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is supposed to generate a native binary (i.e. just like MinGW). Thanks, Pete From claretlc at yahoo.com Thu Aug 17 12:34:48 2006 From: claretlc at yahoo.com (Clare Cooley) Date: Thu, 17 Aug 2006 11:34:48 -0700 (PDT) Subject: [Rxtx] parallel port communication Message-ID: <20060817183448.76911.qmail@web53908.mail.yahoo.com> Hi, I'm trying to write a 1 to a bit 15 on a parallel port cable that isn't attached to a printer.(It's a control box for eye-tracking equipment.)I need to do this in Java. I looked at the javax.comm documentation, and it said, "Application programs should not directly create ParallelPortEvent objects." So is there a way to do this with your package? If not, do you have any suggestions of where to look? It really needs to be done in Java. Thanks, Clare Cooley __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From pat at xvalheru.org Thu Aug 17 13:13:52 2006 From: pat at xvalheru.org (pat) Date: Thu, 17 Aug 2006 21:13:52 +0200 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060817190751.M5586@xvalheru.org> Hi there, I've question(s) for you. I need to communicate with scale, I've used the Sun's direver. Now I've switched to Rxtx and the speed of the communication is perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, but the difference between the crash time is 5 second ... . My question is: Is there a stable driver ??? Or what I have to do to have stable enough serial port driver ??? OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. Thanks to all for the help. Pat From tjarvi at qbang.org Fri Aug 18 05:13:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 05:13:42 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> Message-ID: On Thu, 17 Aug 2006, Pete Flugstad wrote: > On 8/15/06, Trent Jarvi wrote: >> I did extensive testing of rxtx several years ago using mingw as the >> compiler. The version was 2.95. I have not changed versions since. >> There are way too many variables as it is. > > FWIW, GCC 2.95 is _really_ old - you should consider investigating > upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is > supposed to generate a native binary (i.e. just like MinGW). > It is really old but also well known like C itself. I have considered upgrading. The ToyBox builds should be gcc 3* cross-compiled. I'm not going to be validating gcc 3* w32 binaries though. It's looking like we will need to focus support on MSFT's toolchain for 64 bit windows support until it is possible for gcc to support w64. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Aug 18 05:32:10 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 07:32:10 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: Hi All, Does anyone know how to produce mac intel binaries on a Fedora Linux box? Thanks! - Doug From tjarvi at qbang.org Fri Aug 18 06:42:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 06:42:05 -0600 (MDT) Subject: [Rxtx] cross compilation for the mac In-Reply-To: References: Message-ID: On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Does anyone know how to produce > mac intel binaries on a Fedora Linux > box? > > Thanks! > - Doug Hi Doug You need to build the cross toolchain which means copying the Darwin/Mac binaries over to fedora. It would be nontrivial but possible. Do the Darwin libraries work with Mac in general? I'm not aware of the licensing issues associated with grabbing Mac binaries. Same with OpenSolaris/Solaris. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Aug 18 08:15:26 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 10:15:26 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> In theory building against Darwin would be sufficient to getting things working on MacOS X. You need to remember that Darwin is the low-level OS, while MacOS X adds the everything else on top. IOKit, which is the I/O API, is available as part of Darwin. The only thing you will need extra are the Java libraries. One thing is that I would recommend that when producing binaries for the Mac, is to ensure they are Universal binaries (PPC+Intel). Andre > > From: Trent Jarvi > Date: 2006/08/18 Fri AM 08:42:05 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] cross compilation for the mac > > On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > > > Hi All, > > Does anyone know how to produce > > mac intel binaries on a Fedora Linux > > box? > > > > Thanks! > > - Doug > > Hi Doug > > You need to build the cross toolchain which means copying the Darwin/Mac > binaries over to fedora. It would be nontrivial but possible. > > Do the Darwin libraries work with Mac in general? I'm not aware of the > licensing issues associated with grabbing Mac binaries. > > Same with OpenSolaris/Solaris. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Aug 18 13:43:16 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 15:43:16 -0400 Subject: [Rxtx] cross compilation for the mac In-Reply-To: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: >In theory building against Darwin would be sufficient to getting >things working on MacOS X. You need to remember that Darwin is the >low-level OS, while MacOS X adds the everything else on top. IOKit, >which is the I/O API, is available as part of Darwin. The only thing >you will need extra are the Java libraries. > >One thing is that I would recommend that when producing binaries for >the Mac, is to ensure they are Universal binaries (PPC+Intel). > >Andre I find the xcode ide for generating a mix of universal binaries and java very difficult to make work. Is there a way to do this with make files? Thanks! - Doug From ajmas at sympatico.ca Fri Aug 18 13:54:55 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 15:54:55 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818195455.PGAP29052.tomts13-srv.bellnexxia.net@smtp1.sympatico.ca> It should be doable. XCode hands off the compilation process to gcc et al, for the compilation of C/C++ code and to javac et al. for the Java side. While ant is the favoured tool for 'automated' Java compilation, make can easily be used. All is needed is someone to volounteer to do the work. Andre "Dr. Douglas Lyon" wrote > > >In theory building against Darwin would be sufficient to getting > >things working on MacOS X. You need to remember that Darwin is the > >low-level OS, while MacOS X adds the everything else on top. IOKit, > >which is the I/O API, is available as part of Darwin. The only thing > >you will need extra are the Java libraries. > > > >One thing is that I would recommend that when producing binaries for > >the Mac, is to ensure they are Universal binaries (PPC+Intel). > > > >Andre > > I find the xcode ide for generating a mix of universal binaries > and java very difficult to make work. Is there a way to do this > with make files? > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Fri Aug 18 16:34:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 16:34:46 -0600 (MDT) Subject: [Rxtx] serial driver newbe question and problem In-Reply-To: <20060817190751.M5586@xvalheru.org> References: <20060817190751.M5586@xvalheru.org> Message-ID: On Thu, 17 Aug 2006, pat wrote: > Hi there, > > I've question(s) for you. I need to communicate with scale, I've used the > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > but the difference between the crash time is 5 second ... . > > My question is: Is there a stable driver ??? Or what I have to do to have > stable enough serial port driver ??? > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > Thanks to all for the help. > > Pat > Could you describe the hardware you have, the version of rxtx and provide the log of the crash? Did you download binaries? I've not been seeing a jvm crash with rxtx -- Trent Jarvi tjarvi at qbang.org From lunareclipse03 at web.de Sat Aug 19 12:11:48 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 19 Aug 2006 20:11:48 +0200 Subject: [Rxtx] Problem solved! Message-ID: <920065539@web.de> Hi everybody, I posted some months ago and asked about some help on my very special problem concerning my win32 port of a communications library. Now I just want to inform you that no further "mindstorming" is needed because I solved the problem by completely rewriting the win32 port of the library. Now everything works fine. Thank you all for your time and patience. --Sven Ahlemann __________________________________________________________________________ Erweitern Sie FreeMail zu einem noch leistungsst?rkeren E-Mail-Postfach! Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131 From ajmas at sympatico.ca Mon Aug 21 09:58:23 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 21 Aug 2006 11:58:23 -0400 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060821155823.TLSM18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Next time that happens, including a copy of the crash log, produced by Windows could probably help too. Andre Trent Jarvi wrote: > > On Thu, 17 Aug 2006, pat wrote: > > > Hi there, > > > > I've question(s) for you. I need to communicate with scale, I've used the > > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > > but the difference between the crash time is 5 second ... . > > > > My question is: Is there a stable driver ??? Or what I have to do to have > > stable enough serial port driver ??? > > > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > > > Thanks to all for the help. > > > > Pat > > > > Could you describe the hardware you have, the version of rxtx and > provide the log of the crash? Did you download binaries? > > I've not been seeing a jvm crash with rxtx > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From adrian.l.parker at gmail.com Thu Aug 24 09:10:39 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Thu, 24 Aug 2006 11:10:39 -0400 Subject: [Rxtx] Portability issues Message-ID: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use RXTX 2.0? Does it provide system librairies that javax.comm does not? I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, or 2000, or server 2003). Can this be done with a single implementation of RXTX? I don't want to have different versions of Java code that have different package names. References: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Message-ID: On Thu, 24 Aug 2006, Adrian Parker wrote: > Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use > RXTX 2.0? Does it provide system librairies that javax.comm does not? > > I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's > OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, > or 2000, or server 2003). Can this be done with a single implementation of > RXTX? I don't want to have different versions of Java code that have > different package names. > Hi Adrian. The native code can support all of the platforms you mention. I've never compiled for unixware or openunix but the patches are in the code. So you would need to compile for that target. >From there you would probably be best off going with rxtx 2.1 so you have all the classes in one package. You can opt to use rxtx 2.0 with Sun's commapi for Solaris v 2. The main differences are rxtx 2.1 comes with all the source/classes and is in package gnu.io while Sun's requires rxtx for some platforms but is in package javax.comm. The low level code is the same in either case as far as rxtx is concerned. -- Trent Jarvi tarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 04:12:52 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 06:12:52 -0400 Subject: [Rxtx] Serial.addEventListener bug? Message-ID: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on OpenServer 5.0.7). Its what Sun packages. I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an exception. It seems to throw the exception if no listener was previously declared (although I've not had chance to verify). Is this desireable behaviour? Sun's original API doesn't mention anything about an exception on this function, http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) Of course this is an old version of RXTX, so perhaps this has been changed. -- Adrian Parker Simulation Software Developer DLCSPM 4-4-3 (c) Building A31, CFB Kingston Tel: (613) 541-5010 x3020 CSN: 271-3020 Email: parker at lsec.dnd.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/22e2ea57/attachment-0003.html From tjarvi at qbang.org Fri Aug 25 05:15:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 25 Aug 2006 05:15:44 -0600 (MDT) Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: On Fri, 25 Aug 2006, Adrian Parker wrote: > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > OpenServer 5.0.7). Its what Sun packages. > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > exception. It seems to throw the exception if no listener was previously > declared (although I've not had chance to verify). > > Is this desireable behaviour? Sun's original API doesn't mention anything > about an exception on this function, > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > Of course this is an old version of RXTX, so perhaps this has been changed. > > > What exception was thrown? You can replace 1.4-8 with 2.0 for testing purposes. They are the same package. I doubt Sun shipped or packaged that. I think Caldera/SCOx/... did at one point. There may still be updates on their pages. I recall them sending patches here which are in current rxtx. -- Trent Jarvi tjarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 05:28:32 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 07:28:32 -0400 Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: <7da71e910608250428q32b86632g9a67b1b4efe69830@mail.gmail.com> On 8/25/06, Trent Jarvi wrote: > > On Fri, 25 Aug 2006, Adrian Parker wrote: > > > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > > OpenServer 5.0.7). Its what Sun packages. > > > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > > exception. It seems to throw the exception if no listener was > previously > > declared (although I've not had chance to verify). > > > > Is this desireable behaviour? Sun's original API doesn't mention > anything > > about an exception on this function, > > > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > > > Of course this is an old version of RXTX, so perhaps this has been > changed. > > > > > > > > What exception was thrown? Its weird. I catch an Exception. But when on that exception I call getClass().getName() I end up with a NullPointerException. You can replace 1.4-8 with 2.0 for testing > purposes. They are the same package. > > I doubt Sun shipped or packaged that. Doh! I meant to say SCO sorry. I was surfing Sun's site when I wrote that :) Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/e43aed3a/attachment-0003.html From sjudd at seas.upenn.edu Sat Aug 26 16:42:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Sat, 26 Aug 2006 18:42:09 -0400 Subject: [Rxtx] Mac commapi Message-ID: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? If so, where do I get it? Sun has various versions at http://www.sun.com/download/products.xml?id=43208d3d but they are for SolarisSparc, SolarisX86, Linux, and Generic. Do I use the Generic one? If so, read on; otherwise redirect me. While using the Generic version, my attempt to run the BlackBox sample program elicits a message saying it "can't find javax.comm.properties". I found a note in the rxtx.org HowTo (for Linux) saying to create this thing in /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties but where should it go on the Mac? After reading many versions of documentation around, and updates and revisions and re-authorings, I have worked my way into a state of confusion and high uncertainty. Please release me. sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060826/02d6b163/attachment-0003.html From tod at todbot.com Sat Aug 26 17:08:33 2006 From: tod at todbot.com (Tod E. Kurt) Date: Sat, 26 Aug 2006 16:08:33 -0700 Subject: [Rxtx] Mac commapi In-Reply-To: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Message-ID: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> You don't need Sun's CommAPI. You just need RXTX. Once you download RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and the native library is ("librxtxSerial.jnilib" on Mac OS X) via the standard methods. For instance, if you've placed those two files in a directory called 'rxtxlib' and you want to run a Java class called HelloWorld in the current directory, do the following: % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar HelloWorld On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? > If so, where do I get it? Sun has various versions at > http://www.sun.com/download/products.xml?id=43208d3d > but they are for SolarisSparc, SolarisX86, Linux, and Generic. > Do I use the Generic one? > If so, read on; otherwise redirect me. > > While using the Generic version, my attempt to run the BlackBox > sample program > elicits a message saying it "can't find javax.comm.properties". > I found a note in the rxtx.org HowTo (for Linux) saying to create > this thing in > /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties > but where should it go on the Mac? > > After reading many versions of documentation around, and updates > and revisions > and re-authorings, I have worked my way into a state of confusion > and high > uncertainty. Please release me. > > sj > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From sjudd at seas.upenn.edu Sun Aug 27 22:55:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Mon, 28 Aug 2006 00:55:09 -0400 Subject: [Rxtx] Mac commapi In-Reply-To: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> Message-ID: This was immensely helpful. Thank you, Tod. I wish it had been explicit somewhere in the documentation; it would have saved me 2 days of grief. One hugely valuable thing like this little set of instructions is that it implicitly lists all the hundreds of things you DON"T have to do. I know it seems obvious to those in the know, but every little bit of help on an arcane topic like this opens up the product to an exponentially wider group of dilettantes. I managed to get the SerialDemo program (from Sun) to work too. Hurrah! However, it required changing all the javax.comm references to gnu.io which I had heard of due to all my rambling readings. Is there not a demo program on rxtx.org already available that would not have needed this? BTW, the link on the Projects page for jPIC[Source] sends a *.hex file to a PIC 16F877 or similar chip... takes me to nowhere useful. I do not understand what the name "Toybox" is meant to imply. Thanks, sj On 2006 Aug 26, at 7:08 PM, Tod E. Kurt wrote: > You don't need Sun's CommAPI. You just need RXTX. Once you download > RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and > the native library is ("librxtxSerial.jnilib" on Mac OS X) via the > standard methods. > > For instance, if you've placed those two files in a directory called > 'rxtxlib' and you want to run a Java class called HelloWorld in the > current directory, do the following: > > % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar > HelloWorld > > > On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > >> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? >> If so, where do I get it? Sun has various versions at >> http://www.sun.com/download/products.xml?id=43208d3d >> but they are for SolarisSparc, SolarisX86, Linux, and Generic. >> Do I use the Generic one? >> If so, read on; otherwise redirect me. >> >> While using the Generic version, my attempt to run the BlackBox >> sample program >> elicits a message saying it "can't find javax.comm.properties". >> I found a note in the rxtx.org HowTo (for Linux) saying to create >> this thing in >> /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties >> but where should it go on the Mac? >> >> After reading many versions of documentation around, and updates >> and revisions and re-authorings, I have worked my way into a state >> of confusion and high uncertainty. Please release me. >> >> sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060827/b80d6389/attachment-0003.html From pete.flugstad at gmail.com Mon Aug 28 12:38:27 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 13:38:27 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE Message-ID: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Okay, my understanding is that originally, RTS meant "Request to Send" - the DTE (the PC) would assert this and the DCE (modem) would assert "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send data. This really only provided uni-directional flow control, from the PC to the modem. Now, as I understand it, the more modern usage of RTS is that it is used for the DTE to assert flow control back to the DCE - basically it means "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) raises this, then the DCE(modem) is free to send data to the DTE - this allows the DTE(PC) to exert flow control back towards the DCE(modem). This discussion is based on the Serial HOWTO from: and lots of other reading... Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which is defined as: > Enables RTS flow-control handshaking. The driver raises the RTS line, > enabling the DCE to send, when the input buffer has enough room to > receive data. The driver lowers the RTS line, preventing the DCE to > send, when the input buffer does not have enough room to receive > data. If this value is used, it is an error for the application to adjust > the line with EscapeCommFunction. which clearly reflects the newer usage style - it keeps the RTS line high as long as there is space to _receive_ data. And takes it low when the receive/input buffer is getting full to stop the modem from sending it data. Does this jive with other peoples understanding of RTS usage? Unfortunately, the hardware I'm trying to talk to wants to use the OLD style of RTS line usage. An existing Windows C++ program uses RTS_CONTROL_TOGGLE, which documentation states: > Specifies that the RTS line will be high if bytes are available for transmission. > After all buffered bytes have been sent, the RTS line will be low. If this value is > set, it would be an error for an application to adjust the line with > EscapeCommFunction. This value is ignored in Windows 95; it causes the > driver to act as if RTS_CONTROL_ENABLE were specified. This seems to be the OLD RTS behavior, right? So, what I seem to need is to be able to control the RTS line, either using TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS when getting ready to TX and clear it when the output buffer is empty). Does this make sense, or am I off in the weeds? Thanks, Pete From tjarvi at qbang.org Mon Aug 28 18:21:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 28 Aug 2006 18:21:10 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: On Mon, 28 Aug 2006, Pete Flugstad wrote: > Okay, my understanding is that originally, RTS meant "Request to Send" > - the DTE (the PC) would assert this and the DCE (modem) would assert > "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send > data. This really only provided uni-directional flow control, from the PC to > the modem. > > Now, as I understand it, the more modern usage of RTS is that it is used > for the DTE to assert flow control back to the DCE - basically it means > "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) > raises this, then the DCE(modem) is free to send data to the DTE - this > allows the DTE(PC) to exert flow control back towards the DCE(modem). > > This discussion is based on the Serial HOWTO from: > > > > and lots of other reading... > > Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > is defined as: > >> Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > > which clearly reflects the newer usage style - it keeps the RTS line high > as long as there is space to _receive_ data. And takes it low when the > receive/input buffer is getting full to stop the modem from sending it data. > > Does this jive with other peoples understanding of RTS usage? > > Unfortunately, the hardware I'm trying to talk to wants to use the OLD > style of RTS line usage. An existing Windows C++ program uses > RTS_CONTROL_TOGGLE, which documentation states: > >> Specifies that the RTS line will be high if bytes are available for transmission. >> After all buffered bytes have been sent, the RTS line will be low. If this value is >> set, it would be an error for an application to adjust the line with >> EscapeCommFunction. This value is ignored in Windows 95; it causes the >> driver to act as if RTS_CONTROL_ENABLE were specified. > > This seems to be the OLD RTS behavior, right? > > So, what I seem to need is to be able to control the RTS line, either using > TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS > when getting ready to TX and clear it when the output buffer is empty). > > Does this make sense, or am I off in the weeds? > Hi Pete OK. That sounds right. I do not know how you would communicate the difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through CommAPI as it stands. I take it you did not find anything either? Perhaps the best thing to do for your code is to toggle the RTS yourself. This could be a feature in the future JSR API perhaps. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 28 20:54:34 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 21:54:34 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <44F3AC6A.10908@gmail.com> Trent Jarvi wrote: > OK. That sounds right. I do not know how you would communicate the > difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through > CommAPI as it stands. I take it you did not find anything either? > > Perhaps the best thing to do for your code is to toggle the > RTS yourself. This could be a feature in the future JSR API perhaps. Yeah, this is what I ended up doing. I had to modify the dll in order to be able to set hardware flow control (which I do want), but leave the RTS flow control at RS_CONTROL_ENABLE. After that I just toggle setRTS(true) when I'm ready to send and setRTS(false) when I get a OUTPUT_BUFFER_EMPTY notification. Haven't tested with real hardware yet, but it seems to work OK. Thanks for the feedback! Pete From Bob_Jacobsen at lbl.gov Tue Aug 29 08:49:02 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 29 Aug 2006 07:49:02 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >is defined as: > > > Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > >which clearly reflects the newer usage style - it keeps the RTS line high >as long as there is space to _receive_ data. And takes it low when the >receive/input buffer is getting full to stop the modem from sending it data. > >Does this jive with other peoples understanding of RTS usage? Can you point to any devices that actually implement this "new" understanding? I think the person who wrote that documentation paragraph is just confused. The original "RTS/CTS" handshaking was extended to input (from DCE to DTE) handshaking via the DTR (Data Terminal Ready) line. I think the person who wrote the double-quoted paragraph above was just confused between the directions, and mixed them up. If you change "RTS" to "DTR" in that paragraph, you get: > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > enabling the DCE to send, when the input buffer has enough room to > > receive data. The driver lowers the DTR line, preventing the DCE to > > send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. which describes how dozens of devices actually work for controlling flow into the DTE (computer). This then leaves RTS/CTS (with RTS usually just stuck high) for controlling flow into the DCE (peripheral). Again, lots of hardware devices actually do this. I don't work on Windows, so can't be sure of what happens. But on the MacOS X version of RXTX, CTS low stops transmission, exactly as the "old" style would expect. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From mschned at basis.com Tue Aug 29 12:57:45 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 12:57:45 -0600 Subject: [Rxtx] Porting to AIX Message-ID: <01f201c6cb9d$034d4f20$341416ac@basis.com> Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar From mschned at basis.com Tue Aug 29 13:58:05 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 13:58:05 -0600 Subject: [Rxtx] Porting to AIX References: <01f201c6cb9d$034d4f20$341416ac@basis.com> Message-ID: <024901c6cba5$714c3560$341416ac@basis.com> After looking through the build messages closer, there is an error building SerialImp.c: gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type Looks like B57600 is not defined and there are no definitions for DEVICEDIR and LOCKDIR on AIX. Can I just a the following to SerialImp.h? #if defined(__aix__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __aix__ */ Mark Schnedar ----- Original Message ----- From: "Mark E. Schnedar" To: Sent: Tuesday, August 29, 2006 12:57 PM Subject: [Rxtx] Porting to AIX Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 29 15:25:35 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 29 Aug 2006 16:25:35 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <84d4a6d50608291425i1fb819d3i615cf9b85b1e9617@mail.gmail.com> On 8/29/06, Bob Jacobsen wrote: > Can you point to any devices that actually implement this "new" understanding? > > I think the person who wrote that documentation paragraph is just confused. The paragraph is from the Windows documentation of its DCB structure which is used to configure the Serial Device. This is what RXTX uses internally. My version is from MSDN, and Google finds the same text here: (search for fRtsControl). I have not seen any mention anywhere of it being incorrect (and yes, I did look, because I thought the same thing). My discussion is based on trying to use RXTX to talk to a device that used the old style of one-way flow control (RTS is raised to SEND data from the PC to the device). An existing VC++ app use the old-style RTS_CONTROL_TOGGLE. RXTX did not - it used the newer style RTS_CONTROL_HANDSHAKE, so things didn't work - the device was seeing RTS HIGH all the time, so it was thinking that the PC was ready to TX all the time. When I switch RXTX to using RTS_CONTROL_ENABLED and manually control RTS, then things work correctly. The behavior is consistent with this understanding if I hook two serial ports on Windows XP in lookback (via null modem). I'd be very surprised if this had not been corrected by M$ by this time. The same structure has been around since WinNT (mid 1990's) - their documentation is typically pretty good. > > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > > enabling the DCE to send, when the input buffer has enough room to > > > receive data. The driver lowers the DTR line, preventing the DCE to > > > send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. There is a seperate field, fDtrControl, which you can set to DTR_CONTROL_HANDSHAKE, that appears to do exactly this. > This then leaves RTS/CTS (with RTS usually just stuck high) for > controlling flow into the DCE (peripheral). Again, lots of hardware > devices actually do this. > > I don't work on Windows, so can't be sure of what happens. But on > the MacOS X version of RXTX, CTS low stops transmission, exactly as > the "old" style would expect. Well, the Linux Serial HOWTO is where I got most of my information. And yes, I thought it was wrong as well, but it's apparently how things are implemented: Donno - but it works for me... Pete From tjarvi at qbang.org Tue Aug 29 19:11:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 29 Aug 2006 19:11:40 -0600 (MDT) Subject: [Rxtx] Porting to AIX In-Reply-To: <024901c6cba5$714c3560$341416ac@basis.com> References: <01f201c6cb9d$034d4f20$341416ac@basis.com> <024901c6cba5$714c3560$341416ac@basis.com> Message-ID: Hi Mark That should do it. You can put ifdef around the B57600 as we did with higher baudrates. You may want to use tip, minicom, kermit or some other serial application on the AIX to confirm that the lockfiles created are correct. Neat stuff. On Tue, 29 Aug 2006, Mark E. Schnedar wrote: > After looking through the build messages closer, > there is an error building SerialImp.c: > > gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o > /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type > > Looks like B57600 is not defined and there are no > definitions for DEVICEDIR and LOCKDIR on AIX. > > Can I just a the following to SerialImp.h? > > #if defined(__aix__) > # define DEVICEDIR "/dev/" > # define LOCKDIR "/var/lock" > # define LOCKFILEPREFIX "LCK.." > # define FHS > #endif /* __aix__ */ > > Mark Schnedar > > > ----- Original Message ----- > From: "Mark E. Schnedar" > To: > Sent: Tuesday, August 29, 2006 12:57 PM > Subject: [Rxtx] Porting to AIX > > > Hi, > > I'm new to rxtx. Currently my company has an interpreter product > that uses rxtx on Windows and Linux. I am trying to get rxtx to > build on AIX. I downloaded rxtx, ran ./configure and make. When > I run make I get the following error: > > libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object > make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 > > Do you have any suggestions on how to fix this problem? > > I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error > on both systems). I did have our system administrator load > automake, autoconf, make (gnu), and gcc. Here are the versions: > > AIX 4.3.3 AIX 5.3.0 > rxtx: 2.1-7r2 2.1-7r2 > autoconf: 2.53 2.59 > automake: 1.5 1.8.5 > make: 3.79.1 3.80 > gcc: (used native cc) 4.0.0 > > Any help would be appreciated. > > Mark Schnedar > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From guille at sms.nl Wed Aug 30 01:14:32 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 09:14:32 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <7.0.1.0.0.20060830091204.03652de0@sms.nl> At 16:49 29/08/2006, Bob Jacobsen wrote: >At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > > > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >is defined as: > > > > > Enables RTS flow-control handshaking. The driver raises the RTS line, > >> enabling the DCE to send, when the input buffer has enough room to > >> receive data. The driver lowers the RTS line, preventing the DCE to > >> send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. > > > >which clearly reflects the newer usage style - it keeps the RTS line high > >as long as there is space to _receive_ data. And takes it low when the > >receive/input buffer is getting full to stop the modem from sending it data. > > > >Does this jive with other peoples understanding of RTS usage? > >Can you point to any devices that actually implement this "new" understanding? Many (most) of the embedded devices we work with implement this kind of flow control. The host (DTE) raises RTS when it can receive data, and lowers it when the input buffers are full. In turn it watches the CTS line to see whether it can send data to the DCE. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From tjarvi at qbang.org Wed Aug 30 01:23:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 30 Aug 2006 01:23:46 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830091204.03652de0@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 16:49 29/08/2006, Bob Jacobsen wrote: >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: >>> >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >>> is defined as: >>> >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, >>>> enabling the DCE to send, when the input buffer has enough room to >>>> receive data. The driver lowers the RTS line, preventing the DCE to >>>> send, when the input buffer does not have enough room to receive >>>> data. If this value is used, it is an error for the application to adjust >>>> the line with EscapeCommFunction. >>> >>> which clearly reflects the newer usage style - it keeps the RTS line high >>> as long as there is space to _receive_ data. And takes it low when the >>> receive/input buffer is getting full to stop the modem from sending it data. >>> >>> Does this jive with other peoples understanding of RTS usage? >> >> Can you point to any devices that actually implement this "new" understanding? > > Many (most) of the embedded devices we work with implement this kind of flow > control. The host (DTE) raises RTS when it can receive data, and lowers it > when the input buffers are full. In turn it watches the CTS line to see > whether it can send data to the DCE. > I think this explains some hardware control 'bugs' I've seen. -- Trent Jarvi tjarvi at qbang.org From guille at sms.nl Wed Aug 30 02:01:35 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 10:01:35 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> At 09:23 30/08/2006, Trent Jarvi wrote: >On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > > > At 16:49 29/08/2006, Bob Jacobsen wrote: > >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >>> > >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >>> is defined as: > >>> > >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, > >>>> enabling the DCE to send, when the input buffer has enough room to > >>>> receive data. The driver lowers the RTS line, preventing the DCE to > >>>> send, when the input buffer does not have enough room to receive > >>>> data. If this value is used, it is an error for the > application to adjust > >>>> the line with EscapeCommFunction. > >>> > >>> which clearly reflects the newer usage style - it keeps the RTS line high > >>> as long as there is space to _receive_ data. And takes it low when the > >>> receive/input buffer is getting full to stop the modem from > sending it data. > >>> > >>> Does this jive with other peoples understanding of RTS usage? > >> > >> Can you point to any devices that actually implement this "new" > understanding? > > > > Many (most) of the embedded devices we work with implement this > kind of flow > > control. The host (DTE) raises RTS when it can receive data, and lowers it > > when the input buffers are full. In turn it watches the CTS line to see > > whether it can send data to the DCE. > > > >I think this explains some hardware control 'bugs' I've seen. I think the above is the most widespread use, but that may just mean it is the most widespread use in our specific segment (embedded systems). Some UART chips (e.g. from Exar) implement this kind of flow control directly in hardware. For example the Exar can be configured to suspend transmission when it sees CTS low, and resume transmission when it sees CTS high. This is also consistent with our experience. Maybe this helps clarify: http://www.tldp.org/HOWTO/Text-Terminal-HOWTO-10.html#ss10.7 Note the "Old RTS/CTS handshaking is different" section, which refers to "older terminals" whereas newer equipment would use RTS/CTS flow control (or equivalently DTR/DTS) as described above. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From Bob_Jacobsen at lbl.gov Wed Aug 30 07:55:31 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 30 Aug 2006 06:55:31 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> <7.0.1.0.0.20060830095557.0374ff28@sms.nl> Message-ID: I think we all agree that CTS inactive means "Send no more from DTE to DCE". The question is how to express the other direction, "Send no more from DCE to DTE". There are two parts to this question: What do various DTE-like devices do, and what do various DCE-like devices expect? Electrically, the lines that go that direction are DTR, DCD, and RTS (plus some special-purpose lines that are rarely present). All three devices I work most with respect the DTR lead. On the other hand, the FTDI chips for doing serial over USB provide either (RTS and CTS) or (DTR and DSR) as the two leads. What we're probably seeing is two different approaches, that have propagated separately. That's a problem. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From Pawan.Kharbanda at dot.state.co.us Wed Aug 30 09:07:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 30 Aug 2006 09:07:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0455E5E5@hqexchange3.dot.state.co.us> Trent, Sorry for not responding earlier to your email. I was actually waiting for the release of our software on the new Hardware. As I mentioned in my previous emails, RXTX crashes and locks up serial ports with the older version of Redhat (Linux 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:28:55 EDT 2005 i686 i686 i386 GNU/Linux), it might work ok if you are using one or 2 ports but anything more than that it has issues. I was using JDK1.5.0_06 and older firmwares of Digi boxes. Let me know if you need any more specific information of the older system. Thanks Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Thursday, August 10, 2006 5:40 AM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even > after 10000 operations (now I am trying 100,000 :). This is all with > the original RXTX 2.1.7 (final) api's without any of my fixes that I > have been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying > the RXTX saying the suggested kernel for Redhat Linux is > 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Aug 1 01:11:30 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 1 Aug 2006 09:11:30 +0200 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <34B6BC40-1405-4A13-8054-0FC6CE10466A@buechse.de> This is a problem with lock files. You should find it somewhere in the documentation... On 01.08.2006, at 03:53, Richard P. Welty wrote: > trying to get my app running on a Mac OS X powerbook, when > the following is executed as the first thing inside the > run method of a Thread: > > > try { > port = (SerialPort) selectedPort.open( > this.getClass().getName(), 2000); > } catch ( PortInUseException ex){ > ex.printStackTrace(); > return; > } > > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java: > 354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run > (ScaleWatcher.java:143) > > i've not seen any documentation suggesting that rxtx would be finicky > about application names... > > thanks for any suggestions, > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From rwelty at suespammers.org Tue Aug 1 05:37:53 2006 From: rwelty at suespammers.org (Richard P. Welty) Date: Tue, 01 Aug 2006 07:37:53 -0400 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <44CF3D11.9060108@suespammers.org> Richard P. Welty wrote: > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) Aha, a confusing error message. it's really a lock file problem; the code is trying to fill in the application name but when it's getting "Unknown Application" and filling that in... richard From ajmas at sympatico.ca Tue Aug 1 13:10:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:10:59 -0400 Subject: [Rxtx] Application Name? Message-ID: <20060801191059.HFCD18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> You need the source code in CVS. The forth coming 2.18 will correct this, but currently the only place to find the correction is in CVS. No idea when 2.18 is due. > > From: "Richard P. Welty" > Date: 2006/08/01 Tue AM 07:37:53 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Application Name? > > Richard P. Welty wrote: > > > i get the following: > > > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > at > > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) > > Aha, a confusing error message. it's really a lock file problem; the > code is trying to fill in the application name but when it's getting > "Unknown Application" and filling that in... > > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:15:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:15:57 -0400 Subject: [Rxtx] Do interfaces break backwards compatibility? Message-ID: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> It is the class that decides to add serializable that needs to worry about those issues. For the most part serial ports and their connection states should be considered as transient, since there is no guarantee they will still be present or that their state will be, especially in a USB world. What you can store is the port settings and port id and then simply test for port availability next time. Nothing else should be assumed. > > From: Gregg Wonderly > Date: 2006/07/31 Mon PM 01:21:19 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Do interfaces break backwards compatibility? > > Doug Berkland wrote: > > As far as I can tell, nothing in either RXTX or Sun's JavaCOMM > > implements Serializable. Therefore, there are no worries from that > > either. (I can't think of a reason anything in JavaCOMM should > > implement Serializable either.) > > Any interface in javax.comm can become implemented by a serializable object. > Thus, if someone wants to provide remote access to a serial port, then they > might (and I think this is not wise) choose to subclass and add Serializable to > the interface list. > > It's that kind of Serialization compatibility that I'm talking about. > > Gregg Wonderly > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:18:11 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:18:11 -0400 Subject: [Rxtx] precompiled for Intel Mac? Message-ID: <20060801191811.FLJY27612.tomts16-srv.bellnexxia.net@smtp1.sympatico.ca> > > From: Joachim Buechse > There will be. However not before we have figured out some remaining issues. What issues are remaining? Andre From Pawan.Kharbanda at dot.state.co.us Tue Aug 1 16:55:08 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 1 Aug 2006 16:55:08 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Hi, I am also experiencing occasional JVM crash thru the native code. I am attaching the log from the crash. Any ideas what might be causing it???? Regards Pawan Kharbanda # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # --------------- T H R E A D --------------- Current thread (0x8d000480): JavaThread "Thread-119" [_thread_in_native, id=111 51] siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba Registers: EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 Top of Stack: (sp=0x8d3482b8) 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 0x8d348308: 00000000 00000002 00000000 00000000 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 Instructions: (pc=0xb75e39b2) 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~StubRoutines::call_stub V [libjvm.so+0x2607ec] V [libjvm.so+0x423828] V [libjvm.so+0x260045] V [libjvm.so+0x2600de] V [libjvm.so+0x2d7745] V [libjvm.so+0x4c2ba3] V [libjvm.so+0x424338] C [libpthread.so.0+0x4dd8] 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 ) =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, id=11026] 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, id=11023] From tjarvi at qbang.org Tue Aug 1 18:46:21 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 1 Aug 2006 18:46:21 -0600 (MDT) Subject: [Rxtx] JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Message-ID: On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) > C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] > 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, > id=11034] > 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, > id=11033] > 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, > id=11032] > 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, > id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] > 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, > id=11028] > 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, > id=11027] > 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, > id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] > 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- Index: termios.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/termios.c,v retrieving revision 1.9.2.57 diff -u -r1.9.2.57 termios.c --- termios.c 4 Jun 2006 02:50:01 -0000 1.9.2.57 +++ termios.c 11 Jun 2006 21:51:10 -0000 @@ -1048,26 +1048,29 @@ if ( !first_tl ) { port->prev = NULL; + port->next = NULL; first_tl = port; } else { - while ( index->next ) + while ( ( index->fd < port->fd ) && index->next ) index = index->next; - if ( port == first_tl ) + if ( index->fd > port->fd ) { - port->prev = NULL; - port->next = first_tl; - first_tl->prev = port; - first_tl = port; + /* inserting previously closed fd */ + port->prev = index->prev; + port->next=index + index->prev->next = port; + index->prev = port; } else { + /* adding to end of list */ port->prev = index; + port->next = NULL; index->next = port; } } - port->next = NULL; LEAVE( "add_port" ); return port; From gergg at cox.net Tue Aug 1 23:25:19 2006 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 02 Aug 2006 00:25:19 -0500 Subject: [Rxtx] Do interfaces break backwards compatibility? In-Reply-To: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <44D0373F.7020600@cox.net> Andre-John Mas wrote: > It is the class that decides to add serializable that needs to worry about those issues. > For the most part serial ports and their connection states should be considered as > transient, since there is no guarantee they will still be present or that their state > will be, especially in a USB world. Right, but when you provide an interface as the standard, that opens the doors for a lot more interpretation and variation. An abstract class can indicate a lot more about what the expected implementation is. Gregg Wonderly From lyon at docjava.com Wed Aug 2 06:02:15 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:02:15 -0400 Subject: [Rxtx] jsr spec and license issues Message-ID: Hi All, Trent and I have been discussing the license issues of the JSR spec and code that we develop, as a community. Here is what we have come up with: >During the development, the new JSR spec that we derive >will be >covered under the LGPL license. Since it is >just interfaces, any contributions will come back to me, for inclusion >into the specification. The goal is to provide a detailed set of >interfaces that >document the present state of our reference model. I am using >the RXTX as the reference model. If there is something missing from >the reference model, or if the reference model has something that should >not be there, we will need to discuss it. > >After Sun accepts the JSR, I, as the copyright holder, can issue >a version with a JSR compatible license. > >The goal is to migrate the interfaces into javax.comm. Does this sound like a reasonable plan to everyone? Thanks! - Doug From joachim at buechse.de Wed Aug 2 06:21:03 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 14:21:03 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Good day, quite frankly I think that this is a very bad idea. This specification (!) should be in the public domain and nowhere else. Defining a spec under the (L)GPL makes absolutely no sense. After all it is a specification not an implementation. There is no or only trivial code attached to it. So while nothing can be gained by putting it under the LGPL, a lot can be lost - for example the contribution of companies that do not like to open source their implementations. Furthermore you are plain wrong assuming you will be the copyright holder to additions made by other people. Best regards, Joachim On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for >> inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that >> should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Aug 2 06:39:28 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:39:28 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Hi All, I don't know anything about licensing issues. The below sounds reasonable. If we make this public domain, will that be compatible with Sun's JSR? Thanks! - DL P.S. I really don't care what we do, as long as there is some sort of collective agreement. >Good day, > >quite frankly I think that this is a very bad idea. This specification >(!) should be in the public domain and nowhere else. > >Defining a spec under the (L)GPL makes absolutely no sense. After all? >it is a specification not an implementation. There is no or only? >trivial code attached to it. So while nothing can be gained by? >putting it under the LGPL, a lot can be lost - for example the? >contribution of companies that do not like to open source their? >implementations. > >Furthermore you are plain wrong assuming you will be the copyright? >holder to additions made by other people. > >Best regards, >Joachim > > >On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for? >>> inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that? >>> should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> >> Does this sound like a reasonable plan to everyone? >> >> Thanks! >> - Doug >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 07:50:09 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 10:50:09 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D0AD91.4080103@gmail.com> Hi, I have been searching the web and here it is: http://jcp.org/en/resources/license_reference Here there is a list of the licenses that are compatible with the JCP for JSR submitting. I think that Apache, CDDL, CPL and OSL are the one that are compatible with our needs. But I think that Apache is the best for us, Doug why do not make a votation? Regards, Manuel > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. > >> Good day, >> >> quite frankly I think that this is a very bad idea. This specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From lyon at docjava.com Wed Aug 2 08:10:55 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 10:10:55 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D0AD91.4080103@gmail.com> References: <44D0AD91.4080103@gmail.com> Message-ID: Hi All, I have no objection to an Apache license for the JSR interfaces that we produce. Would anyone care to comment? Joachim: Does this address your public domain concerns? How does this impact the reference implementation (i.e. RXTX)? Thanks! - DL >Hi, >I have been searching the web and here it is: >http://jcp.org/en/resources/license_reference >Here there is a list of the licenses that are compatible with the JCP >for JSR submitting. >I think that Apache, CDDL, CPL and OSL are the one that are compatible >with our needs. >But I think that Apache is the best for us, Doug why do not make a votation? >Regards, >Manuel > >> Hi All, >> I don't know anything about licensing issues. >> The below sounds reasonable. If we make this public domain, >> will that be compatible with Sun's JSR? >> Thanks! >> - DL >> P.S. I really don't care what we do, as long as there is >> some sort of collective agreement. >>?? >>> Good day, >>> >>> quite frankly I think that this is a very bad idea. This specification >>> (!) should be in the public domain and nowhere else. >>> >>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>> it is a specification not an implementation. There is no or only >>> trivial code attached to it. So while nothing can be gained by >>> putting it under the LGPL, a lot can be lost - for example the >>> contribution of companies that do not like to open source their >>> implementations. >>> >>> Furthermore you are plain wrong assuming you will be the copyright >>> holder to additions made by other people. >>> >>> Best regards, > >> Joachim >>> >>> >>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>> >>>???? >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>?????? >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for >>>>> inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that >>>>> should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>>>???????? >>>> Does this sound like a reasonable plan to everyone? >>>> >>>> Thanks! >>>> - Doug >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>?????? >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>???? >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 08:20:29 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 11:20:29 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D0AD91.4080103@gmail.com> Message-ID: <44D0B4AD.2050106@gmail.com> Doug; > How does this impact the reference implementation (i.e. RXTX)? > Fuck I have not thinked about that, we would need that everyone who had colaborated with RXTX and have putted code on it to agree a license chaging. Or start from sractch. I don't know if Trent have the right to do that. Regards, Manuel > > >> Hi, >> I have been searching the web and here it is: >> http://jcp.org/en/resources/license_reference >> Here there is a list of the licenses that are compatible with the JCP >> for JSR submitting. >> I think that Apache, CDDL, CPL and OSL are the one that are compatible >> with our needs. >> But I think that Apache is the best for us, Doug why do not make a votation? >> Regards, >> Manuel >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> >> >> Joachim >> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 08:21:15 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 16:21:15 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Putting something in the public domain means, that it can be used by anyone for whatever (s)he thinks is appropriate. The authors define no restriction regarding it's use. That's how any specification should be. Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From berkland at spamcop.net Wed Aug 2 08:50:50 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 10:50:50 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> You may want to consider making it available under two separate licenses. 1 - LGPL as it is today The LGPL can be used by anyone wanting to extend the current functionality, as long as they provide code for anything they change. 2 - Sun Community Source License (SCSL) http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf The SCSL will allow anyone who wants to do a closed source implementation from the ground up to do so, if I'm reading it correctly, as long as they don't use any of the code from the Reference Implementation. This will satisfy any company that wants to have a closed-source implementation, but not help them out very much. On 8/2/06, Joachim Buechse wrote: > Putting something in the public domain means, that it can be used by > anyone for whatever (s)he thinks is appropriate. The authors define > no restriction regarding it's use. That's how any specification > should be. > > Best regards, > Joachim > > > On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > > > Hi All, > > I don't know anything about licensing issues. > > The below sounds reasonable. If we make this public domain, > > will that be compatible with Sun's JSR? > > Thanks! > > - DL > > P.S. I really don't care what we do, as long as there is > > some sort of collective agreement. > >> Good day, > >> > >> quite frankly I think that this is a very bad idea. This > >> specification > >> (!) should be in the public domain and nowhere else. > >> > >> Defining a spec under the (L)GPL makes absolutely no sense. After all > >> it is a specification not an implementation. There is no or only > >> trivial code attached to it. So while nothing can be gained by > >> putting it under the LGPL, a lot can be lost - for example the > >> contribution of companies that do not like to open source their > >> implementations. > >> > >> Furthermore you are plain wrong assuming you will be the copyright > >> holder to additions made by other people. > >> > >> Best regards, > >> Joachim > >> > >> > >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> > >>> Hi All, > >>> Trent and I have been discussing the license issues of the > >>> JSR spec and code that we develop, as a community. > >>> Here is what we have come up with: > >>> > >>>> During the development, the new JSR spec that we derive > >>>> will be > >>>> covered under the LGPL license. Since it is > >>>> just interfaces, any contributions will come back to me, for > >>>> inclusion > >>>> into the specification. The goal is to provide a detailed set of > >>>> interfaces that > >>>> document the present state of our reference model. I am using > >>>> the RXTX as the reference model. If there is something missing > >>>> from > >>>> the reference model, or if the reference model has something that > >>>> should > >>>> not be there, we will need to discuss it. > >>>> > >>>> After Sun accepts the JSR, I, as the copyright holder, can issue > >>>> a version with a JSR compatible license. > >>>> > >>>> The goal is to migrate the interfaces into javax.comm. > >>> > >>> Does this sound like a reasonable plan to everyone? > >>> > >>> Thanks! > >>> - Doug > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From naranjo.manuel at gmail.com Wed Aug 2 09:03:02 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 12:03:02 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> References: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> Message-ID: <44D0BEA6.2040408@gmail.com> Or even better, you can use Apache v2, which allows both Open Source and Closed Source forms ;-) > You may want to consider making it available under two separate licenses. > > 1 - LGPL as it is today > > The LGPL can be used by anyone wanting to extend the current > functionality, as long as they provide code for anything they change. > > 2 - Sun Community Source License (SCSL) > http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf > > The SCSL will allow anyone who wants to do a closed source > implementation from the ground up to do so, if I'm reading it > correctly, as long as they don't use any of the code from the > Reference Implementation. This will satisfy any company that wants to > have a closed-source implementation, but not help them out very much. > > On 8/2/06, Joachim Buechse wrote: > >> Putting something in the public domain means, that it can be used by >> anyone for whatever (s)he thinks is appropriate. The authors define >> no restriction regarding it's use. That's how any specification >> should be. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This >>>> specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> Joachim >>>> >>>> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing >>>>>> from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 09:46:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 17:46:25 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> I assume that javax.comm/RXTX is to be redefined using Interfaces. In this case we should separate 2 things: 1) The specification and it's incarnation in the form of java classes defining the interfaces. 2) The actual implementation of the functionality. It is possible that 1) may contain some trivial code in abstract or none abstract classes (ie PortFactory, PortRegistry, etc). Doug's original question was regarding 1) - unless I misunderstood. I personally think that 1) should be in the public domain. It should not be covered by any restrictions what-so-ever. Let it be free as in "totally free in any respect". I do not care under which license 2) is released. Why? Because it is in my very interest that all/almost all vendors include implementations with their distributions. Which will only happen if they do not need to respect open source licenses. (javax.comm is not nearly as important as the Apache web server or MySql, so nobody will take licensing risks). Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ssbello at gmail.com Wed Aug 2 10:28:30 2006 From: ssbello at gmail.com (Simone) Date: Wed, 2 Aug 2006 18:28:30 +0200 Subject: [Rxtx] pocketPC 2003 Message-ID: <39ed505d0608020928k6ceb01aen470c2e6a78c5a6b0@mail.gmail.com> Does anyone know if the Rxtx works on PocketPc 2003? If yes, could you, please, give me some suggestion. Thanks, Simone Bell? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/72e0fb87/attachment-0004.html From berkland at spamcop.net Wed Aug 2 13:00:10 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 15:00:10 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> Message-ID: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> How about these for the "Business Terms" of the new JSR: > The specification will be released in accordance with standard terms > as specified by the JCP process. > > The reference implementation (RI) will be delivered in binary form > free of charge from http://rxtx.org. Licensing details are expected to > be under the Binary Code License (BCL). > > The source for the reference implementation is expected to be > delivered via the Limited GNU Public License (LGPL) and available free > of charge. > > The TCK will be made available free of charge to all J2SE and J2EE licensees. > > The TCK will be offered for license at no charge, without support or > any trademark license rights, to qualified not-for-profit entities > (including not-for-profit) academic institutions) and qualified > individuals engaged in efforts to create compatible implementations of > the Specification. From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 13:13:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 13:13:33 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E495@hqexchange3.dot.state.co.us> Trent, I didn't exactly get it. Again I am not a C guy, maybe its very simple for you but I don't see any checks for FD (as written in the patch for termios.c) in the initialise_event_info_struct, I see some checks in the interruptEventLoop call. Second as you explained I open three("/dev/cuf01","/dev/cuf01","/dev/cuf01") ports, I close the 2nd ("/dev/cuf02", the other 2 are still open) , I never try to open the third ("/dev/cuf03") port again if it is already open. Are you planning to have a fix for this in the next release 2.1.8. Its very important for me to have a fix for this, its causing some major headaches for our project. I know you have your regular job too, I will appreciate any help. Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, August 01, 2006 6:46 PM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java > VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic > frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) C [librxtxSerial.so+0x69b2] > initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] > Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" > [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: > /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread > "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 > JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon > [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" > daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread > "AdapterThread" daemon [_thread_blocked, id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, > id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Wed Aug 2 13:14:20 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 16:14:20 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> Message-ID: <44D0F98C.1070600@gmail.com> +1 Agree > How about these for the "Business Terms" of the new JSR: > > >> The specification will be released in accordance with standard terms >> as specified by the JCP process. >> >> The reference implementation (RI) will be delivered in binary form >> free of charge from http://rxtx.org. Licensing details are expected to >> be under the Binary Code License (BCL). >> >> The source for the reference implementation is expected to be >> delivered via the Limited GNU Public License (LGPL) and available free >> of charge. >> >> The TCK will be made available free of charge to all J2SE and J2EE licensees. >> >> The TCK will be offered for license at no charge, without support or >> any trademark license rights, to qualified not-for-profit entities >> (including not-for-profit) academic institutions) and qualified >> individuals engaged in efforts to create compatible implementations of >> the Specification. >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From savagobr at yahoo.com Wed Aug 2 13:40:42 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:40:42 -0700 (PDT) Subject: [Rxtx] jsr spec and license issues Message-ID: <20060802194042.83599.qmail@web53807.mail.yahoo.com> Friends Apache seems ok... if I get it right, does it *almost* equals to BSD? Regarding public domain: I think that the good people that spent so much time on this library will like to keep some rights over its own work, don't you think? Best regards Savago --------------------------------- Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/79abdfd5/attachment-0004.html From savagobr at yahoo.com Wed Aug 2 13:58:04 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:58:04 -0700 (PDT) Subject: [Rxtx] JVM Crashing Message-ID: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago --------------------------------- Groups are talking. We´re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/47d561ae/attachment-0004.html From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 14:09:18 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 14:09:18 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E4AD@hqexchange3.dot.state.co.us> Thank You :) ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adenilson Cavalcanti Sent: Wednesday, August 02, 2006 1:58 PM To: rxtx at qbang.org Subject: Re: [Rxtx] JVM Crashing Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago ________________________________ Groups are talking. We?re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/b4eb22cf/attachment-0004.html From tjarvi at qbang.org Wed Aug 2 20:23:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 20:23:42 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > Hi Doug As mentioned off the list, the important point in my mind is that everyone is on the same base more than what license is decided upon. These things are just best addressed early so there isn't confusion. The Apache license is fairly standard in the Open Source community vs several of the relatively unknown [and obviously redundat even by their descriptions] offerings by Sun. Perhaps one option here that would kill a few birds with one stone is to dual license the interface as Apache and LGPL. This would allow everyone to use the interfaces without needing to do wastefull work for internal license requirements. Projects could choose between the two the license that best suits their needs. If there is a software shop doing Java that isn't familiar with the Apache license, they must be doing some strange Java. I do think it is foolhearty to blindly travel in public domain but nobody is trying to undermine the spec files. The intent is to use the work for a JSR submission that everyone can use without confusion later on down the line. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 21:01:16 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 20:01:16 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D166FC.9090005@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> Does this sound like a reasonable plan to everyone? >> > > Hi Doug > > As mentioned off the list, the important point in my mind is that everyone > is on the same base more than what license is decided upon. These things > are just best addressed early so there isn't confusion. > > The Apache license is fairly standard in the Open Source community vs > several of the relatively unknown [and obviously redundat even by > their descriptions] offerings by Sun. The JCP is a reasonable process for what the RxTx project intends to achieve by evolving the API. There isn't much to lose by going the JSR route. The community will benefit from a fair API like so many other that have undergone the process. Sun isn't going to own the API or manipulate it into anything weird anymore than anyone else is. I think your fears are rather vague and unfounded. Which isn't to say that I am a well-informed representative of the JCP, I've only sat through one JSR process and we ended up with javax.usb, and IBM got what it wanted out of the deal and the community got a very nice standard. Paul > > Perhaps one option here that would kill a few birds with one stone is to > dual license the interface as Apache and LGPL. This would allow everyone > to use the interfaces without needing to do wastefull work for internal > license requirements. Projects could choose between the two the license > that best suits their needs. If there is a software shop doing Java that > isn't familiar with the Apache license, they must be doing some strange > Java. > > I do think it is foolhearty to blindly travel in public domain but nobody > is trying to undermine the spec files. The intent is to use the work for > a JSR submission that everyone can use without confusion later on down the > line. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Aug 2 22:10:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 22:10:48 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D166FC.9090005@sun.com> References: <44D166FC.9090005@sun.com> Message-ID: On Wed, 2 Aug 2006, Paul Klissner wrote: > Trent Jarvi wrote: >> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> Does this sound like a reasonable plan to everyone? >>> >> >> Hi Doug >> >> As mentioned off the list, the important point in my mind is that everyone >> is on the same base more than what license is decided upon. These things >> are just best addressed early so there isn't confusion. >> >> The Apache license is fairly standard in the Open Source community vs >> several of the relatively unknown [and obviously redundat even by >> their descriptions] offerings by Sun. > > The JCP is a reasonable process for what the RxTx project intends > to achieve by evolving the API. > > There isn't much to lose by going the JSR route. The community will > benefit from a fair API like so many other that have undergone > the process. Sun isn't going to own the API or manipulate it > into anything weird anymore than anyone else is. I think your > fears are rather vague and unfounded. > > Which isn't to say that I am a well-informed representative > of the JCP, I've only sat through one JSR process and we ended > up with javax.usb, and IBM got what it wanted out of the deal > and the community got a very nice standard. > Hi Paul The JCP should work fine. As our intentions are in line, licensing so that everyone can use the interface code should not be a problem. Note that the current default right now is that the interfaces are copyrighted and no license for distribution is included. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 22:33:51 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 21:33:51 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D166FC.9090005@sun.com> Message-ID: <44D17CAF.1090802@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Paul Klissner wrote: > >> Trent Jarvi wrote: >>> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>> Does this sound like a reasonable plan to everyone? >>>> >>> Hi Doug >>> >>> As mentioned off the list, the important point in my mind is that everyone >>> is on the same base more than what license is decided upon. These things >>> are just best addressed early so there isn't confusion. >>> >>> The Apache license is fairly standard in the Open Source community vs >>> several of the relatively unknown [and obviously redundat even by >>> their descriptions] offerings by Sun. >> The JCP is a reasonable process for what the RxTx project intends >> to achieve by evolving the API. >> >> There isn't much to lose by going the JSR route. The community will >> benefit from a fair API like so many other that have undergone >> the process. Sun isn't going to own the API or manipulate it >> into anything weird anymore than anyone else is. I think your >> fears are rather vague and unfounded. >> >> Which isn't to say that I am a well-informed representative >> of the JCP, I've only sat through one JSR process and we ended >> up with javax.usb, and IBM got what it wanted out of the deal >> and the community got a very nice standard. >> > > Hi Paul > > The JCP should work fine. As our intentions are in line, licensing so > that everyone can use the interface code should not be a problem. Sorry, looks like my concerns were unfounded. I haven't been following the threads closely this week, as work got busy with an escalated issue and new project. Sorry about that. > > Note that the current default right now is that the interfaces are > copyrighted and no license for distribution is included. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Aug 3 03:45:56 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 03 Aug 2006 05:45:56 -0400 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: Hi All, I have been waiting a day for things to cool down. Licensing appears to be a hot-button topic. I have no objection to dual license the interfaces as both Apache and LGPL. Some thoughts: Goal: developers wish to work together on a common piece of code that the team needs. It makes sense that the code base they work on should be Apache-licensed. That makes it possible for the team to use and develop common code, even if the end result is LGPL'd as a whole. If we combine licenses, we must follow the terms of both licenses when distributing the combined work. Thus, the dual license contains the super set of terms in the licenses of Apached and LGPL. This should address concern about using Apache-licensed code within LGPL projects due to the FSF's claim that they are incompatible. Here is a draft statement for RXSL: The RXTX Specification Library (RXSL) uses a dual license strategy for the source code. These licenses are the GNU Lesser General Public License (LGPL) and the Apache License. I strongly encourage users to use the LGPL license and participate fully in the free software community. Dual licensing of the RXSL source code provides open and free access to the technology both for the GPL community and for other developers or companies that cannot use the GPL. Dual license is common practice in open source projects like OpenOffice, Perl and Mozilla. Through the combined use of LGPL and Apache license, developers will have a high degree of freedom yet compatibility and interoperability will be preserved. You can freely modify, extend, and improve the RXSL source code. The only question is whether or not you must provide the source code and contribute modifications to the community. The GNU and Apache licenses allow different ranges of flexibility in this regard, but in the end, regardless of the license used, any and all incompatible changes must be published openly. Note that there is the RXTX Reference Model that uses the org.rxtx package, which itself is protected by the LGPL. This may be part of the distribution, however, it can not be redistributed using a different license. Is everybody OK with this? Thanks Trent, great idea! - Doug From joachim at buechse.de Thu Aug 3 04:15:44 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 3 Aug 2006 12:15:44 +0200 Subject: [Rxtx] JVM Crashing In-Reply-To: <20060802195804.70935.qmail@web53812.mail.yahoo.com> References: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Message-ID: <6ABA2AB2-CECE-4C4B-A7D6-0CDF8B9C95A8@buechse.de> I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of > rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jvermillard at archean.fr Thu Aug 3 04:26:48 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Thu, 03 Aug 2006 12:26:48 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <1154600808.16732.18.camel@localhost.localdomain> Hi, I'm a developer of the Apache MINA framework. It's a network application framework which helps users develop high performance and high scalability network applications easily. http://directory.apache.org/subprojects/mina/index.html . I would like to integrate serial connection to the framework (actualy supporting TCP, UDP (broadcast) and in VM communications), but LGPL is an issue for me. An Apache License would be pretty usefull for me and integrate rxtx functionnalities easly. Thanks, Julien Le jeudi 03 ao?t 2006 ? 05:45 -0400, Dr. Douglas Lyon a ?crit : > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/755cca7f/smime-0004.bin From pascal at quies.net Thu Aug 3 04:32:35 2006 From: pascal at quies.net (Pascal S. de Kloe) Date: Thu, 3 Aug 2006 12:32:35 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <200608031232.35838.pascal@quies.net> Hi Doug, The Apache license is unnessesary complex. It puts all kinds of limitations on the usage. Is there a particular reason why people chose this or was it just the familiar name? I agree with Joachim (again) that the specification and the interfaces should be public domain. However, if we realy need a license then have a look at the X11 license because that one is compatible with the GPL and suits our needs: http://www.fsf.org/licensing/licenses/index_html http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3 ---- start: implementation Copyright (C) 2006 Sun Microsystems, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Sun Microsystems shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Sun Microsystems. Java is a trademark of Sun Microsystems, Inc. ---- end Op donderdag 3 augustus 2006 11:45, schreef Dr. Douglas Lyon: > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Aug 3 05:17:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 05:17:07 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154600808.16732.18.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: On Thu, 3 Aug 2006, Julien Vermillard wrote: > Hi, > > I'm a developer of the Apache MINA framework. It's a network application > framework which helps users develop high performance and high > scalability network applications easily. > http://directory.apache.org/subprojects/mina/index.html . I would like > to integrate serial connection to the framework (actualy supporting TCP, > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > An Apache License would be pretty usefull for me and integrate rxtx > functionnalities easly. > > Thanks, > > Julien > Hi Julien The rxtx license itself will not change. This is just the interface. You would be free to implement an rxtx replacement if the LGPL low level code is a problem for you. These licensing details would make it possible to take the interface code instead of needing to recode them for a new project. You are probably confusing the license problems with the GPL not the LGPL though you can share links to concerns off the list if you would like to go through them. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 11:59:48 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 11:59:48 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E516@hqexchange3.dot.state.co.us> Joachim, I think my both problems (JVM crashing & Port Locking) are being caused by the corruption of "Event Info Struct / EIS" I have noticed with in EIS my "FD" and "Closing" value being overwritten. The problem is definitely in SerialImp.c file. I am trying to understand what the code does and try to pin point the problem by trying few other options. I will keep everybody posted. Regards Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Joachim Buechse Sent: Thursday, August 03, 2006 4:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Thu Aug 3 13:50:07 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 14:50:07 -0500 Subject: [Rxtx] slow startup Message-ID: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete From brian at mbari.org Thu Aug 3 14:05:57 2006 From: brian at mbari.org (Brian Schlining) Date: Thu, 3 Aug 2006 13:05:57 -0700 Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> References: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Message-ID: Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B > Greetings, > I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/ > qbang.org). > > In testing things out, I ran the list ports example from the Wiki, > and it seems to take quite a while for the library to initialize? > Like on the order of 30+ seconds or so after startup (and the RXTX > banner prints), and before the application starts running. > > Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then > I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ > terminal server) and I'm wondering if they are not responding properly > and this is causing the slow startup? Or is this a known problem of > some kind, or maybe something on my system is screwy? > > Thanks, > Pete > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/6123f730/attachment-0004.html From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 14:13:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 14:13:47 -0600 Subject: [Rxtx] slow startup Message-ID: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Hi Pete, RXTX does open and close the ports in Windows. Try downloading utility like PORTMON(only for windows) and you can see that whenever you load RXTX it tries to register all the available COMM ports in the system. It is a little slow if you have virtual ports, we use digi as a terminal server, Its going to get worst of you have comm ports in 100's Thanks Pawan Kharbanda ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Brian Schlining Sent: Thursday, August 03, 2006 2:06 PM To: RXTX Developers and Users Subject: Re: [Rxtx] slow startup Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/94fd105d/attachment-0004.html From pete.flugstad at gmail.com Thu Aug 3 14:32:04 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 15:32:04 -0500 Subject: [Rxtx] slow startup In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Message-ID: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> On 8/3/06, Kharbanda, Pawan wrote: > RXTX does open and close the ports in Windows. Try downloading utility > like PORTMON(only for windows) and you can see that whenever you load RXTX > it tries to register all the available COMM ports in the system. It is a > little slow if you have virtual ports, we use digi as a terminal server, Its > going to get worst of you have comm ports in 100's Okay, I can understand that, but from the PORTMON output, it looks like it's opening each port TWICE: 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS ... 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS Also, assuming instead of listing the ports I wanted to just open one, I'm still seeing the 30 second delay, so it's scanning at startup regardless of what the Java code is going to do. Probably necessary, but annoying. I know, I know, contribute patches... :-) Thanks, Pete From tjarvi at qbang.org Thu Aug 3 15:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 15:04:42 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: On Thu, 3 Aug 2006, Pete Flugstad wrote: > On 8/3/06, Kharbanda, Pawan wrote: >> RXTX does open and close the ports in Windows. Try downloading utility >> like PORTMON(only for windows) and you can see that whenever you load RXTX >> it tries to register all the available COMM ports in the system. It is a >> little slow if you have virtual ports, we use digi as a terminal server, Its >> going to get worst of you have comm ports in 100's > > Okay, I can understand that, but from the PORTMON output, it looks > like it's opening each port TWICE: > > 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > ... > 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > > Also, assuming instead of listing the ports I wanted to just open one, > I'm still seeing the 30 second delay, so it's scanning at startup > regardless of what the Java code is going to do. Probably necessary, > but annoying. > > I know, I know, contribute patches... :-) > I think this problem is in RXTXCommDriver.java. I've just not tracked it down but it should be in the java code, not the native code so easy enough to track down. -- Trent Jarvi tjarvi at qbang.org From jvermillard at archean.fr Fri Aug 4 03:43:28 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:43:28 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: <1154684608.6181.4.camel@localhost.localdomain> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > Hi, > > > > I'm a developer of the Apache MINA framework. It's a network application > > framework which helps users develop high performance and high > > scalability network applications easily. > > http://directory.apache.org/subprojects/mina/index.html . I would like > > to integrate serial connection to the framework (actualy supporting TCP, > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > An Apache License would be pretty usefull for me and integrate rxtx > > functionnalities easly. > > > > Thanks, > > > > Julien > > > > Hi Julien > > The rxtx license itself will not change. This is just the interface. > You would be free to implement an rxtx replacement if the LGPL low level > code is a problem for you. These licensing details would make it possible > to take the interface code instead of needing to recode them for a new > project. > > You are probably confusing the license problems with the GPL not the LGPL > though you can share links to concerns off the list if you would like to > go through them. > > -- > Trent Jarvi > tjarvi at qbang.org Hi, I'm not a license expert but some guys at ASF said me you can't call LGPLed libs from java. some peoples interprete that as static linking and not dynamic linking (no idea why). So ASF/BSD licensied interface willl solve the license probleme. If you got some questions about the ASL and the way you can dual license LGPL/ASL you can ask it on legal-discuss at apache.org Julien -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/8d46c0aa/smime-0004.bin From jvermillard at archean.fr Fri Aug 4 03:51:30 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:51:30 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <1154685091.6181.6.camel@localhost.localdomain> erm from java -> from ASLed Java code Le vendredi 04 ao?t 2006 ? 11:43 +0200, Julien Vermillard a ?crit : > Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > Hi, > > I'm not a license expert but some guys at ASF said me you can't call > LGPLed libs from java. some peoples interprete that as static linking > and not dynamic linking (no idea why). So ASF/BSD licensied interface > willl solve the license probleme. > > If you got some questions about the ASL and the way you can dual license > LGPL/ASL you can ask it on legal-discuss at apache.org > > Julien > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dcc29d70/smime-0004.bin From guille at sms.nl Fri Aug 4 04:35:24 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Fri, 04 Aug 2006 12:35:24 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <7.0.1.0.0.20060804123322.036dc748@sms.nl> At 11:43 04/08/2006, Julien Vermillard wrote: >Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > >Hi, > >I'm not a license expert but some guys at ASF said me you can't call >LGPLed libs from java. some peoples interprete that as static linking >and not dynamic linking (no idea why). This interpretation is wrong. See the official position of the FSF regarding the LGPL and Java: http://www.gnu.org/licenses/lgpl-java.html http://www.fsf.org/licensing/licenses/lgpl-java.html Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From hambyiii at hotmail.com Fri Aug 4 04:52:47 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 10:52:47 +0000 Subject: [Rxtx] error getting InputStream Message-ID: Hi, I have written a program in Java for Windows xp using RXTX (which is why I am using this mailing list :). However, I am getting a problem. I am connecting to a serial port, like so: private CommPortIdentifier portID; private boolean openPort(String selectedPort) { boolean portFound = false; Enumeration portList; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portID.getName().equals(selectedPort)) { portFound = true; break; } } } return portFound; } and then I try and get the serial port input stream (leaving out the try and catch for the sake of space): SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); InputStream inputStream = serialPort.getInputStream(); but on the getInputStream() I get the following error message: Bad file descriptor in nativeavailable I cannot figure out where it is going wrong...anyone any ideas. A quick answer would be wonderful, as I am kinda under the hammer to get this fixed quickly Thanks in Advance Keith From tjarvi at qbang.org Fri Aug 4 05:13:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 05:13:19 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <7.0.1.0.0.20060804123322.036dc748@sms.nl> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> <7.0.1.0.0.20060804123322.036dc748@sms.nl> Message-ID: On Fri, 4 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 11:43 04/08/2006, Julien Vermillard wrote: >> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : >>> On Thu, 3 Aug 2006, Julien Vermillard wrote: >>> >>>> Hi, >>>> >>>> I'm a developer of the Apache MINA framework. It's a network application >>>> framework which helps users develop high performance and high >>>> scalability network applications easily. >>>> http://directory.apache.org/subprojects/mina/index.html . I would like >>>> to integrate serial connection to the framework (actualy supporting TCP, >>>> UDP (broadcast) and in VM communications), but LGPL is an issue for me. >>>> >>>> An Apache License would be pretty usefull for me and integrate rxtx >>>> functionnalities easly. >>>> >>>> Thanks, >>>> >>>> Julien >>>> >>> >>> Hi Julien >>> >>> The rxtx license itself will not change. This is just the interface. >>> You would be free to implement an rxtx replacement if the LGPL low level >>> code is a problem for you. These licensing details would make it possible >>> to take the interface code instead of needing to recode them for a new >>> project. >>> >>> You are probably confusing the license problems with the GPL not the LGPL >>> though you can share links to concerns off the list if you would like to >>> go through them. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >> >> Hi, >> >> I'm not a license expert but some guys at ASF said me you can't call >> LGPLed libs from java. some peoples interprete that as static linking >> and not dynamic linking (no idea why). > > This interpretation is wrong. See the official position of the FSF regarding > the LGPL and Java: > > http://www.gnu.org/licenses/lgpl-java.html > > http://www.fsf.org/licensing/licenses/lgpl-java.html > What I do with legal groups that go down that rat hole is give them a copy of the rxtx 2.0 license. Since the confused legal folks are going in a direction that does not represent the intent of the license or authors at that point and are confused about basic things in our industry that most consider facts, the discussions are very short. The rxtx 2.0 license just adds the following and has for 6 years or so. Not because the lawyers are right. They get confused about intent and even facts. The following is added to make confused lawyers that cant understand intent go far away and never come back. period. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. From hambyiii at hotmail.com Fri Aug 4 05:42:21 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 11:42:21 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Okay, I made a little mistake in my last message. The error is not occuring where I thought it was. Instead it is occuring when I do the following: byte[] readBuffer = new byte[128]; try { int numBytes = 0; try { Thread.sleep(500); } catch (InterruptedException e) {} while (inputStream.available() > 0) { numBytes = inputStream.read(readBuffer); } processReceivedData(readBuffer, numBytes); } catch (IOException e) { System.out.println(e.getMessage()); } So I guess the error is happening on the inputStream.read(readBuffer) again, any help is appreciated and again, thanks in advance Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 10:52:47 +0000 > >Hi, > >I have written a program in Java for Windows xp using RXTX (which is why I >am using this mailing list :). However, I am getting a problem. I am >connecting to a serial port, like so: > private CommPortIdentifier portID; > > private boolean openPort(String selectedPort) > { > boolean portFound = false; > Enumeration portList; > > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portID.getName().equals(selectedPort)) > { > portFound = true; > break; > } > } > } > > return portFound; > } > >and then I try and get the serial port input stream (leaving out the try >and >catch for the sake of space): > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >InputStream inputStream = serialPort.getInputStream(); > >but on the getInputStream() I get the following error message: > >Bad file descriptor in nativeavailable > >I cannot figure out where it is going wrong...anyone any ideas. A quick >answer would be wonderful, as I am kinda under the hammer to get this fixed >quickly > >Thanks in Advance >Keith > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From hambyiii at hotmail.com Fri Aug 4 07:08:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:08:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Hi, I know I am replying to myself a lot at the moment, but more information has come to light (These errors are actually happening on a client machine, on software that has worked for the past month, and only now has started to fail, which is why I am a little slow finding things out) The errors I have already written about are only symptoms of an orignal error. The original error occurs the first time I try to WRITE thte OutputStream: OutputStream oStream = serialPort.getOutputStream(); serialPort.notifyOnOutputEmpty(true); byte[] bs = encodeMessage(configString.toString()); oStream.write(bs); oStream.flush(); The error occurs on oStream.write(bs); and is: Input/output error in writeArray Now writeArray is native code, so I have no idea what is going on there. Any help would be appreciated Thanks Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 11:42:21 +0000 > >Okay, I made a little mistake in my last message. > >The error is not occuring where I thought it was. Instead it is occuring >when I do the following: > >byte[] readBuffer = new byte[128]; > >try { > > int numBytes = 0; > try { > Thread.sleep(500); > } > catch (InterruptedException e) > {} > > while (inputStream.available() > 0) > { > numBytes = inputStream.read(readBuffer); > } > > processReceivedData(readBuffer, numBytes); >} >catch (IOException e) >{ > System.out.println(e.getMessage()); >} > >So I guess the error is happening on the inputStream.read(readBuffer) > >again, any help is appreciated and again, thanks in advance >Keith > > >From: "Keith Thorne" > >Reply-To: RXTX Developers and Users > >To: rxtx at qbang.org > >Subject: [Rxtx] error getting InputStream > >Date: Fri, 04 Aug 2006 10:52:47 +0000 > > > >Hi, > > > >I have written a program in Java for Windows xp using RXTX (which is why >I > >am using this mailing list :). However, I am getting a problem. I am > >connecting to a serial port, like so: > > private CommPortIdentifier portID; > > > > private boolean openPort(String selectedPort) > > { > > boolean portFound = false; > > Enumeration portList; > > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > > while (portList.hasMoreElements()) > > { > > portID = (CommPortIdentifier) portList.nextElement(); > > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > > { > > if (portID.getName().equals(selectedPort)) > > { > > portFound = true; > > break; > > } > > } > > } > > > > return portFound; > > } > > > >and then I try and get the serial port input stream (leaving out the try > >and > >catch for the sake of space): > > > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); > >InputStream inputStream = serialPort.getInputStream(); > > > >but on the getInputStream() I get the following error message: > > > >Bad file descriptor in nativeavailable > > > >I cannot figure out where it is going wrong...anyone any ideas. A quick > >answer would be wonderful, as I am kinda under the hammer to get this >fixed > >quickly > > > >Thanks in Advance > >Keith > > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Aug 4 07:26:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: Hi Keith Can you tell us more about the physical serial port? Might it be 'vanishing?' On Fri, 4 Aug 2006, Keith Thorne wrote: > Hi, > > I know I am replying to myself a lot at the moment, but more information has > come to light (These errors are actually happening on a client machine, on > software that has worked for the past month, and only now has started to > fail, which is why I am a little slow finding things out) > > The errors I have already written about are only symptoms of an orignal > error. The original error occurs the first time I try to WRITE thte > OutputStream: > > OutputStream oStream = serialPort.getOutputStream(); > serialPort.notifyOnOutputEmpty(true); > > byte[] bs = encodeMessage(configString.toString()); > > oStream.write(bs); > oStream.flush(); > > The error occurs on oStream.write(bs); and is: > > Input/output error in writeArray > > Now writeArray is native code, so I have no idea what is going on there. Any > help would be appreciated > Thanks > Keith > > >> From: "Keith Thorne" >> Reply-To: RXTX Developers and Users >> To: rxtx at qbang.org >> Subject: Re: [Rxtx] error getting InputStream >> Date: Fri, 04 Aug 2006 11:42:21 +0000 >> >> Okay, I made a little mistake in my last message. >> >> The error is not occuring where I thought it was. Instead it is occuring >> when I do the following: >> >> byte[] readBuffer = new byte[128]; >> >> try { >> >> int numBytes = 0; >> try { >> Thread.sleep(500); >> } >> catch (InterruptedException e) >> {} >> >> while (inputStream.available() > 0) >> { >> numBytes = inputStream.read(readBuffer); >> } >> >> processReceivedData(readBuffer, numBytes); >> } >> catch (IOException e) >> { >> System.out.println(e.getMessage()); >> } >> >> So I guess the error is happening on the inputStream.read(readBuffer) >> >> again, any help is appreciated and again, thanks in advance >> Keith >> >>> From: "Keith Thorne" >>> Reply-To: RXTX Developers and Users >>> To: rxtx at qbang.org >>> Subject: [Rxtx] error getting InputStream >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 >>> >>> Hi, >>> >>> I have written a program in Java for Windows xp using RXTX (which is why >> I >>> am using this mailing list :). However, I am getting a problem. I am >>> connecting to a serial port, like so: >>> private CommPortIdentifier portID; >>> >>> private boolean openPort(String selectedPort) >>> { >>> boolean portFound = false; >>> Enumeration portList; >>> >>> portList = CommPortIdentifier.getPortIdentifiers(); >>> >>> while (portList.hasMoreElements()) >>> { >>> portID = (CommPortIdentifier) portList.nextElement(); >>> if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) >>> { >>> if (portID.getName().equals(selectedPort)) >>> { >>> portFound = true; >>> break; >>> } >>> } >>> } >>> >>> return portFound; >>> } >>> >>> and then I try and get the serial port input stream (leaving out the try >>> and >>> catch for the sake of space): >>> >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >>> InputStream inputStream = serialPort.getInputStream(); >>> >>> but on the getInputStream() I get the following error message: >>> >>> Bad file descriptor in nativeavailable >>> >>> I cannot figure out where it is going wrong...anyone any ideas. A quick >>> answer would be wonderful, as I am kinda under the hammer to get this >> fixed >>> quickly >>> >>> Thanks in Advance >>> Keith >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From hambyiii at hotmail.com Fri Aug 4 07:52:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:52:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more information >has > > come to light (These errors are actually happening on a client machine, >on > > software that has worked for the past month, and only now has started to > > fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an orignal > > error. The original error occurs the first time I try to WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); > >> } > >> catch (IOException e) > >> { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance > >> Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I am > >>> connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Fri Aug 4 08:21:07 2006 From: gergg at cox.net (Gregg Wonderly) Date: Fri, 04 Aug 2006 09:21:07 -0500 Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: <44D357D3.40303@cox.net> Keith Thorne wrote: > Okay, I made a little mistake in my last message. > > The error is not occuring where I thought it was. Instead it is occuring > when I do the following: > > byte[] readBuffer = new byte[128]; > > try { > > } > catch (IOException e) > { > System.out.println(e.getMessage()); > } > > So I guess the error is happening on the inputStream.read(readBuffer) This is one of the most frustrating things to see over and over. The exception tells you exactly which line the error is occuring on, if you will use it to see where. In Java, these days, every class should do the following. import java.util.logging.*; public class MyClass { Logger log = Logger.getLogger( getClass().getName() ); ...in some method... { String data = ...; // any extra data like addresses or // ports which might be wrong and // cause an exception. try { ... } catch( SomeException ex ) { log.log( Level.SEVERE, ex.toString()+": "+data, ex ); } } } By default, you will see all of the appropriate details of any exception logged at the WARNING or SEVERE level. You can read the javadocs about logging to get more information too. Once you do this, people can then turn up logging and get more information, or otherwise manage it with a logging configuration file or other tools such as JMX or my http://logman.dev.java.net project. Gregg Wonderly From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 09:15:24 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 09:15:24 -0600 Subject: [Rxtx] error getting InputStream Message-ID: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Keith, Please send the full stack trace of the exception, may be I can help you. On Trent's question regarding physical 'Serial Port', do you mean you have a USB(Connected to Client Machine) to 9 Pin Serial cable(Connected to H/W device)? Also please mention which java version you are using? Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Keith Thorne Sent: Friday, August 04, 2006 7:52 AM To: rxtx at qbang.org Subject: Re: [Rxtx] error getting InputStream The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more > > information >has > > come to light (These errors are actually happening on a client > > machine, >on > > software that has worked for the past month, and only now has > > started to fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an > > orignal error. The original error occurs the first time I try to > > WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); } catch (IOException > >> e) { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the > >> inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which > >>> is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I > >>> am connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out > >>> the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get > >>> this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 14:36:16 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 14:36:16 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Trent, As discussed over the phone yesterday, I am emailing you all the details of the bugs I have been experiencing. We do not use Serial Ports like most of the applications. Our application uses approx 80 -100 serial ports (attached thru Digi boxes) which are opened and closed every 20 sec to 1 minute depending upon the type of device. Some Serial ports are left opened all the time and receive event based serial calls while other devices uses polling (request and reply) to collect data. So the opening and closing of the Serial Ports is not really in a sequential order as you mentioned in our conversation yesterday. Also 2 same serial ports can never be opened at one time we have business locks to prevent that from happening. Our findings so far (of course with the help of RXTX user group): The real culprit is in the SerialImp.c file, somehow the other the Event Info Structure in the Linked List gets damaged and loses references to the original EIS structure. I believe both the problems are caused because of the corruption of EIS packet. I have noticed that the link list traversal of EIS in the following methods under SerialImp.c : 1)initialise_event_info_struct 2)finalize_event_info_struct 3)interruptEventLoop So culprit code might be in one of these methods. I am currently using JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and Fedora Core 5). I am also attaching a Test Class to replicate the problem. You need to modify the class and add your systems Serial ports into the code and execute. java TestOpenClosePort 100 It will open and close all the serial ports 100 times in there own thread. Please let me know, I will be available thru out this weekend and can help you as much as I can with testing. Regards Pawan Kharbanda CDOT-ITS 303-478-2991 (cell) 303-985-4350 (home) -------------- next part -------------- A non-text attachment was scrubbed... Name: TestOpenClosePort.java Type: application/octet-stream Size: 6139 bytes Desc: TestOpenClosePort.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dd3754d9/TestOpenClosePort-0004.obj From tjarvi at qbang.org Fri Aug 4 15:43:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 15:43:09 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: Thanks, I'll look at it tomorrow morning. I don't know when I'll find the solution but you may check email tomorrow afternoon to see if I think I found it. On Fri, 4 Aug 2006, Kharbanda, Pawan wrote: > Trent, > As discussed over the phone yesterday, I am emailing you all the > details of the bugs I have been experiencing. We do not use Serial Ports > like most of the applications. Our application uses approx 80 -100 > serial ports (attached thru Digi boxes) which are opened and closed > every 20 sec to 1 minute depending upon the type of device. Some Serial > ports are left opened all the time and receive event based serial calls > while other devices uses polling (request and reply) to collect data. So > the opening and closing of the Serial Ports is not really in a > sequential order as you mentioned in our conversation yesterday. Also 2 > same serial ports can never be opened at one time we have business locks > to prevent that from happening. > > Our findings so far (of course with the help of RXTX user group): > > The real culprit is in the SerialImp.c file, somehow the other the Event > Info Structure in the Linked List gets damaged and loses references to > the original EIS structure. I believe both the problems are caused > because of the corruption of EIS packet. I have noticed that the link > list traversal of EIS in the following methods under SerialImp.c : > > 1)initialise_event_info_struct > 2)finalize_event_info_struct > 3)interruptEventLoop > > So culprit code might be in one of these methods. I am currently using > JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and > Fedora Core 5). > > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > > Regards > Pawan Kharbanda > CDOT-ITS > 303-478-2991 (cell) > 303-985-4350 (home) > > > > > > > > > > From tjarvi at qbang.org Sat Aug 5 12:32:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:32:40 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:34:27 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:34:27 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> You need to run it few times. More the number of ports, more frequently you can reproduce. With just 2 ports it will be hard to reproduce frequently. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:33 PM To: Kharbanda, Pawan Cc: tjarvi at qbang.org; RXTX Developers and Users Subject: Re: Port Locking / JVM Crashing > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Aug 5 12:52:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:52:26 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> Message-ID: Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more frequently > you can reproduce. With just 2 ports it will be hard to reproduce > frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:57:49 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:57:49 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Trent, I have 5 ports of Digi and I can reproduce almost every time. Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX version -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:52 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more > frequently you can reproduce. With just 2 ports it will be hard to > reproduce frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need >> to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From tjarvi at qbang.org Sat Aug 5 13:06:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:06:07 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Message-ID: You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few thousand > iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:07:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:07:33 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E659@hqexchange3.dot.state.co.us> We use our own locks but I haven't turned off the RXTX locks. I am still using the RXTX locks that might be the difference. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:13:22 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:13:22 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Trent, How can you turn off the lock files? I can try using that. I never tried that, I thought you can't turn off the file locking. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From tjarvi at qbang.org Sat Aug 5 13:18:53 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:18:53 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Message-ID: Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java > -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except lockfiles > are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:31:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:31:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Trent, I am able to constantly replicate almost everytime even when I have locks disabled. Don't know the reason why you are not able to on your environment. Any suggestions??????? Cycle No (Thread ::: /dev/cuf04) ::::::: 7 Cycle No (Thread ::: /dev/cuf01) ::::::: 7 Cycle No (Thread ::: /dev/cuf02) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) Exiting Thread ::: /dev/cuf03 Cycle No (Thread ::: /dev/cuf03) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent Port /dev/cuf01 is Opened 0x01 Sent Port /dev/cub01 is Opened 0x01 Sent Port /dev/cuf01 is Closed Port /dev/cuf02 is Closed Port /dev/cuf03 is Closed Port /dev/cuf04 is Closed Port /dev/cub01 is Closed Exiting Thread ::: /dev/cuf03 Exiting Thread ::: /dev/cuf02 Cycle No (Thread ::: /dev/cuf03) ::::::: 8 Cycle No (Thread ::: /dev/cuf02) ::::::: 8 Exiting Thread ::: /dev/cuf04 Exiting Thread ::: /dev/cuf01 Cycle No (Thread ::: /dev/cuf01) ::::::: 8 Cycle No (Thread ::: /dev/cuf04) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened 0x01 Sent Port /dev/cuf01 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 # # An error report file with more information is saved as hs_err_pid21386.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:19 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) > 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux > java -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except > lockfiles are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code >>>> and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm >>> running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From tjarvi at qbang.org Sat Aug 5 14:14:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 14:14:49 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: I'd stick a couple $15 dual port serial boards in the machine to see if its kernel driver specific. I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more problematic. They do not get the same number of eyes looking for problems. You could try putting #undef TIOCSERGETLSR #undef TIOCGICOUNT in the very top of SerialImp.h or one or the other to flip bits of code off and on. The kernel here is 2.6.11.4-20a-smp from Suse. glibc is 2.3.4-23.4 from Suse the jre is 1.5.0_06-b05 from Sun. The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC ram. You should be able to reproduce what I'm seeing then go from there. I don't think I'm going to see this problem without having the same cornercase hardware you have. Maybe we can work that out off the list but I doubt I'm going to find it in rxtx at this point. I have seen problems in the past were kernel structs don't match user space struct and bad things happen but I was including a kernel struct to get functionality that had not made its way into user space at the time. The only thing I may be missing is that when I write 0x01 out the port, nothing comes back. That was not specified but you could easily disconnect anything connected to the ports to see if that changes anything. rxtx is far from bug free but I do not see anything yet. On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I am able to constantly replicate almost everytime even when I have > locks disabled. Don't know the reason why you are not able to on your > environment. Any suggestions??????? > > > Cycle No (Thread ::: /dev/cuf04) ::::::: 7 > Cycle No (Thread ::: /dev/cuf01) ::::::: 7 > Cycle No (Thread ::: /dev/cuf02) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > Exiting Thread ::: /dev/cuf03 > Cycle No (Thread ::: /dev/cuf03) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > Port /dev/cuf01 is Opened > 0x01 Sent > Port /dev/cub01 is Opened > 0x01 Sent > Port /dev/cuf01 is Closed > Port /dev/cuf02 is Closed > Port /dev/cuf03 is Closed > Port /dev/cuf04 is Closed > Port /dev/cub01 is Closed > Exiting Thread ::: /dev/cuf03 > Exiting Thread ::: /dev/cuf02 > Cycle No (Thread ::: /dev/cuf03) ::::::: 8 > Cycle No (Thread ::: /dev/cuf02) ::::::: 8 > Exiting Thread ::: /dev/cuf04 > Exiting Thread ::: /dev/cuf01 > Cycle No (Thread ::: /dev/cuf01) ::::::: 8 > Cycle No (Thread ::: /dev/cuf04) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > 0x01 Sent > Port /dev/cuf01 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 > # > # An error report file with more information is saved as > hs_err_pid21386.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > Aborted > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:19 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Lockfiles are a compile time option. I've turned them on now, corrected > a mistake resulting in only 3 ports being used and now have it going > through a few hundred iterations again without a crash. > > To disable lockfiles.. > > ./configure --disable-lockfiles && make install > > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > Port /dev/ttyS5 is Closed > Exiting Thread ::: /dev/ttyS1 > Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: > /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting > Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port > /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS1 is Closed > Port /dev/ttyS4 is Closed > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > > > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, How can you turn off the lock files? I can try using that. I >> never tried that, I thought you can't turn off the file locking. >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:06 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> You may try 4 ports instead of 5 to make sure thats not the issue. >> >> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >> 2.6.11.4-20a-smp >> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >> java -version java version "1.5.0_06" >> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >> >> I'm using rxtx 2.1-7 (final) with default configuration except >> lockfiles are disabled. I gathered that you are doing your own > resource locking. >> >> ... >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> ... >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>> version >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:52 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> Whats a few times? I've got 4 ports here and have run it a few >>> thousand iterations. >>> >>> Is that true for you if you run it with just four of your DIGI ports? >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> You need to run it few times. More the number of ports, more >>>> frequently you can reproduce. With just 2 ports it will be hard to >>>> reproduce frequently. >>>> >>>> ~pk >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:33 PM >>>> To: Kharbanda, Pawan >>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>> Subject: Re: Port Locking / JVM Crashing >>>> >>>>> I am also attaching a Test Class to replicate the problem. You need > >>>>> to >>>> >>>>> modify the class and add your systems Serial ports into the code >>>>> and >> >>>>> execute. >>>>> >>>>> java TestOpenClosePort 100 >>>>> >>>>> It will open and close all the serial ports 100 times in there own >>>>> thread. >>>>> >>>>> Please let me know, I will be available thru out this weekend and >>>>> can >>> >>>>> help you as much as I can with testing. >>>>> >>>> >>>> How reproducable is the problem with the above testcase? I'm >>>> running >> >>>> 100's of iterations without reproducing the problem. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> >>> >> > From rtlane01 at comcast.net Tue Aug 1 19:22:03 2006 From: rtlane01 at comcast.net (Randall T. Lane) Date: Tue, 01 Aug 2006 21:22:03 -0400 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] Message-ID: <44CFFE3B.90001@comcast.net> Rxtx Community: Please see my e-mail to Trent. Does anyone have any experience using rxtx to successfully communicate with hardware via USB? Thanks. Randy Lane -------------- next part -------------- An embedded message was scrubbed... From: Trent Jarvi Subject: Re: Help with RxTx for USB Communication Date: Tue, 1 Aug 2006 18:49:13 -0600 (MDT) Size: 3300 Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060801/9bbbc255/HelpwithRxTxforUSBCommunication-0004.mht From naranjo.manuel at gmail.com Sun Aug 6 16:59:28 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Sun, 06 Aug 2006 19:59:28 -0300 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44CFFE3B.90001@comcast.net> References: <44CFFE3B.90001@comcast.net> Message-ID: <44D67450.8010100@gmail.com> Randy: I have been able to communicate to AIRcable USB Bluetooth Dongle, with success. I'm not sure which are the options that you have to send to RXTX library, but you can indeed. Check that you do not have the port avaible for much long. I have heard of a problem with WinXP that it simply turn off virtual ports when they are too much long with out activity. If you want I can send you my code, because it is avaible under GPL, the new release is not avaible at AIRcable web site, but it should in short time. Regards, Manu > Rxtx Community: > > Please see my e-mail to Trent. Does anyone have any experience using > rxtx to successfully communicate with hardware via USB? > > Thanks. > > Randy Lane > > ------------------------------------------------------------------------ > > Asunto: > Re: Help with RxTx for USB Communication > De: > Trent Jarvi > Fecha: > Tue, 1 Aug 2006 18:49:13 -0600 (MDT) > Para: > "Randall T. Lane" > > Para: > "Randall T. Lane" > CC: > taj at www.linux.org.uk > > > On Tue, 1 Aug 2006, Randall T. Lane wrote: > >> Trent, >> >> I am working on a project written in Java (1.5) and need to >> communicate to an external device via a USB port. >> >> I have downloaded rxtx-2.1-7-bins-r2.zip from www.rxtx.org and setup >> a Java test project to learn how to use rxtx. I am able to list the >> serial ports available, however rxtx does not recognize my USB port. >> I am running on Windows XP. Here is some output from my test project >> ... >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> COM1 - Serial >> COM3 - Serial >> LPT1 - Parallel >> >> I would appreciate any help you could provide in getting rxtx to >> allow me to communicate via my USB port. >> >> Here is my code, if that would help. >> >> public static void main(String[] args) { >> listPorts(); >> // The listPorts() and getPortTypeName() methods are used for >> port identification. >> static void listPorts() >> { >> Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); >> while ( portEnum.hasMoreElements() ) >> { >> CommPortIdentifier portIdentifier = (CommPortIdentifier) >> portEnum.nextElement(); >> System.out.println(portIdentifier.getName() + " - " + >> getPortTypeName(portIdentifier.getPortType()) ); >> } } >> static String getPortTypeName ( int portType ) >> { >> switch ( portType ) >> { >> case CommPortIdentifier.PORT_I2C: >> return "I2C"; >> case CommPortIdentifier.PORT_PARALLEL: >> return "Parallel"; >> case CommPortIdentifier.PORT_RAW: >> return "Raw"; >> case CommPortIdentifier.PORT_RS485: >> return "RS485"; >> case CommPortIdentifier.PORT_SERIAL: >> return "Serial"; >> default: >> return "unknown type"; >> } >> } >> >> Thanks. >> >> Randy Lane >> > > Hi Randy > > The rxtx mail list is a better place to ask as there are more eyes. > I'm swamped with work. > > Be sure to look to see that your serial port dongle shows up as a > serial port in device manager and no other applications have it open. > USB serial dongles do work with rxtx. Some are less complete than > others. > > -- > Trent Jarvi > tjarvi at qbang.org > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From eddythejekyll at gmail.com Sun Aug 6 23:31:45 2006 From: eddythejekyll at gmail.com (Ed) Date: Sun, 6 Aug 2006 23:31:45 -0600 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? Message-ID: I have written a simple client server (RMI) application without using RxTx where the server controls a parallel port simply by addressing the port and banging the bits in order to drive a relay. It also reads the port's. I am doing this by making Runtime.exec calls to a binary that actually does the parallel port bit banging and reading. However, I'd like to use RxTx so it is a pure Java application, and I've so far installed and figured out how to discover the ports, but I'm having trouble finding good examples or some howto type documentation for this. I did find the two examples on the Wiki: one for serial IO and the other to discover the ports on a system. As I said, I have so far installed RxTx and gotten it to compile and run and I can identify the ports. When I run the server I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found Ports! Found port COM1 Found port COM3 Found port LPT1 LPT1 Not Currently owned EASSwitch Server starting. EASSwitch is bound. Server Ready. So it looks like thing are installed and working, but I feel all dressed up and no idea how to proceed. Basically, I just want to be able to toggle the data lines on the parallel port and read them. Very simple. No parallel printer type usage. Are there any examples I can work off of? If so, please advise. Thank you. -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060806/c7e39898/attachment-0004.html From hambyiii at hotmail.com Sun Aug 6 23:53:54 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Mon, 07 Aug 2006 05:53:54 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Message-ID: Hi, sorry I took the weekend to reply, but I was away for the last couple of days. Unfortunately I cannot send the full stack trace yet. The problem is not, unfortunately, happening on my computer, but on a clients computer, which I will go and visit today. I will hopefully be able to get a stack trace then. As to the physical connection, tt is indeed a USB from the computer, connected to a 9 pin serial device that connects to the hard-ware. My java version is 1.5.06 >From: "Kharbanda, Pawan" >Reply-To: RXTX Developers and Users >To: "RXTX Developers and Users" >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 09:15:24 -0600 > >Keith, > Please send the full stack trace of the exception, may be I can help >you. On Trent's question regarding physical 'Serial Port', do you mean >you have a USB(Connected to Client Machine) to 9 Pin Serial >cable(Connected to H/W device)? > >Also please mention which java version you are using? > >Thanks >Pawan Kharbanda > > >-----Original Message----- >From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >Of Keith Thorne >Sent: Friday, August 04, 2006 7:52 AM >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream > >The physical serial port is actually a USB connection that is then >changed to a "virtual serial port", so I can use the serial port >protocols to connect to it. The other end of the connection is a >hardware device that is constantly turned on. I am not sure about the >port 'vanishing'...we have another piece of software that came with the >hardware device, which we can test the device (and with it the virtual >serial port) with. This has no problem connecting to the serial port or >writing to/reading from the device. >It is only when my software is run, that the error occurs. Like I have >said, my software (using rxtx) is connecting to the serial port >successfully, but it is when I try and write to the serial port that I >get the error. > >Although to be truthful, I am not absolutely certain if the error is >happening on the oStream.write() or the oStream.flush(). I only think it >is the write(), because that is where the writeArray() function is >called. > >thanks >Keith > > > >From: Trent Jarvi > >Reply-To: RXTX Developers and Users > >To: RXTX Developers and Users > >Subject: Re: [Rxtx] error getting InputStream > >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > > > > >Hi Keith > > > >Can you tell us more about the physical serial port? Might it be > >'vanishing?' > > > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > > > Hi, > > > > > > I know I am replying to myself a lot at the moment, but more > > > information > >has > > > come to light (These errors are actually happening on a client > > > machine, > >on > > > software that has worked for the past month, and only now has > > > started to fail, which is why I am a little slow finding things out) > > > > > > The errors I have already written about are only symptoms of an > > > orignal error. The original error occurs the first time I try to > > > WRITE thte > > > OutputStream: > > > > > > OutputStream oStream = serialPort.getOutputStream(); > > > serialPort.notifyOnOutputEmpty(true); > > > > > > byte[] bs = encodeMessage(configString.toString()); > > > > > > oStream.write(bs); > > > oStream.flush(); > > > > > > The error occurs on oStream.write(bs); and is: > > > > > > Input/output error in writeArray > > > > > > Now writeArray is native code, so I have no idea what is going on >there. > >Any > > > help would be appreciated > > > Thanks > > > Keith > > > > > > > > >> From: "Keith Thorne" > > >> Reply-To: RXTX Developers and Users > > >> To: rxtx at qbang.org > > >> Subject: Re: [Rxtx] error getting InputStream > > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > > >> > > >> Okay, I made a little mistake in my last message. > > >> > > >> The error is not occuring where I thought it was. Instead it is > >occuring > > >> when I do the following: > > >> > > >> byte[] readBuffer = new byte[128]; > > >> > > >> try { > > >> > > >> int numBytes = 0; > > >> try { > > >> Thread.sleep(500); > > >> } > > >> catch (InterruptedException e) > > >> {} > > >> > > >> while (inputStream.available() > 0) > > >> { > > >> numBytes = inputStream.read(readBuffer); > > >> } > > >> > > >> processReceivedData(readBuffer, numBytes); } catch (IOException > > >> e) { > > >> System.out.println(e.getMessage()); > > >> } > > >> > > >> So I guess the error is happening on the > > >> inputStream.read(readBuffer) > > >> > > >> again, any help is appreciated and again, thanks in advance Keith > > >> > > >>> From: "Keith Thorne" > > >>> Reply-To: RXTX Developers and Users > > >>> To: rxtx at qbang.org > > >>> Subject: [Rxtx] error getting InputStream > > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > > >>> > > >>> Hi, > > >>> > > >>> I have written a program in Java for Windows xp using RXTX (which > > >>> is > >why > > >> I > > >>> am using this mailing list :). However, I am getting a problem. I > > >>> am connecting to a serial port, like so: > > >>> private CommPortIdentifier portID; > > >>> > > >>> private boolean openPort(String selectedPort) > > >>> { > > >>> boolean portFound = false; > > >>> Enumeration portList; > > >>> > > >>> portList = CommPortIdentifier.getPortIdentifiers(); > > >>> > > >>> while (portList.hasMoreElements()) > > >>> { > > >>> portID = (CommPortIdentifier) portList.nextElement(); > > >>> if (portID.getPortType() == > >CommPortIdentifier.PORT_SERIAL) > > >>> { > > >>> if (portID.getName().equals(selectedPort)) > > >>> { > > >>> portFound = true; > > >>> break; > > >>> } > > >>> } > > >>> } > > >>> > > >>> return portFound; > > >>> } > > >>> > > >>> and then I try and get the serial port input stream (leaving out > > >>> the > >try > > >>> and > > >>> catch for the sake of space): > > >>> > > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", > >2000); > > >>> InputStream inputStream = serialPort.getInputStream(); > > >>> > > >>> but on the getInputStream() I get the following error message: > > >>> > > >>> Bad file descriptor in nativeavailable > > >>> > > >>> I cannot figure out where it is going wrong...anyone any ideas. A > >quick > > >>> answer would be wonderful, as I am kinda under the hammer to get > > >>> this > > >> fixed > > >>> quickly > > >>> > > >>> Thanks in Advance > > >>> Keith > > >>> > > >>> > > >>> _______________________________________________ > > >>> Rxtx mailing list > > >>> Rxtx at qbang.org > > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > > >> > > >> > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Aug 7 06:22:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:22:03 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: Hmm.. I left the test running went I went home Saturday. It looks like something did show up after ~30k iterations. I'll look at it more in my free time. Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS5 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 29417 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 29417 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 29417 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00002aab14c2ec63, pid=20573, tid=1095125344 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6c63] initialise_event_info_struct+0x63 # [thread 1087756640 also had an error] Port /dev/ttyS5 is Opened 0x01 Sent [thread 1089861984 also had an error] Port /dev/ttyS4 is Opened 0x01 Sent [thread 1090914656 also had an error] # An error report file with more information is saved as [thread 1090914656 also had an error] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted On Sat, 5 Aug 2006, Trent Jarvi wrote: > > I'd stick a couple $15 dual port serial boards in the machine to see if its > kernel driver specific. > > I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more > problematic. They do not get the same number of eyes looking for problems. > > You could try putting > > #undef TIOCSERGETLSR > #undef TIOCGICOUNT > > in the very top of SerialImp.h or one or the other to flip bits of code off > and on. > > The kernel here is 2.6.11.4-20a-smp from Suse. > glibc is 2.3.4-23.4 from Suse > the jre is 1.5.0_06-b05 from Sun. > > The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC > ram. > > You should be able to reproduce what I'm seeing then go from there. I don't > think I'm going to see this problem without having the same cornercase > hardware you have. Maybe we can work that out off the list but I doubt I'm > going to find it in rxtx at this point. > > I have seen problems in the past were kernel structs don't match user space > struct and bad things happen but I was including a kernel struct to get > functionality that had not made its way into user space at the time. > > The only thing I may be missing is that when I write 0x01 out the port, > nothing comes back. That was not specified but you could easily disconnect > anything connected to the ports to see if that changes anything. > > rxtx is far from bug free but I do not see anything yet. > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, >> I am able to constantly replicate almost everytime even when I have >> locks disabled. Don't know the reason why you are not able to on your >> environment. Any suggestions??????? >> >> >> Cycle No (Thread ::: /dev/cuf04) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> Exiting Thread ::: /dev/cuf03 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> Port /dev/cuf01 is Opened >> 0x01 Sent >> Port /dev/cub01 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Closed >> Port /dev/cuf02 is Closed >> Port /dev/cuf03 is Closed >> Port /dev/cuf04 is Closed >> Port /dev/cub01 is Closed >> Exiting Thread ::: /dev/cuf03 >> Exiting Thread ::: /dev/cuf02 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 8 >> Exiting Thread ::: /dev/cuf04 >> Exiting Thread ::: /dev/cuf01 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf04) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 >> # >> # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 >> # >> # An error report file with more information is saved as >> hs_err_pid21386.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> Aborted >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:19 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Lockfiles are a compile time option. I've turned them on now, corrected >> a mistake resulting in only 3 ports being used and now have it going >> through a few hundred iterations again without a crash. >> >> To disable lockfiles.. >> >> ./configure --disable-lockfiles && make install >> >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> Port /dev/ttyS5 is Closed >> Exiting Thread ::: /dev/ttyS1 >> Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: >> /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting >> Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port >> /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> >> >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, How can you turn off the lock files? I can try using that. I >>> never tried that, I thought you can't turn off the file locking. >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 1:06 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> You may try 4 ports instead of 5 to make sure thats not the issue. >>> >>> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >>> 2.6.11.4-20a-smp >>> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >>> java -version java version "1.5.0_06" >>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >>> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >>> >>> I'm using rxtx 2.1-7 (final) with default configuration except >>> lockfiles are disabled. I gathered that you are doing your own >> resource locking. >>> >>> ... >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> Port /dev/ttyS4 is Closed >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> ... >>> >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>>> version >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:52 PM >>>> To: Kharbanda, Pawan >>>> Cc: Trent Jarvi; RXTX Developers and Users >>>> Subject: RE: Port Locking / JVM Crashing >>>> >>>> >>>> Whats a few times? I've got 4 ports here and have run it a few >>>> thousand iterations. >>>> >>>> Is that true for you if you run it with just four of your DIGI ports? >>>> >>>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>>> >>>>> You need to run it few times. More the number of ports, more >>>>> frequently you can reproduce. With just 2 ports it will be hard to >>>>> reproduce frequently. >>>>> >>>>> ~pk >>>>> >>>>> -----Original Message----- >>>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>>> Sent: Saturday, August 05, 2006 12:33 PM >>>>> To: Kharbanda, Pawan >>>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>>> Subject: Re: Port Locking / JVM Crashing >>>>> >>>>>> I am also attaching a Test Class to replicate the problem. You need >> >>>>>> to >>>>> >>>>>> modify the class and add your systems Serial ports into the code >>>>>> and >>> >>>>>> execute. >>>>>> >>>>>> java TestOpenClosePort 100 >>>>>> >>>>>> It will open and close all the serial ports 100 times in there own >>>>>> thread. >>>>>> >>>>>> Please let me know, I will be available thru out this weekend and >>>>>> can >>>> >>>>>> help you as much as I can with testing. >>>>>> >>>>> >>>>> How reproducable is the problem with the above testcase? I'm >>>>> running >>> >>>>> 100's of iterations without reproducing the problem. >>>>> >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> >>>> >>> >> > From iinjlv01 at gmail.com Mon Aug 7 06:22:07 2006 From: iinjlv01 at gmail.com (J LV) Date: Mon, 7 Aug 2006 14:22:07 +0200 Subject: [Rxtx] Data lost or Slow sampling Message-ID: Hello I am using RXTX to comm with a motion controller using Serial Port and i can write the commands using SerialPort or RXTXPort without problems, but when i try write and read at high sampling rate, for example to know the position and speed at every moment of a trajectory, i obtain a very irregular response times. I am using the most simple algorimth: 1-Write the command "is trajectory finished?" and wait for SerialPortEvent.DATA_AVAILABLE 2-Read the InputStreamReader of serial port while not empty 3-If trajectory finished then stop program, else, continue 4-Read actual time using System.currentTimeMillis() (t0) 5-Write the command "give me position" and wait for SerialPortEvent.DATA_AVAILABLE 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) 7-Read the InputStreamReader of serial port while not empty 8-Save position in Vector or ArrayList and repeat from 1 I don't know if the problem is the RXTX, my program or the motion controller hardware but i have response times from 16 millis to 78 millis at 19200 bauds!. I am using SwingWorked to threading SerialPort reading/writing process. Any idea or similar data leak problem? Thanks for RXTX project and sorry for my badde english! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/909a4cb3/attachment-0004.html From tjarvi at qbang.org Mon Aug 7 06:50:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:50:10 -0600 (MDT) Subject: [Rxtx] Data lost or Slow sampling In-Reply-To: References: Message-ID: On Mon, 7 Aug 2006, J LV wrote: > Hello > > I am using RXTX to comm with a motion controller using Serial Port and i can > write the commands using SerialPort or RXTXPort without problems, but when i > try write and read at high sampling rate, for example to know the position > and speed at every moment of a trajectory, i obtain a very irregular > response times. I am using the most simple algorimth: > 1-Write the command "is trajectory finished?" and wait for > SerialPortEvent.DATA_AVAILABLE > 2-Read the InputStreamReader of serial port while not empty > 3-If trajectory finished then stop program, else, continue > 4-Read actual time using System.currentTimeMillis() (t0) > 5-Write the command "give me position" and wait for > SerialPortEvent.DATA_AVAILABLE > 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) > 7-Read the InputStreamReader of serial port while not empty > 8-Save position in Vector or ArrayList and repeat from 1 > > > I don't know if the problem is the RXTX, my program or the motion controller > hardware but i have response times from 16 millis to 78 millis at 19200 > bauds!. I am using SwingWorked to threading SerialPort reading/writing > process. > > Any idea or similar data leak problem? > > Thanks for RXTX project and sorry for my badde english! > This can be platform dependant. What you may do for a starting point is use a loopback connection and time the same thing at 19200. Write the date, wait for data available, read the data. I would expect from write to data available to take around 10 ms from past experiences. You can experiment with turning on and off buffering in the port settings of the OS, if the OS supports more realtime like interrupts, that could help. You have a java schedual and the kernel schedual. Serial interrupts traditionally have very high priority but modern OSs tend to realize thats not good for GUIs, ... and delay responding to the interrupts. You should be able to have usec response times in a realtime OS. Windows and Linux are not typically setup as realtime OSs. For comparison, the last time I looked which was about 5 years ago, windows NT4 came back with data available in 8 ms and Linux came back in 10 ms. I would be interested in seeing what you get today. -- Trent Jarvi tjarvi at qbang.org From gergg at cox.net Mon Aug 7 09:21:56 2006 From: gergg at cox.net (Gregg Wonderly) Date: Mon, 07 Aug 2006 10:21:56 -0500 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? In-Reply-To: References: Message-ID: <44D75A94.9030205@cox.net> Ed wrote: > Are there any examples I can work off of? If so, please advise. Just read the javax.comm javadocs. You need to take the parallel port and write values to it based on which bits of which lines you want on and off. Gregg Wonderly From pete.flugstad at gmail.com Mon Aug 7 09:36:19 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 7 Aug 2006 10:36:19 -0500 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44D67450.8010100@gmail.com> References: <44CFFE3B.90001@comcast.net> <44D67450.8010100@gmail.com> Message-ID: <84d4a6d50608070836v97e9a29q96e98441ea903ac7@mail.gmail.com> FYI, I'm talking to a USB<->Serial dongle just fine under Windows XP Pro. I did have to install a driver for the thing - Windows XP by default, did not recognize it. Once installed, it just showed up as another COM port, and I've been pushing data over it with no problems. Pete From savagobr at yahoo.com Mon Aug 7 10:13:06 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Mon, 7 Aug 2006 09:13:06 -0700 (PDT) Subject: [Rxtx] Port Locking / JVM Crashing: 2 ports (Serial + usb) Message-ID: <20060807161306.9648.qmail@web53803.mail.yahoo.com> Trent This is curious, since I did reproduced the aformentioned bug using only 2 ports: /dev/ttyS0 and /dev/ttyUSB0. It only need to run for 500 times: $ java -cp . TestOpenClosePort 500 500 Port /dev/ttyS0 is Closed Excpetion ::: Thread ::: /dev/ttyUSB0null Exiting Thread ::: /dev/ttyUSB0 Cycle No (Thread ::: /dev/ttyUSB0) ::::::: 227 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 184 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x203d2044, pid=32368, tid=2986859424 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing) # Problematic frame: # C 0x203d2044 # # An error report file with more information is saved as /tmp/hs_err_pid32368.log # # If you would like to submit a bug report, please visit: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Best regards Savago ps: Test environment $ uname -a Linux localhost.localdomain 2.6.15-1.2054_FC5 #1 Tue Mar 14 15:48:33 EST 2006 i686 i686 i386 GNU/Linux $ java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) $gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.1 20060525 (Red Hat 4.1.1-1) --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/c6ca8094/attachment-0004.html From Pawan.Kharbanda at dot.state.co.us Mon Aug 7 17:23:25 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 7 Aug 2006 17:23:25 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Trent, I think I got the problem fixed after some code changes in the C (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the staging environment (with 10 devices) with real time data and haven't seen a JVM lock/ Port locking since last night. I am going to do further stress testing and will send all my code changes and my findings in next few days. I believe the problem was causing due to the digi drivers and how the Linux kernel talked to it, so after making some code changes and synchronization fixes, I got it to work. I am keeping my fingers crossed :) Thanks for all your help. You have been a great help. Will keep you posted. Cheers ~pk PS : We are going to test my new RXTX changes with the 2.6 Red Hat kernel (currently using 2.4.21-37.ELsmp) too. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 5:08 PM To: Kharbanda, Pawan Subject: RE: Port Locking / JVM Crashing Hi Pawan As mentioned I did reproduce the error but after several hours of cycles. I'm looking at RXTXPort.java and thinking about what may be happening. The error is in the C layer but it may be preventable in the java code. lets say two closes are overlapping or an operation is trying to happen while another port is closing. The structure may be out of sync by the time the code using the structure in another thread gets to the event info struct. So I'm wondering if synchronization in RXTXPort() and close() may help you. A second thing that may help is you can put printf("got here\n"); in each of the lines in initialize event info struct to verify that the problem is in walking the linked list. Thats my suspicion. So a properly timed close() while calling the constructor may be catching rxtx off guard. You can synchronize to test that and it may do away with the problem. From tjarvi at qbang.org Mon Aug 7 18:01:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 18:01:54 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Message-ID: Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do further > stress testing and will send all my code changes and my findings in next > few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to happen > while another port is closing. The structure may be out of sync by the > time the code using the structure in another thread gets to the event > info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may do > away with the problem. > From Pawan.Kharbanda at dot.state.co.us Tue Aug 8 13:49:14 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 8 Aug 2006 13:49:14 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Trent, I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and have absolutely no problem with JVM crashing or Port Locking even after 10000 operations (now I am trying 100,000 :). This is all with the original RXTX 2.1.7 (final) api's without any of my fixes that I have been trying for last 2-3 weeks. I will suggest that we update the INSTALL or Readme file accompnying the RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: 82000685_G 02/02/2006). This should helped everybody using the RXTX API's with RedHat Linux atleast. Regards Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 6:02 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do > further stress testing and will send all my code changes and my > findings in next few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers > crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to > happen while another port is closing. The structure may be out of > sync by the time the code using the structure in another thread gets > to the event info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may > do away with the problem. > From jimo at earthlink.net Wed Aug 9 21:21:00 2006 From: jimo at earthlink.net (Jim Owen) Date: Wed, 9 Aug 2006 20:21:00 -0700 Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat Message-ID: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Hi All, I've run into some difficulties with rxtx that have me baffled and need some help. I have an application that has used earlier versions of rxtx successfully and on a variety of platforms. We recently needed to deploy this application into an environment where we could not utilize lock files. I pulled down the 2.0.7 pre1 source distribution and executed configure with --disable-lockfiles. I then executed make and make install. When I execute the program, as root, I get the following error: ************************************************************************ Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) # Problematic frame: # C 0x00001004 # # An error report file with more information is saved as hs_err_pid20151.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # **************************************************************************** If I execute as a normal user, I get no errors, but no ports listed: (Using an earlier version, I get a serial and parallel port listed.) **************************************************************************** [jim at linuxDev ingenicoApp]$ java VerifyCommBuild Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Some ports appear to have been found, let's try to enumerate them. Complete. **************************************************************************** When I built rxtx, there was a warning given of the following: **************************************************************************** conftest.c: In function 'main': conftest.c:6: warning: incompatible implicit declaration of built-in function 'printf' conftest.c:7: warning: incompatible implicit declaration of built-in function 'exit' WARNING: Kernel include files do not match the current kernel **************************************************************************** uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux JAVA_HOME=/usr/java/j2sdk1.4.2_11 javax.comm.properties: Driver=gnu.io.RXTXCommDriver Here's the code for VerifyCommBuild.java that I'm using to test: **************************************************************************** import javax.comm.*; import java.util.Enumeration; /** * A quick app to check that the javax.comm (Serial) Communications extension has been properly * installed and configured on this machine. * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. */ public class VerifyCommBuild { public static void main(String args[]) { Enumeration ports; System.out.println("Verifying Comm Build Environment"); try { ports = CommPortIdentifier.getPortIdentifiers(); if (ports == null) { System.out.println("No comm ports found!"); return; } System.out.println("Some ports appear to have been found, let's try to enumerate them."); while (ports.hasMoreElements()) { System.out.println("Here is a port [" + ((CommPortIdentifier)ports.nextElement()).getName() + "]"); } } catch (Exception e) { System.out.println("Failed to enumerate ports [" + e.getMessage() + "]"); e.printStackTrace(); } System.out.println("Complete."); } } **************************************************************************** Any suggestions as to what I'm missing? Thanks, Jim Owen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060809/92503a81/attachment-0004.html From tjarvi at qbang.org Thu Aug 10 05:39:36 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 05:39:36 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Message-ID: On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even after > 10000 operations (now I am trying 100,000 :). This is all with the > original RXTX 2.1.7 (final) api's without any of my fixes that I have > been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying the > RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp > and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From oliver.archner at bayceer.uni-bayreuth.de Wed Aug 9 06:13:36 2006 From: oliver.archner at bayceer.uni-bayreuth.de (Oliver Archner) Date: Wed, 09 Aug 2006 14:13:36 +0200 Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() Message-ID: <44D9D170.5020806@bayceer.uni-bayreuth.de> Dear Users, i would like to send a byte to a parallel device. The following piece of code works well but throws an IOException in LPRPort$ParallelOutputStream.write() saying that everything is ok ?! Oliver import java.io.*; import gnu.io.*; public class Test { public static void main(String[] args) { RXTXCommDriver TxPort = new RXTXCommDriver(); ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", CommPortIdentifier.PORT_PARALLEL); OutputStream oStream = null; try { oStream = pPort.getOutputStream(); oStream.write((byte)0x51); } catch (IOException e) { e.printStackTrace(); } finally { try { if (oStream != null) oStream.close(); } catch (IOException e) { e.printStackTrace(); } } } } Output: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Der Vorgang wurde erfolgreich beendet. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at Test.main(Test.java:12) From tjarvi at qbang.org Thu Aug 10 18:12:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 18:12:27 -0600 (MDT) Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() In-Reply-To: <44D9D170.5020806@bayceer.uni-bayreuth.de> References: <44D9D170.5020806@bayceer.uni-bayreuth.de> Message-ID: On Wed, 9 Aug 2006, Oliver Archner wrote: > Dear Users, > > i would like to send a byte to a parallel device. > The following piece of code works well but throws an IOException in > LPRPort$ParallelOutputStream.write() saying that everything is ok ?! > > Oliver > > > import java.io.*; > import gnu.io.*; > > public class Test { > > public static void main(String[] args) { > RXTXCommDriver TxPort = new RXTXCommDriver(); > ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", > CommPortIdentifier.PORT_PARALLEL); > OutputStream oStream = null; > try { > oStream = pPort.getOutputStream(); > oStream.write((byte)0x51); > } catch (IOException e) { > e.printStackTrace(); > } finally { > try { > if (oStream != null) oStream.close(); > } catch (IOException e) { > e.printStackTrace(); > > } > } > > } > } > > Output: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Der Vorgang wurde erfolgreich beendet. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at Test.main(Test.java:12) WriteFile is returning a negative value or 0. I do not know what that exception is saying but it should be an IO Exception. The native code in question is line 405 in ParallelImp.c. If you find the documentation pointing out how the code is wrong, we can fix it. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 08:12:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 09:12:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question Message-ID: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Hello, I'm trying to send data over a serial port using the RXTX libraries. I've got the binaries for Windows XP from qbang.org. On the receiving side, I'm using event notification (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial Ports InputStream. Similarly on the transmist side, I use SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. First question: does this make sense? The code was largely adopted from an existing Windows C++ program and that's more or less how it operated (overlapped io using ReadFile, WriteFile, GetOverlappedResult, Events, etc). Second question: in a small standalone test program I wrote, everything seems to work just fine - whenever SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good chunk of data available (I explicitly set the in/out buffers to 1024 bytes) to read. However, when I pull my "library" into a much larger environment (OSGI framework based, but same JVM/OS/etc), whenever SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a byte or two available. Needless to say, this really kills performance. Everything appears to still operate properly, just really, really slowly. So, has anyone seen this problem before? I haven't dived into the details of RXTX library, and I'm wondering what the mechanism is here? How does the RXTX thread determine when to issue the SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to tweak in RXTX or the JVM to get this to operate more like the small test program? Seems like I want RXTX to call me back _less_ often. Thanks, Pete From tjarvi at qbang.org Fri Aug 11 09:55:23 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 09:55:23 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Hello, > > I'm trying to send data over a serial port using the RXTX > libraries. I've got the binaries for Windows XP from qbang.org. > > On the receiving side, I'm using event notification > (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial > Ports InputStream. Similarly on the transmist side, I use > SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. > > First question: does this make sense? The code was largely adopted > from an existing Windows C++ program and that's more or less how it > operated (overlapped io using ReadFile, WriteFile, > GetOverlappedResult, Events, etc). > > Second question: in a small standalone test program I wrote, > everything seems to work just fine - whenever > SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good > chunk of data available (I explicitly set the in/out buffers to 1024 > bytes) to read. > > However, when I pull my "library" into a much larger environment > (OSGI framework based, but same JVM/OS/etc), whenever > SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a > byte or two available. Needless to say, this really kills > performance. Everything appears to still operate properly, just > really, really slowly. > > So, has anyone seen this problem before? I haven't dived into the > details of RXTX library, and I'm wondering what the mechanism is here? > How does the RXTX thread determine when to issue the > SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to > tweak in RXTX or the JVM to get this to operate more like the small > test program? > Seems like I want RXTX to call me back _less_ often. > Hi Pete RXTX is doing overlapped IO in termios.c. In this file we map the windows functionality to termios (mostly POSIX). From there, we just talk termios to all platforms. What I guess is happening is the eventloop is waiting a specified amount of time. As you application uses more cpu cycles, you observe the difference in behavior. You could go into the C code and change this after looking at the eventLoop() code in serialImp.c and following that to the serial_ioctl() and serial_select() in termios.c Another option is to go into RXTXPort.java and put a sleep in the sendEvent() code. This way you would not have to recompile the native code (not very easy at this point). -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 13:27:36 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:27:36 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > Another option is to go into RXTXPort.java and put a sleep in the > sendEvent() code. This way you would not have to recompile the native > code (not very easy at this point). Are the instructions in the INSTALL file still valid? If so, it wasn't very hard to build it (I already had MinGW installed). Everything seemed to build just fine. Haven't tried to install/use it yet, but it wasn't a big deal (assuming those instructions were correct. Thanks, Pete From pete.flugstad at gmail.com Fri Aug 11 13:42:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:42:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, but there doesn't appear to be a way to select that via RXTX (which appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control is selected). Is there a way I'm not seeing? Thanks, Pete From eddythejekyll at gmail.com Fri Aug 11 15:20:44 2006 From: eddythejekyll at gmail.com (Ed) Date: Fri, 11 Aug 2006 15:20:44 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion Message-ID: I'm trying to read and write a parallel port on a standard (Dell) pc running RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. I'm having problems getting rxtx to return a port enumeration from getPortIdentifiers. I'm using a file PortChooser.java as a test file to get things going. This is from the Java CookBook 2nd edition (Chapter 12). The call // get list of ports available on this particular computer, // by calling static method in CommPortIdentifier. Enumeration pList = CommPortIdentifier.getPortIdentifiers(); returns a null pList; I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and compile without --disable-lockfiles I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ... When I compile with --disable-lockfiles the call to getPortIdentifiers simply returns a null Enumeration. I've read the documention and threads about this issue and I feel like I've tried everything, so at the moment I'm stumped. I can supply any further info that may help. Thanks in advance. Ed -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060811/80c4eeec/attachment-0004.html From tjarvi at qbang.org Fri Aug 11 18:29:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:29:48 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > On 8/11/06, Trent Jarvi wrote: >> Another option is to go into RXTXPort.java and put a sleep in the >> sendEvent() code. This way you would not have to recompile the native >> code (not very easy at this point). > > Are the instructions in the INSTALL file still valid? If so, it > wasn't very hard to build it > (I already had MinGW installed). Everything seemed to build just > fine. Haven't tried to install/use it yet, but it wasn't a big deal > (assuming those instructions were correct. > Hi Pete The instructions are correct. You will want to make sure that the exports worked. If the library does not work properly, then the exports failed. The exports are currently generated with nm, sed and grep in the Makefile which is often commented out. If the def file is old, it will cause problems. You should be good to go then. Look at the serial_select and eventLoop code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:33:32 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:33:32 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > but there doesn't appear to be a way to select that via RXTX (which > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > is selected). > > Is there a way I'm not seeing? > Hi Pete I'm guessing I didn't know the difference. At the time, I really didn't have windows API documentation. I just had some pages I found with altivista/google. Later microsoft made their documentation available on msdn or I learned about it. For rxtx, the calls need to be platform neutral. So if you see how to do each in termios, then we can get it going. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:45:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:45:24 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Fri, 11 Aug 2006, Ed wrote: > I'm trying to read and write a parallel port on a standard (Dell) pc running > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. > > I'm having problems getting rxtx to return a port enumeration from > getPortIdentifiers. I'm using a file > PortChooser.java as a test file to get things going. This is from the Java > CookBook 2nd edition (Chapter 12). The call > > // get list of ports available on this particular computer, > // by calling static method in CommPortIdentifier. > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > returns a null pList; > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and > compile without --disable-lockfiles I get: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > ... > > When I compile with --disable-lockfiles the call to getPortIdentifiers > simply returns a null Enumeration. > > I've read the documention and threads about this issue and I feel like I've > tried everything, so at the moment I'm stumped. > > I can supply any further info that may help. > > Thanks in advance. > > Ed > Hi Ed You may want to check the permissions of /dev/lp*. Also make sure lp or your kernel support for lp is loaded. It should show up in dmesg and lsmod. For my laptop with no printer port enabled in BIOS is see: lp: driver loaded but no devices found in desg |grep lp [] $ ls -l /dev/lp* crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 here root and group lp can read and write. Normal users cannot. Try a simple read as a user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: Permission denied Fix as root [] chmod 666 /dev/lp* [] $ ls -l /dev/lp* crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 Now as user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: No such device or address So this is saying there is no lp0 on my laptop. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:58:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:58:31 -0600 (MDT) Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat In-Reply-To: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> References: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Message-ID: On Wed, 9 Aug 2006, Jim Owen wrote: > Hi All, > > I've run into some difficulties with rxtx that have me baffled and need > some help. > > I have an application that has used earlier versions of rxtx > successfully and on a variety of platforms. We recently needed to deploy > this application into an environment where we could not utilize lock files. > > I pulled down the 2.0.7 pre1 source distribution and executed configure > with --disable-lockfiles. I then executed make and make install. > > When I execute the program, as root, I get the following error: > > ************************************************************************ > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) > # Problematic frame: > # C 0x00001004 > # > # An error report file with more information is saved as hs_err_pid20151.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > **************************************************************************** > > If I execute as a normal user, I get no errors, but no ports listed: > (Using an earlier version, I get a serial and parallel port listed.) > > **************************************************************************** > [jim at linuxDev ingenicoApp]$ java VerifyCommBuild > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Some ports appear to have been found, let's try to enumerate them. > Complete. > **************************************************************************** > > When I built rxtx, there was a warning given of the following: > > **************************************************************************** > conftest.c: In function 'main': > conftest.c:6: warning: incompatible implicit declaration of built-in > function 'printf' > conftest.c:7: warning: incompatible implicit declaration of built-in > function 'exit' > > WARNING: Kernel include files do not match the current kernel > **************************************************************************** > > > uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 > Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux > > JAVA_HOME=/usr/java/j2sdk1.4.2_11 > > javax.comm.properties: Driver=gnu.io.RXTXCommDriver > > Here's the code for VerifyCommBuild.java that I'm using to test: > > > **************************************************************************** > import javax.comm.*; > import java.util.Enumeration; > /** > * A quick app to check that the javax.comm (Serial) Communications > extension has been properly > * installed and configured on this machine. > * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. > */ > public class VerifyCommBuild > { > public static void main(String args[]) > { > Enumeration ports; > System.out.println("Verifying Comm Build Environment"); > try > { > ports = CommPortIdentifier.getPortIdentifiers(); > if (ports == null) > { > System.out.println("No comm ports found!"); > return; > } > System.out.println("Some ports appear to have been found, let's > try to enumerate them."); > while (ports.hasMoreElements()) > { > System.out.println("Here is a port [" + > ((CommPortIdentifier)ports.nextElement()).getName() > + "]"); > } > } catch (Exception e) > { > System.out.println("Failed to enumerate ports [" + > e.getMessage() + "]"); > e.printStackTrace(); > } > System.out.println("Complete."); > } > } > Hi Jim This is a new one to me. Have you tried it on another system. Maybe something isnt sane in your toolchain. -- Trent Jarvi tarvi at qbang.org From eddythejekyll at gmail.com Sat Aug 12 11:45:39 2006 From: eddythejekyll at gmail.com (Ed) Date: Sat, 12 Aug 2006 11:45:39 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Trent, Right after I sent the results indicated below I re-ran the app and it apparently found the parallel port. The difference was that I set the permissions to : /dev: wildcard lp* crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 I'm still not sure how to interpret the dmesg and lsmod before. However I'm thinking that since the user now has permission to access the lp* port, a request to access it loaded the lp and parport modules automatically and allowed me access. Here's the output of lsmod now: ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp lp 5540 0 (autoclean) parport 21608 1 (autoclean) [parport_pc lp] and dmesg: ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp On node 0 totalpages: 161776 lp0: using parport0 (polling). So I think I'm good, and ready to move on the next steps. Thanks Trent! Ed On 8/12/06, Ed wrote: > > Thanks for the reply Trent. > > I'm on a different system today but am trying your suggestons. This is a > debian 3.1r2 system and I'm running jdk 1.5.0_04. > > Take a look below, but I think I have no parallel port support on this > kernel, however I never get the "No such device or address" return from the > cat call as you did so I'm not sure how to interpret the results. > > When I run the test program (PortChooser.java), the getPortIdentifiers > call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is > more than I found on the RedHat system. Incidently --disable-lockfiles has > no effect. > > It looks as though there is no parallel support in this kernel: > falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > On node 0 totalpages: 161776 > falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > > I'm a little confused by the results when I cat to the lp0 device. It > seems from the dmesg output that I don't have parallel printer support, but > when I cat to the lp0 device, I get permission denied if I'm non-root user > and input/output error if I'm root. Apparently this means I have the device, > but no support in the kernel? > > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > ed at falcon:~/src/workspace/EASServer/src$ su > Password: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > > Here's my lp* device permissions. > /dev: > wildcard lp* > crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > If I change it to > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I get: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > falcon:/home/ed/src/workspace/EASServer/src# exit > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > cat: /dev/lp0: Input/output error > ed at falcon:~/src/workspace/EASServer/src$ > > What do you think? Should I recompile the kernel or is it something else? > > By the way, I added the user ed to the lp and uucp groups on this system. > > Thanks again, > > Ed > > On 8/11/06, Trent Jarvi wrote: > > > > On Fri, 11 Aug 2006, Ed wrote: > > > > > I'm trying to read and write a parallel port on a standard (Dell) pc > > running > > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > > gates. > > > > > > I'm having problems getting rxtx to return a port enumeration from > > > getPortIdentifiers. I'm using a file > > > PortChooser.java as a test file to get things going. This is from the > > Java > > > CookBook 2nd edition (Chapter 12). The call > > > > > > // get list of ports available on this particular computer, > > > // by calling static method in CommPortIdentifier. > > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > > > > > returns a null pList; > > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure > > and > > > compile without --disable-lockfiles I get: > > > > > > Stable Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7 > > > Java lib Version = RXTX-2.1-7 > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > ... > > > > > > When I compile with --disable-lockfiles the call to getPortIdentifiers > > > > > simply returns a null Enumeration. > > > > > > I've read the documention and threads about this issue and I feel like > > I've > > > tried everything, so at the moment I'm stumped. > > > > > > I can supply any further info that may help. > > > > > > Thanks in advance. > > > > > > Ed > > > > > > > Hi Ed > > > > You may want to check the permissions of /dev/lp*. Also make sure lp or > > your kernel support for lp is loaded. It should show up in dmesg and > > lsmod. > > > > For my laptop with no printer port enabled in BIOS is see: > > > > lp: driver loaded but no devices found > > > > in desg |grep lp > > > > [] $ ls -l /dev/lp* > > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > here root and group lp can read and write. Normal users cannot. > > > > Try a simple read as a user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > > > > Fix as root > > > > [] chmod 666 /dev/lp* > > [] $ ls -l /dev/lp* > > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > Now as user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: No such device or address > > > > So this is saying there is no lp0 on my laptop. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > > > -- > > Ed > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060812/c2afe1f8/attachment-0004.html From tjarvi at qbang.org Sat Aug 12 14:01:52 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 12 Aug 2006 14:01:52 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Remember that the lp code expects a printer - or something like it. There is a line that specifies the printer is online. If you are doing hobby work, you will need to raise that line or loop it back to something that is raised. If you just try reading a port with no device connected and online, there will be an error while trying to read. This should be addressed in the mail-list archives. On Sat, 12 Aug 2006, Ed wrote: > Trent, > Right after I sent the results indicated below I re-ran the app and it > apparently found the parallel port. The difference was that I set the > permissions to : > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I'm still not sure how to interpret the dmesg and lsmod before. However I'm > thinking that since the user now has permission to access the lp* port, a > request to access it loaded the lp and parport modules automatically and > allowed me access. Here's the output of lsmod now: > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > lp 5540 0 (autoclean) > parport 21608 1 (autoclean) [parport_pc lp] > > and dmesg: > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > On node 0 totalpages: 161776 > lp0: using parport0 (polling). > > So I think I'm good, and ready to move on the next steps. > > Thanks Trent! > > Ed > > > On 8/12/06, Ed wrote: >> >> Thanks for the reply Trent. >> >> I'm on a different system today but am trying your suggestons. This is a >> debian 3.1r2 system and I'm running jdk 1.5.0_04. >> >> Take a look below, but I think I have no parallel port support on this >> kernel, however I never get the "No such device or address" return from the >> cat call as you did so I'm not sure how to interpret the results. >> >> When I run the test program (PortChooser.java), the getPortIdentifiers >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is >> more than I found on the RedHat system. Incidently --disable-lockfiles has >> no effect. >> >> It looks as though there is no parallel support in this kernel: >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp >> On node 0 totalpages: 161776 >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp >> >> I'm a little confused by the results when I cat to the lp0 device. It >> seems from the dmesg output that I don't have parallel printer support, but >> when I cat to the lp0 device, I get permission denied if I'm non-root user >> and input/output error if I'm root. Apparently this means I have the >> device, >> but no support in the kernel? >> >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> >> cat: /dev/lp0: Permission denied >> ed at falcon:~/src/workspace/EASServer/src$ su >> Password: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> >> Here's my lp* device permissions. >> /dev: >> wildcard lp* >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> If I change it to >> /dev: >> wildcard lp* >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> I get: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> falcon:/home/ed/src/workspace/EASServer/src# exit >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> ed at falcon:~/src/workspace/EASServer/src$ >> >> What do you think? Should I recompile the kernel or is it something else? >> >> By the way, I added the user ed to the lp and uucp groups on this system. >> >> Thanks again, >> >> Ed >> >> On 8/11/06, Trent Jarvi wrote: >> > >> > On Fri, 11 Aug 2006, Ed wrote: >> > >> > > I'm trying to read and write a parallel port on a standard (Dell) pc >> > running >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the >> > gates. >> > > >> > > I'm having problems getting rxtx to return a port enumeration from >> > > getPortIdentifiers. I'm using a file >> > > PortChooser.java as a test file to get things going. This is from the >> > Java >> > > CookBook 2nd edition (Chapter 12). The call >> > > >> > > // get list of ports available on this particular computer, >> > > // by calling static method in CommPortIdentifier. >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); >> > > >> > > returns a null pList; >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure >> > and >> > > compile without --disable-lockfiles I get: >> > > >> > > Stable Library >> > > ========================================= >> > > Native lib Version = RXTX-2.1-7 >> > > Java lib Version = RXTX-2.1-7 >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > ... >> > > >> > > When I compile with --disable-lockfiles the call to getPortIdentifiers >> > >> > > simply returns a null Enumeration. >> > > >> > > I've read the documention and threads about this issue and I feel like >> > I've >> > > tried everything, so at the moment I'm stumped. >> > > >> > > I can supply any further info that may help. >> > > >> > > Thanks in advance. >> > > >> > > Ed >> > > >> > >> > Hi Ed >> > >> > You may want to check the permissions of /dev/lp*. Also make sure lp or >> > your kernel support for lp is loaded. It should show up in dmesg and >> > lsmod. >> > >> > For my laptop with no printer port enabled in BIOS is see: >> > >> > lp: driver loaded but no devices found >> > >> > in desg |grep lp >> > >> > [] $ ls -l /dev/lp* >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > here root and group lp can read and write. Normal users cannot. >> > >> > Try a simple read as a user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: Permission denied >> > >> > Fix as root >> > >> > [] chmod 666 /dev/lp* >> > [] $ ls -l /dev/lp* >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > Now as user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: No such device or address >> > >> > So this is saying there is no lp0 on my laptop. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > >> >> >> >> -- >> >> Ed >> > > > > From pete.flugstad at gmail.com Mon Aug 14 07:51:41 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 08:51:41 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: <84d4a6d50608140651h3cb2266ap90c47780abace00@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > On Fri, 11 Aug 2006, Pete Flugstad wrote: > > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > > but there doesn't appear to be a way to select that via RXTX (which > > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > > is selected). > > I'm guessing I didn't know the difference. At the time, I really didn't > have windows API documentation. I just had some pages I found with > altivista/google. Later microsoft made their documentation available on > msdn or I learned about it. > > For rxtx, the calls need to be platform neutral. So if you see how to do > each in termios, then we can get it going. so, RTSCTS_IN/OUT at the COMM API is mapped to HARDWARE_FLOW_CONTROL in the POSIX layer. Which termios.c maps to RTS_CONTROL_HANDSHAKE and fOutxCtsFlow = true. Since termios.c is Windows only anway... Would it work to change the mapping in termios.c to map hardware flow control to RTS_CONTROL_TOGGLE? I just wondering (I'm going to go look, but there's a lot of code in there) if the code does anything special playing with flow control signals? Thanks, Pete From pete.flugstad at gmail.com Mon Aug 14 09:42:48 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 10:42:48 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> On 8/3/06, Trent Jarvi wrote: > On Thu, 3 Aug 2006, Pete Flugstad wrote: > > Okay, I can understand that, but from the PORTMON output, it looks > > like it's opening each port TWICE: > > I think this problem is in RXTXCommDriver.java. I've just not tracked it > down but it should be in the java code, not the native code so easy > enough to track down. Okay, I'm trying to track this down... Looks like the CommPortIdentifier static initializer loads RXTXCommDriver, and then calls RXTXDriver.initialize. But then CommPortIdentifier.getPortIdentifiers does the exact same thing. So that's where the two scans are coming from. I would guess that one or the other can be removed? Probably the one in the CommPortIdentifier.getPortIdentifiers? Doing so removes the 2nd scan. Pete PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) val = System.getProperty("gnu.io.SerialPorts"); Shouldn't the comparison be != null? getProperty returns null if the variable is NOT found, and you only want to assign to val if it IS found, right? Same thing for the parallel port case. End result is the same I guess, since you check for null later, but probably should be fixed. From eddythejekyll at gmail.com Mon Aug 14 11:55:17 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 11:55:17 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: When I try to get the mode with int mode = pPort.getMode(); it returns 0 which isn't any of the valid modes. I tried setting it explicitely with pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced the requested mode in nativeSetSerialPortParams at gnu.io.LPRPort.setLPRMode(Native Method) at gnu.io.LPRPort.setMode(LPRPort.java:87) Except for LPT_MODE_ANY, but the getMode call still failed out with an invalid state. I'm wondering if it's because I don't have the line pulled high like you said. This isn't a printer connected. It's a relay board with pins 2-9 tied to data, and 18-25 to gnd. The rest are open. I looked at a DB25 pinout diagram and I'm not sure which pin I need to tie high, and I looked through the archives, but didn't find a reference to something definitive. Can someone help me with which pin is the "online" pin as Trent mentioned? DB25 spec has ( I hope this formats correctly in this email) BUSY (11), SEL (13) or INIT (16) are candidates, but I'm guessing. Any clues? *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Thanks, Ed On 8/12/06, Trent Jarvi wrote: > > > Remember that the lp code expects a printer - or something like it. There > is a line that specifies the printer is online. If you are doing hobby > work, you will need to raise that line or loop it back to something that > is raised. > > If you just try reading a port with no device connected and online, there > will be an error while trying to read. This should be addressed in the > mail-list archives. > > On Sat, 12 Aug 2006, Ed wrote: > > > Trent, > > Right after I sent the results indicated below I re-ran the app and it > > apparently found the parallel port. The difference was that I set the > > permissions to : > > /dev: > > wildcard lp* > > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > > > I'm still not sure how to interpret the dmesg and lsmod before. However > I'm > > thinking that since the user now has permission to access the lp* port, > a > > request to access it loaded the lp and parport modules automatically and > > allowed me access. Here's the output of lsmod now: > > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > > lp 5540 0 (autoclean) > > parport 21608 1 (autoclean) [parport_pc lp] > > > > and dmesg: > > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > > On node 0 totalpages: 161776 > > lp0: using parport0 (polling). > > > > So I think I'm good, and ready to move on the next steps. > > > > Thanks Trent! > > > > Ed > > > > > > On 8/12/06, Ed wrote: > >> > >> Thanks for the reply Trent. > >> > >> I'm on a different system today but am trying your suggestons. This is > a > >> debian 3.1r2 system and I'm running jdk 1.5.0_04. > >> > >> Take a look below, but I think I have no parallel port support on this > >> kernel, however I never get the "No such device or address" return from > the > >> cat call as you did so I'm not sure how to interpret the results. > >> > >> When I run the test program (PortChooser.java), the getPortIdentifiers > >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this > is > >> more than I found on the RedHat system. Incidently --disable-lockfiles > has > >> no effect. > >> > >> It looks as though there is no parallel support in this kernel: > >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > >> On node 0 totalpages: 161776 > >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > >> > >> I'm a little confused by the results when I cat to the lp0 device. It > >> seems from the dmesg output that I don't have parallel printer support, > but > >> when I cat to the lp0 device, I get permission denied if I'm non-root > user > >> and input/output error if I'm root. Apparently this means I have the > >> device, > >> but no support in the kernel? > >> > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> > >> cat: /dev/lp0: Permission denied > >> ed at falcon:~/src/workspace/EASServer/src$ su > >> Password: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> > >> Here's my lp* device permissions. > >> /dev: > >> wildcard lp* > >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> If I change it to > >> /dev: > >> wildcard lp* > >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> I get: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> falcon:/home/ed/src/workspace/EASServer/src# exit > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> ed at falcon:~/src/workspace/EASServer/src$ > >> > >> What do you think? Should I recompile the kernel or is it something > else? > >> > >> By the way, I added the user ed to the lp and uucp groups on this > system. > >> > >> Thanks again, > >> > >> Ed > >> > >> On 8/11/06, Trent Jarvi wrote: > >> > > >> > On Fri, 11 Aug 2006, Ed wrote: > >> > > >> > > I'm trying to read and write a parallel port on a standard (Dell) > pc > >> > running > >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > >> > gates. > >> > > > >> > > I'm having problems getting rxtx to return a port enumeration from > >> > > getPortIdentifiers. I'm using a file > >> > > PortChooser.java as a test file to get things going. This is from > the > >> > Java > >> > > CookBook 2nd edition (Chapter 12). The call > >> > > > >> > > // get list of ports available on this particular computer, > >> > > // by calling static method in CommPortIdentifier. > >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > >> > > > >> > > returns a null pList; > >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I > configure > >> > and > >> > > compile without --disable-lockfiles I get: > >> > > > >> > > Stable Library > >> > > ========================================= > >> > > Native lib Version = RXTX-2.1-7 > >> > > Java lib Version = RXTX-2.1-7 > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > ... > >> > > > >> > > When I compile with --disable-lockfiles the call to > getPortIdentifiers > >> > > >> > > simply returns a null Enumeration. > >> > > > >> > > I've read the documention and threads about this issue and I feel > like > >> > I've > >> > > tried everything, so at the moment I'm stumped. > >> > > > >> > > I can supply any further info that may help. > >> > > > >> > > Thanks in advance. > >> > > > >> > > Ed > >> > > > >> > > >> > Hi Ed > >> > > >> > You may want to check the permissions of /dev/lp*. Also make sure lp > or > >> > your kernel support for lp is loaded. It should show up in dmesg and > >> > lsmod. > >> > > >> > For my laptop with no printer port enabled in BIOS is see: > >> > > >> > lp: driver loaded but no devices found > >> > > >> > in desg |grep lp > >> > > >> > [] $ ls -l /dev/lp* > >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > here root and group lp can read and write. Normal users cannot. > >> > > >> > Try a simple read as a user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: Permission denied > >> > > >> > Fix as root > >> > > >> > [] chmod 666 /dev/lp* > >> > [] $ ls -l /dev/lp* > >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > Now as user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: No such device or address > >> > > >> > So this is saying there is no lp0 on my laptop. > >> > > >> > -- > >> > Trent Jarvi > >> > tjarvi at qbang.org > >> > > >> > >> > >> > >> -- > >> > >> Ed > >> > > > > > > > > > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/59164078/attachment-0004.html From eddythejekyll at gmail.com Mon Aug 14 14:19:58 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 14:19:58 -0600 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? Message-ID: I'm using the ParallelPort class to drive a relay board. According to Mr. Jarvi, since this board isn't a printer, there will be a read error unless I hold the "printer online" line high in order to make the API think I'm talking to a printer. The problem is, I can't figure out which line is the "printer online". My DB25 spec lists the following: *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Anyone know which one I should tie high? I tried the busy line and it still errored out on the read. Thanks in advance, -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/66cf3c3e/attachment-0004.html From tjarvi at qbang.org Mon Aug 14 18:06:29 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:06:29 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Mon, 14 Aug 2006, Ed wrote: > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > which isn't any of the valid modes. I tried setting it explicitely with > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced > the requested mode in nativeSetSerialPortParams > at gnu.io.LPRPort.setLPRMode(Native Method) > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > invalid state. This is because rxtx only supports the basics. JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } One could program in more support. When I did that I just had a daisy wheel printer to test with and doing any more would have been blind. So that behavior is expected. I'll look to see if the Parallel Complete book mentions which pins you need to raise. If you look in the source code [ParallelImp.c] you can see this code isn't well tested. It has worked for hobby use in the past as I'd guess you are trying to do. But my experience with the code is as is mentioned in the top of the source: /* fear he who enter here. It appears that things have changed. An attempt has been made to put things the way the should be. It compiles and ParallelBlackBox runs. No further guarantees. Well... One.. it will print "Hello World!" on an epson DX 10 printer. you know.. the 10 character per second daisy wheel printer ;) - Trent Jarvi */ That comment is from 1997 or so. Since then some windows support was contributed but it is still very green code. We get about four requests for parallel support a year so its just not a well traveled area. It would be nice to have some documentation for the people trying to hook parallel ports to electronic projects. That appears to be the exclusive use of the Parallel support. The wiki pages are intended to let people share information like this to help each other in their projects as they figure out the details. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Aug 14 18:40:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:40:40 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: > PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): > > if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) > val = System.getProperty("gnu.io.SerialPorts"); > > Shouldn't the comparison be != null? getProperty returns null if the > variable is NOT found, and you only want to assign to val if it IS > found, right? Same thing for the > parallel port case. End result is the same I guess, since you check > for null later, > but probably should be fixed. I think this is just a fallback to the second property. gnu.io.SerialPorts isn't documented but perhaps it is used. It should behave properly as documented in INSTALL. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 14 18:56:55 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 19:56:55 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: <44E11BD7.5030102@gmail.com> Trent Jarvi wrote: >> PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): >> >> if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) >> val = System.getProperty("gnu.io.SerialPorts"); >> > > I think this is just a fallback to the second property. > gnu.io.SerialPorts isn't documented but perhaps it is used. It should > behave properly as documented in INSTALL. Doh - yup, I missed the fact that the property names were different... Pete From berkland at spamcop.net Mon Aug 14 19:58:21 2006 From: berkland at spamcop.net (Doug Berkland) Date: Mon, 14 Aug 2006 21:58:21 -0400 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? In-Reply-To: References: Message-ID: <269e40090608141858g698c2579v8d962deca3f4df53@mail.gmail.com> Based on memory and this page as confirmation, I would say pin 13 is the "Online" pin for SPP (standard parallel port). http://www.quatech.com/support/comm-over-parallel.php On 8/14/06, Ed wrote: > > I'm using the ParallelPort class to drive a relay board. According to Mr. > Jarvi, since this board isn't a printer, there will be a read error unless I > hold the "printer online" line high in order to make the API think I'm > talking to a printer. The problem is, I can't figure out which line is the > "printer online". My DB25 spec lists the following: > > *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and > Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data > Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 > D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select > 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select > In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit > 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 > Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and > Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground > > Anyone know which one I should tie high? I tried the busy line and it > still errored out on the read. > > Thanks in advance, > > -- > Ed > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/842bb770/attachment-0004.html From eddythejekyll at gmail.com Mon Aug 14 20:25:42 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 20:25:42 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Ah, I see. I've seen the caveats about limited Parallel support, but I thought it was mainly about the javax.comm package. The gnu.io is derived from javax.comm package right? That is, is the parallel support in rxtx is a superset of what's in javax.comm? I'm using this not for hobby usage, but for some simple instrumenation and control. If the project mandates it, I'll gladly work on extending the support. In the meantime, I need to get some sanity checks working, and repair my relay board (I smoked the ULN2803 chip, apparently by tying the BUSY (pin 11) to vcc). I guess I'll try the SEL pin next (and a supply of 2803s) with a ~1K pullup. The caveat in the comment block isn't very encouraging (!), but I borrowed an old Epson Stylus Color 600 printer to see what I can do. If I can write out characters to it I'll be happy. Parallel printers aren't easy to find these days. I haven't yet looked at the native source, yet, but I've just imported it into eclipse and I'll surf around a bit. Ed On 8/14/06, Trent Jarvi wrote: > > On Mon, 14 Aug 2006, Ed wrote: > > > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > > which isn't any of the valid modes. I tried setting it explicitely with > > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to > proced > > the requested mode in nativeSetSerialPortParams > > at gnu.io.LPRPort.setLPRMode(Native Method) > > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > > invalid state. > > This is because rxtx only supports the basics. > > JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > jclass jclazz, jint mode) > { > switch(mode) > { > case LPT_MODE_ANY: > break; > case LPT_MODE_SPP: > case LPT_MODE_PS2: > case LPT_MODE_EPP: > case LPT_MODE_ECP: > case LPT_MODE_NIBBLE: > default: > throw_java_exception( env, > UNSUPPORTED_COMM_OPERATION, > "nativeSetSerialPortParams", > "setLPRMode was unable to proced the > requested \ > mode" > ); > } > return(JNI_TRUE); > } > > One could program in more support. When I did that I just had a daisy > wheel printer to test with and doing any more would have been blind. > > So that behavior is expected. I'll look to see if the Parallel Complete > book mentions which pins you need to raise. If you look in the source > code [ParallelImp.c] you can see this code isn't well tested. It has > worked for hobby use in the past as I'd guess you are trying to do. But > my experience with the code is as is mentioned in the top of the source: > > /* > fear he who enter here. It appears that things have changed. An > attempt > has been made to put things the way the should be. > > It compiles and ParallelBlackBox runs. No further guarantees. > > Well... One.. it will print "Hello World!" on an epson DX 10 > printer. > you know.. the 10 character per second daisy wheel printer ;) > > - Trent Jarvi > */ > > That comment is from 1997 or so. > > Since then some windows support was contributed but it is still very green > code. We get about four requests for parallel support a year so its just > not a well traveled area. > > It would be nice to have some documentation for the people trying to hook > parallel ports to electronic projects. That appears to be the exclusive > use of the Parallel support. The wiki pages are intended to let people > share information like this to help each other in their projects as they > figure out the details. > > -- > Trent Jarvi > tjarvi at qbang.org > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/fbb5ddb4/attachment-0004.html From lyon at docjava.com Tue Aug 15 06:06:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 15 Aug 2006 08:06:27 -0400 Subject: [Rxtx] smoking is bad for your health In-Reply-To: References: Message-ID: Hi All, If you are connecting to the parallel port and smoking chips, it is time for extra stuff to buffer the parallel port. You may be want more current, in which case driver transistors are needed, or, if you are using the port as an output only device, you may like to add your own bus transceiver (e.g., 74245), set for output. Do be careful to design this properly; http://www.beyondlogic.org/spp/parallel.htm Some people like to use Octal D-type F.F's with OC outputs, like a 74374, http://upgrade.cntc.ac.kr/data/ttl/74374.html I like this one, as it has the D FF's and can latch the outputs for presentation to slower electronics (like relays). But careful! A relay that needs more current than the family of the device you have selected will look like a short to ground, and you will smoke your bug! And MOBO's do NOT come with the ability to drive any load you like. Check the power specs on your relay and be sure to protect the chip against back EMF with a diode. It is best to smoke test this on a bread board BEFORE hooking it to the computer. And be sure you smoke test the corner points in the ckt for a while, lest it fail in the field. - Doug >Ah, I see. I've seen the caveats about limited >Parallel support, but I thought it was mainly >about the javax.comm package. The >gnu.io is derived from javax.comm >package right? That is, is the parallel support >in rxtx is a superset of what's in javax.comm? > >I'm using this not for hobby usage, but for some >simple instrumenation and control. If the >project mandates it, I'll gladly work on >extending the support. In the meantime, I need >to get some sanity checks working, and repair my >relay board (I smoked the ULN2803 chip, >apparently by tying the BUSY (pin 11) to vcc). I >guess I'll try the SEL pin next (and a supply of >2803s) with a ~1K pullup. > >The caveat in the comment block isn't very >encouraging (!), ?but?I borrowed an old Epson >Stylus Color 600 printer to see what I can do. >?If I can write out characters to it I'll be >happy. Parallel printers aren't easy to find >these days. > > I haven't yet looked at the native source, yet, >but I've just imported it into eclipse and I'll >surf around a bit. > >Ed > >On 8/14/06, Trent Jarvi <tjarvi at qbang.org> wrote: > >On Mon, 14 Aug 2006, Ed wrote: > >> When I try to get the mode with int mode = pPort.getMode(); it returns 0 >> which isn't any of the valid modes. I tried setting it explicitely with >> pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with >> >> gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced >> the requested mode in nativeSetSerialPortParams >> at gnu.io.LPRPort.setLPRMode(Native Method) >> at gnu.io.LPRPort.setMode(LPRPort.java:87) >> >> Except for LPT_MODE_ANY, but the getMode call still failed out with an >> invalid state. > >This is because rxtx only supports the basics. > >JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > ???????jclass jclazz, jint mode) >{ > ???????switch(mode) > ???????{ > ???????????????case LPT_MODE_ANY: > ???????????????????????break; > ???????????????case LPT_MODE_SPP: > ???????????????case LPT_MODE_PS2: > ???????????????case LPT_MODE_EPP: > ???????????????case LPT_MODE_ECP: > ???????????????case LPT_MODE_NIBBLE: > ???????????????default: > ???????????????????????throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, > ???????????????????????????????"nativeSetSerialPortParams", > ???????????????????????????????"setLPRMode was >unable to proced the requested \ > ???????????????????????????????mode" > ???????????????????????); > ???????} > ???????return(JNI_TRUE); >} > >One could program in more support.??When I did that I just had a daisy >wheel printer to test with and doing any more would have been blind. > >So that behavior is expected.??I'll look to see if the Parallel Complete >book mentions which pins you need to raise.??If you look in the source >code [ParallelImp.c] you can see this code isn't well tested.??It has >worked for hobby use in the past as I'd guess you are trying to do.??But >my experience with the code is as is mentioned in the top of the source: > >/* > fear he who enter here.??It appears that things have changed.??An attempt > has been made to put things the way the should be. > > ???????It compiles and ParallelBlackBox runs.??No further guarantees. > > ???????Well... One.. it will print "Hello World!" on an epson DX 10 printer. > ???????you know.. the 10 character per second daisy wheel printer ;) > > ???????- Trent Jarvi >*/ > >That comment is from 1997 or so. > >Since then some windows support was contributed but it is still very green >code.??We get about four requests for parallel support a year so its just >not a well traveled area. > >It would be nice to have some documentation for the people trying to hook >parallel ports to electronic projects.??That appears to be the exclusive >use of the Parallel support.??The wiki pages are intended to let people >share information like this to help each other in their projects as they >figure out the details. > >-- >Trent Jarvi >tjarvi at qbang.org > > > > >-- >Ed > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 15 13:26:16 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 15 Aug 2006 14:26:16 -0500 Subject: [Rxtx] crash with too much memory Message-ID: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded from qbang.org. I'm exercising the RXTX COMM serial interface, both in a small standalone test and with the same code pulled into a large OSGI framework setup. If I use the stock .jar/.dll's, then everything works correctly in both situations. I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 (mingw-special)). If I use my locally built version, then my small test case works just fine, both when run inside Eclipse and when run standalone on the command line. However, when I try and use my locally built .jar/.dll's in the large framework environment, then I get a JVM crash with the attached log. Normally this would lead me to think that I was running out of memory or something in the large environment, and when I try and play with the JVM memory args, some interesting things show up. In our large environment, we have -Xms32M/-Xmx1024M - this appears to be the problem. If I set max to something like 64M, then things work. The cross over point from working to failing seems to be around 32M/110M (works) and 32M/111M (fails). But 128M/128M works while 128M/129M fails. So it seems to have to do with how much memory is actually available, or something like that. The thing that occurs to me is if my GCC is somehow generating something like "near" calls. But when the JVM has a lot of RAM available, it puts the DLL up somehwere in the address space and then the near calls fail - far calls are needed. So, I'm thinking this is probably a difference in the MinGW GCC I'm using and the one that was used to build the stock binaries from qbang, or maybe some command line args were changed? So, I'm hoping someone will have an idea of what's going on here... Thanks, Pete From tjarvi at qbang.org Tue Aug 15 18:54:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 15 Aug 2006 18:54:04 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: On Tue, 15 Aug 2006, Pete Flugstad wrote: > I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded > from qbang.org. > > I'm exercising the RXTX COMM serial interface, both in a small > standalone test and with the same code pulled into a large OSGI > framework setup. > > If I use the stock .jar/.dll's, then everything works correctly in > both situations. > > I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 > (mingw-special)). > > If I use my locally built version, then my small test case works just > fine, both when run inside Eclipse and when run standalone on the > command line. However, when I try and use my locally built > .jar/.dll's in the large framework environment, then I get a JVM crash > with the attached log. > > Normally this would lead me to think that I was running out of memory > or something in the large environment, and when I try and play with > the JVM memory args, some interesting things show up. > > In our large environment, we have -Xms32M/-Xmx1024M - this appears to > be the problem. If I set max to something like 64M, then things work. > The cross over point from working to failing seems to be around > 32M/110M (works) and 32M/111M (fails). > But 128M/128M works while 128M/129M fails. So it seems to have to do > with how much memory is actually available, or something like that. > > The thing that occurs to me is if my GCC is somehow generating > something like "near" calls. But when the JVM has a lot of RAM > available, it puts the DLL up somehwere in the address space and then > the near calls fail - far calls are needed. > > So, I'm thinking this is probably a difference in the MinGW GCC I'm > using and the one that was used to build the stock binaries from > qbang, or maybe some command line args were changed? > > So, I'm hoping someone will have an idea of what's going on here... > Hi Pete The binaries are from the src. They should be reproducable. I did extensive testing of rxtx several years ago using mingw as the compiler. The version was 2.95. I have not changed versions since. There are way too many variables as it is. I have a linux->mingw cross compiler rpm I use for all windows use. If you want a copy of it you can have it. It isn't anything 'special' :) -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Thu Aug 17 11:49:24 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 17 Aug 2006 12:49:24 -0500 Subject: [Rxtx] crash with too much memory In-Reply-To: References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> On 8/15/06, Trent Jarvi wrote: > I did extensive testing of rxtx several years ago using mingw as the > compiler. The version was 2.95. I have not changed versions since. > There are way too many variables as it is. FYI, I believe I've solved this problem by changing how the dll's were built. The original mingw makefile was generating Serial.def, then performing various operations with dlltool and ld. I modified the makefile to create the dll using this page: as a guide. With that, there's no longer any need to deal with Serial.def and the makefile becomes _much_ simpler. This appears to have addressed my problems with crashing. FWIW, GCC 2.95 is _really_ old - you should consider investigating upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is supposed to generate a native binary (i.e. just like MinGW). Thanks, Pete From claretlc at yahoo.com Thu Aug 17 12:34:48 2006 From: claretlc at yahoo.com (Clare Cooley) Date: Thu, 17 Aug 2006 11:34:48 -0700 (PDT) Subject: [Rxtx] parallel port communication Message-ID: <20060817183448.76911.qmail@web53908.mail.yahoo.com> Hi, I'm trying to write a 1 to a bit 15 on a parallel port cable that isn't attached to a printer.(It's a control box for eye-tracking equipment.)I need to do this in Java. I looked at the javax.comm documentation, and it said, "Application programs should not directly create ParallelPortEvent objects." So is there a way to do this with your package? If not, do you have any suggestions of where to look? It really needs to be done in Java. Thanks, Clare Cooley __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From pat at xvalheru.org Thu Aug 17 13:13:52 2006 From: pat at xvalheru.org (pat) Date: Thu, 17 Aug 2006 21:13:52 +0200 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060817190751.M5586@xvalheru.org> Hi there, I've question(s) for you. I need to communicate with scale, I've used the Sun's direver. Now I've switched to Rxtx and the speed of the communication is perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, but the difference between the crash time is 5 second ... . My question is: Is there a stable driver ??? Or what I have to do to have stable enough serial port driver ??? OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. Thanks to all for the help. Pat From tjarvi at qbang.org Fri Aug 18 05:13:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 05:13:42 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> Message-ID: On Thu, 17 Aug 2006, Pete Flugstad wrote: > On 8/15/06, Trent Jarvi wrote: >> I did extensive testing of rxtx several years ago using mingw as the >> compiler. The version was 2.95. I have not changed versions since. >> There are way too many variables as it is. > > FWIW, GCC 2.95 is _really_ old - you should consider investigating > upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is > supposed to generate a native binary (i.e. just like MinGW). > It is really old but also well known like C itself. I have considered upgrading. The ToyBox builds should be gcc 3* cross-compiled. I'm not going to be validating gcc 3* w32 binaries though. It's looking like we will need to focus support on MSFT's toolchain for 64 bit windows support until it is possible for gcc to support w64. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Aug 18 05:32:10 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 07:32:10 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: Hi All, Does anyone know how to produce mac intel binaries on a Fedora Linux box? Thanks! - Doug From tjarvi at qbang.org Fri Aug 18 06:42:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 06:42:05 -0600 (MDT) Subject: [Rxtx] cross compilation for the mac In-Reply-To: References: Message-ID: On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Does anyone know how to produce > mac intel binaries on a Fedora Linux > box? > > Thanks! > - Doug Hi Doug You need to build the cross toolchain which means copying the Darwin/Mac binaries over to fedora. It would be nontrivial but possible. Do the Darwin libraries work with Mac in general? I'm not aware of the licensing issues associated with grabbing Mac binaries. Same with OpenSolaris/Solaris. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Aug 18 08:15:26 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 10:15:26 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> In theory building against Darwin would be sufficient to getting things working on MacOS X. You need to remember that Darwin is the low-level OS, while MacOS X adds the everything else on top. IOKit, which is the I/O API, is available as part of Darwin. The only thing you will need extra are the Java libraries. One thing is that I would recommend that when producing binaries for the Mac, is to ensure they are Universal binaries (PPC+Intel). Andre > > From: Trent Jarvi > Date: 2006/08/18 Fri AM 08:42:05 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] cross compilation for the mac > > On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > > > Hi All, > > Does anyone know how to produce > > mac intel binaries on a Fedora Linux > > box? > > > > Thanks! > > - Doug > > Hi Doug > > You need to build the cross toolchain which means copying the Darwin/Mac > binaries over to fedora. It would be nontrivial but possible. > > Do the Darwin libraries work with Mac in general? I'm not aware of the > licensing issues associated with grabbing Mac binaries. > > Same with OpenSolaris/Solaris. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Aug 18 13:43:16 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 15:43:16 -0400 Subject: [Rxtx] cross compilation for the mac In-Reply-To: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: >In theory building against Darwin would be sufficient to getting >things working on MacOS X. You need to remember that Darwin is the >low-level OS, while MacOS X adds the everything else on top. IOKit, >which is the I/O API, is available as part of Darwin. The only thing >you will need extra are the Java libraries. > >One thing is that I would recommend that when producing binaries for >the Mac, is to ensure they are Universal binaries (PPC+Intel). > >Andre I find the xcode ide for generating a mix of universal binaries and java very difficult to make work. Is there a way to do this with make files? Thanks! - Doug From ajmas at sympatico.ca Fri Aug 18 13:54:55 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 15:54:55 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818195455.PGAP29052.tomts13-srv.bellnexxia.net@smtp1.sympatico.ca> It should be doable. XCode hands off the compilation process to gcc et al, for the compilation of C/C++ code and to javac et al. for the Java side. While ant is the favoured tool for 'automated' Java compilation, make can easily be used. All is needed is someone to volounteer to do the work. Andre "Dr. Douglas Lyon" wrote > > >In theory building against Darwin would be sufficient to getting > >things working on MacOS X. You need to remember that Darwin is the > >low-level OS, while MacOS X adds the everything else on top. IOKit, > >which is the I/O API, is available as part of Darwin. The only thing > >you will need extra are the Java libraries. > > > >One thing is that I would recommend that when producing binaries for > >the Mac, is to ensure they are Universal binaries (PPC+Intel). > > > >Andre > > I find the xcode ide for generating a mix of universal binaries > and java very difficult to make work. Is there a way to do this > with make files? > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Fri Aug 18 16:34:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 16:34:46 -0600 (MDT) Subject: [Rxtx] serial driver newbe question and problem In-Reply-To: <20060817190751.M5586@xvalheru.org> References: <20060817190751.M5586@xvalheru.org> Message-ID: On Thu, 17 Aug 2006, pat wrote: > Hi there, > > I've question(s) for you. I need to communicate with scale, I've used the > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > but the difference between the crash time is 5 second ... . > > My question is: Is there a stable driver ??? Or what I have to do to have > stable enough serial port driver ??? > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > Thanks to all for the help. > > Pat > Could you describe the hardware you have, the version of rxtx and provide the log of the crash? Did you download binaries? I've not been seeing a jvm crash with rxtx -- Trent Jarvi tjarvi at qbang.org From lunareclipse03 at web.de Sat Aug 19 12:11:48 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 19 Aug 2006 20:11:48 +0200 Subject: [Rxtx] Problem solved! Message-ID: <920065539@web.de> Hi everybody, I posted some months ago and asked about some help on my very special problem concerning my win32 port of a communications library. Now I just want to inform you that no further "mindstorming" is needed because I solved the problem by completely rewriting the win32 port of the library. Now everything works fine. Thank you all for your time and patience. --Sven Ahlemann __________________________________________________________________________ Erweitern Sie FreeMail zu einem noch leistungsst?rkeren E-Mail-Postfach! Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131 From ajmas at sympatico.ca Mon Aug 21 09:58:23 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 21 Aug 2006 11:58:23 -0400 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060821155823.TLSM18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Next time that happens, including a copy of the crash log, produced by Windows could probably help too. Andre Trent Jarvi wrote: > > On Thu, 17 Aug 2006, pat wrote: > > > Hi there, > > > > I've question(s) for you. I need to communicate with scale, I've used the > > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > > but the difference between the crash time is 5 second ... . > > > > My question is: Is there a stable driver ??? Or what I have to do to have > > stable enough serial port driver ??? > > > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > > > Thanks to all for the help. > > > > Pat > > > > Could you describe the hardware you have, the version of rxtx and > provide the log of the crash? Did you download binaries? > > I've not been seeing a jvm crash with rxtx > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From adrian.l.parker at gmail.com Thu Aug 24 09:10:39 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Thu, 24 Aug 2006 11:10:39 -0400 Subject: [Rxtx] Portability issues Message-ID: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use RXTX 2.0? Does it provide system librairies that javax.comm does not? I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, or 2000, or server 2003). Can this be done with a single implementation of RXTX? I don't want to have different versions of Java code that have different package names. References: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Message-ID: On Thu, 24 Aug 2006, Adrian Parker wrote: > Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use > RXTX 2.0? Does it provide system librairies that javax.comm does not? > > I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's > OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, > or 2000, or server 2003). Can this be done with a single implementation of > RXTX? I don't want to have different versions of Java code that have > different package names. > Hi Adrian. The native code can support all of the platforms you mention. I've never compiled for unixware or openunix but the patches are in the code. So you would need to compile for that target. >From there you would probably be best off going with rxtx 2.1 so you have all the classes in one package. You can opt to use rxtx 2.0 with Sun's commapi for Solaris v 2. The main differences are rxtx 2.1 comes with all the source/classes and is in package gnu.io while Sun's requires rxtx for some platforms but is in package javax.comm. The low level code is the same in either case as far as rxtx is concerned. -- Trent Jarvi tarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 04:12:52 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 06:12:52 -0400 Subject: [Rxtx] Serial.addEventListener bug? Message-ID: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on OpenServer 5.0.7). Its what Sun packages. I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an exception. It seems to throw the exception if no listener was previously declared (although I've not had chance to verify). Is this desireable behaviour? Sun's original API doesn't mention anything about an exception on this function, http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) Of course this is an old version of RXTX, so perhaps this has been changed. -- Adrian Parker Simulation Software Developer DLCSPM 4-4-3 (c) Building A31, CFB Kingston Tel: (613) 541-5010 x3020 CSN: 271-3020 Email: parker at lsec.dnd.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/22e2ea57/attachment-0004.html From tjarvi at qbang.org Fri Aug 25 05:15:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 25 Aug 2006 05:15:44 -0600 (MDT) Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: On Fri, 25 Aug 2006, Adrian Parker wrote: > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > OpenServer 5.0.7). Its what Sun packages. > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > exception. It seems to throw the exception if no listener was previously > declared (although I've not had chance to verify). > > Is this desireable behaviour? Sun's original API doesn't mention anything > about an exception on this function, > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > Of course this is an old version of RXTX, so perhaps this has been changed. > > > What exception was thrown? You can replace 1.4-8 with 2.0 for testing purposes. They are the same package. I doubt Sun shipped or packaged that. I think Caldera/SCOx/... did at one point. There may still be updates on their pages. I recall them sending patches here which are in current rxtx. -- Trent Jarvi tjarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 05:28:32 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 07:28:32 -0400 Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: <7da71e910608250428q32b86632g9a67b1b4efe69830@mail.gmail.com> On 8/25/06, Trent Jarvi wrote: > > On Fri, 25 Aug 2006, Adrian Parker wrote: > > > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > > OpenServer 5.0.7). Its what Sun packages. > > > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > > exception. It seems to throw the exception if no listener was > previously > > declared (although I've not had chance to verify). > > > > Is this desireable behaviour? Sun's original API doesn't mention > anything > > about an exception on this function, > > > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > > > Of course this is an old version of RXTX, so perhaps this has been > changed. > > > > > > > > What exception was thrown? Its weird. I catch an Exception. But when on that exception I call getClass().getName() I end up with a NullPointerException. You can replace 1.4-8 with 2.0 for testing > purposes. They are the same package. > > I doubt Sun shipped or packaged that. Doh! I meant to say SCO sorry. I was surfing Sun's site when I wrote that :) Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/e43aed3a/attachment-0004.html From sjudd at seas.upenn.edu Sat Aug 26 16:42:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Sat, 26 Aug 2006 18:42:09 -0400 Subject: [Rxtx] Mac commapi Message-ID: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? If so, where do I get it? Sun has various versions at http://www.sun.com/download/products.xml?id=43208d3d but they are for SolarisSparc, SolarisX86, Linux, and Generic. Do I use the Generic one? If so, read on; otherwise redirect me. While using the Generic version, my attempt to run the BlackBox sample program elicits a message saying it "can't find javax.comm.properties". I found a note in the rxtx.org HowTo (for Linux) saying to create this thing in /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties but where should it go on the Mac? After reading many versions of documentation around, and updates and revisions and re-authorings, I have worked my way into a state of confusion and high uncertainty. Please release me. sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060826/02d6b163/attachment-0004.html From tod at todbot.com Sat Aug 26 17:08:33 2006 From: tod at todbot.com (Tod E. Kurt) Date: Sat, 26 Aug 2006 16:08:33 -0700 Subject: [Rxtx] Mac commapi In-Reply-To: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Message-ID: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> You don't need Sun's CommAPI. You just need RXTX. Once you download RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and the native library is ("librxtxSerial.jnilib" on Mac OS X) via the standard methods. For instance, if you've placed those two files in a directory called 'rxtxlib' and you want to run a Java class called HelloWorld in the current directory, do the following: % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar HelloWorld On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? > If so, where do I get it? Sun has various versions at > http://www.sun.com/download/products.xml?id=43208d3d > but they are for SolarisSparc, SolarisX86, Linux, and Generic. > Do I use the Generic one? > If so, read on; otherwise redirect me. > > While using the Generic version, my attempt to run the BlackBox > sample program > elicits a message saying it "can't find javax.comm.properties". > I found a note in the rxtx.org HowTo (for Linux) saying to create > this thing in > /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties > but where should it go on the Mac? > > After reading many versions of documentation around, and updates > and revisions > and re-authorings, I have worked my way into a state of confusion > and high > uncertainty. Please release me. > > sj > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From sjudd at seas.upenn.edu Sun Aug 27 22:55:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Mon, 28 Aug 2006 00:55:09 -0400 Subject: [Rxtx] Mac commapi In-Reply-To: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> Message-ID: This was immensely helpful. Thank you, Tod. I wish it had been explicit somewhere in the documentation; it would have saved me 2 days of grief. One hugely valuable thing like this little set of instructions is that it implicitly lists all the hundreds of things you DON"T have to do. I know it seems obvious to those in the know, but every little bit of help on an arcane topic like this opens up the product to an exponentially wider group of dilettantes. I managed to get the SerialDemo program (from Sun) to work too. Hurrah! However, it required changing all the javax.comm references to gnu.io which I had heard of due to all my rambling readings. Is there not a demo program on rxtx.org already available that would not have needed this? BTW, the link on the Projects page for jPIC[Source] sends a *.hex file to a PIC 16F877 or similar chip... takes me to nowhere useful. I do not understand what the name "Toybox" is meant to imply. Thanks, sj On 2006 Aug 26, at 7:08 PM, Tod E. Kurt wrote: > You don't need Sun's CommAPI. You just need RXTX. Once you download > RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and > the native library is ("librxtxSerial.jnilib" on Mac OS X) via the > standard methods. > > For instance, if you've placed those two files in a directory called > 'rxtxlib' and you want to run a Java class called HelloWorld in the > current directory, do the following: > > % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar > HelloWorld > > > On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > >> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? >> If so, where do I get it? Sun has various versions at >> http://www.sun.com/download/products.xml?id=43208d3d >> but they are for SolarisSparc, SolarisX86, Linux, and Generic. >> Do I use the Generic one? >> If so, read on; otherwise redirect me. >> >> While using the Generic version, my attempt to run the BlackBox >> sample program >> elicits a message saying it "can't find javax.comm.properties". >> I found a note in the rxtx.org HowTo (for Linux) saying to create >> this thing in >> /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties >> but where should it go on the Mac? >> >> After reading many versions of documentation around, and updates >> and revisions and re-authorings, I have worked my way into a state >> of confusion and high uncertainty. Please release me. >> >> sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060827/b80d6389/attachment-0004.html From pete.flugstad at gmail.com Mon Aug 28 12:38:27 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 13:38:27 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE Message-ID: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Okay, my understanding is that originally, RTS meant "Request to Send" - the DTE (the PC) would assert this and the DCE (modem) would assert "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send data. This really only provided uni-directional flow control, from the PC to the modem. Now, as I understand it, the more modern usage of RTS is that it is used for the DTE to assert flow control back to the DCE - basically it means "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) raises this, then the DCE(modem) is free to send data to the DTE - this allows the DTE(PC) to exert flow control back towards the DCE(modem). This discussion is based on the Serial HOWTO from: and lots of other reading... Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which is defined as: > Enables RTS flow-control handshaking. The driver raises the RTS line, > enabling the DCE to send, when the input buffer has enough room to > receive data. The driver lowers the RTS line, preventing the DCE to > send, when the input buffer does not have enough room to receive > data. If this value is used, it is an error for the application to adjust > the line with EscapeCommFunction. which clearly reflects the newer usage style - it keeps the RTS line high as long as there is space to _receive_ data. And takes it low when the receive/input buffer is getting full to stop the modem from sending it data. Does this jive with other peoples understanding of RTS usage? Unfortunately, the hardware I'm trying to talk to wants to use the OLD style of RTS line usage. An existing Windows C++ program uses RTS_CONTROL_TOGGLE, which documentation states: > Specifies that the RTS line will be high if bytes are available for transmission. > After all buffered bytes have been sent, the RTS line will be low. If this value is > set, it would be an error for an application to adjust the line with > EscapeCommFunction. This value is ignored in Windows 95; it causes the > driver to act as if RTS_CONTROL_ENABLE were specified. This seems to be the OLD RTS behavior, right? So, what I seem to need is to be able to control the RTS line, either using TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS when getting ready to TX and clear it when the output buffer is empty). Does this make sense, or am I off in the weeds? Thanks, Pete From tjarvi at qbang.org Mon Aug 28 18:21:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 28 Aug 2006 18:21:10 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: On Mon, 28 Aug 2006, Pete Flugstad wrote: > Okay, my understanding is that originally, RTS meant "Request to Send" > - the DTE (the PC) would assert this and the DCE (modem) would assert > "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send > data. This really only provided uni-directional flow control, from the PC to > the modem. > > Now, as I understand it, the more modern usage of RTS is that it is used > for the DTE to assert flow control back to the DCE - basically it means > "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) > raises this, then the DCE(modem) is free to send data to the DTE - this > allows the DTE(PC) to exert flow control back towards the DCE(modem). > > This discussion is based on the Serial HOWTO from: > > > > and lots of other reading... > > Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > is defined as: > >> Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > > which clearly reflects the newer usage style - it keeps the RTS line high > as long as there is space to _receive_ data. And takes it low when the > receive/input buffer is getting full to stop the modem from sending it data. > > Does this jive with other peoples understanding of RTS usage? > > Unfortunately, the hardware I'm trying to talk to wants to use the OLD > style of RTS line usage. An existing Windows C++ program uses > RTS_CONTROL_TOGGLE, which documentation states: > >> Specifies that the RTS line will be high if bytes are available for transmission. >> After all buffered bytes have been sent, the RTS line will be low. If this value is >> set, it would be an error for an application to adjust the line with >> EscapeCommFunction. This value is ignored in Windows 95; it causes the >> driver to act as if RTS_CONTROL_ENABLE were specified. > > This seems to be the OLD RTS behavior, right? > > So, what I seem to need is to be able to control the RTS line, either using > TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS > when getting ready to TX and clear it when the output buffer is empty). > > Does this make sense, or am I off in the weeds? > Hi Pete OK. That sounds right. I do not know how you would communicate the difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through CommAPI as it stands. I take it you did not find anything either? Perhaps the best thing to do for your code is to toggle the RTS yourself. This could be a feature in the future JSR API perhaps. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 28 20:54:34 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 21:54:34 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <44F3AC6A.10908@gmail.com> Trent Jarvi wrote: > OK. That sounds right. I do not know how you would communicate the > difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through > CommAPI as it stands. I take it you did not find anything either? > > Perhaps the best thing to do for your code is to toggle the > RTS yourself. This could be a feature in the future JSR API perhaps. Yeah, this is what I ended up doing. I had to modify the dll in order to be able to set hardware flow control (which I do want), but leave the RTS flow control at RS_CONTROL_ENABLE. After that I just toggle setRTS(true) when I'm ready to send and setRTS(false) when I get a OUTPUT_BUFFER_EMPTY notification. Haven't tested with real hardware yet, but it seems to work OK. Thanks for the feedback! Pete From Bob_Jacobsen at lbl.gov Tue Aug 29 08:49:02 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 29 Aug 2006 07:49:02 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >is defined as: > > > Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > >which clearly reflects the newer usage style - it keeps the RTS line high >as long as there is space to _receive_ data. And takes it low when the >receive/input buffer is getting full to stop the modem from sending it data. > >Does this jive with other peoples understanding of RTS usage? Can you point to any devices that actually implement this "new" understanding? I think the person who wrote that documentation paragraph is just confused. The original "RTS/CTS" handshaking was extended to input (from DCE to DTE) handshaking via the DTR (Data Terminal Ready) line. I think the person who wrote the double-quoted paragraph above was just confused between the directions, and mixed them up. If you change "RTS" to "DTR" in that paragraph, you get: > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > enabling the DCE to send, when the input buffer has enough room to > > receive data. The driver lowers the DTR line, preventing the DCE to > > send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. which describes how dozens of devices actually work for controlling flow into the DTE (computer). This then leaves RTS/CTS (with RTS usually just stuck high) for controlling flow into the DCE (peripheral). Again, lots of hardware devices actually do this. I don't work on Windows, so can't be sure of what happens. But on the MacOS X version of RXTX, CTS low stops transmission, exactly as the "old" style would expect. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From mschned at basis.com Tue Aug 29 12:57:45 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 12:57:45 -0600 Subject: [Rxtx] Porting to AIX Message-ID: <01f201c6cb9d$034d4f20$341416ac@basis.com> Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar From mschned at basis.com Tue Aug 29 13:58:05 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 13:58:05 -0600 Subject: [Rxtx] Porting to AIX References: <01f201c6cb9d$034d4f20$341416ac@basis.com> Message-ID: <024901c6cba5$714c3560$341416ac@basis.com> After looking through the build messages closer, there is an error building SerialImp.c: gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type Looks like B57600 is not defined and there are no definitions for DEVICEDIR and LOCKDIR on AIX. Can I just a the following to SerialImp.h? #if defined(__aix__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __aix__ */ Mark Schnedar ----- Original Message ----- From: "Mark E. Schnedar" To: Sent: Tuesday, August 29, 2006 12:57 PM Subject: [Rxtx] Porting to AIX Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 29 15:25:35 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 29 Aug 2006 16:25:35 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <84d4a6d50608291425i1fb819d3i615cf9b85b1e9617@mail.gmail.com> On 8/29/06, Bob Jacobsen wrote: > Can you point to any devices that actually implement this "new" understanding? > > I think the person who wrote that documentation paragraph is just confused. The paragraph is from the Windows documentation of its DCB structure which is used to configure the Serial Device. This is what RXTX uses internally. My version is from MSDN, and Google finds the same text here: (search for fRtsControl). I have not seen any mention anywhere of it being incorrect (and yes, I did look, because I thought the same thing). My discussion is based on trying to use RXTX to talk to a device that used the old style of one-way flow control (RTS is raised to SEND data from the PC to the device). An existing VC++ app use the old-style RTS_CONTROL_TOGGLE. RXTX did not - it used the newer style RTS_CONTROL_HANDSHAKE, so things didn't work - the device was seeing RTS HIGH all the time, so it was thinking that the PC was ready to TX all the time. When I switch RXTX to using RTS_CONTROL_ENABLED and manually control RTS, then things work correctly. The behavior is consistent with this understanding if I hook two serial ports on Windows XP in lookback (via null modem). I'd be very surprised if this had not been corrected by M$ by this time. The same structure has been around since WinNT (mid 1990's) - their documentation is typically pretty good. > > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > > enabling the DCE to send, when the input buffer has enough room to > > > receive data. The driver lowers the DTR line, preventing the DCE to > > > send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. There is a seperate field, fDtrControl, which you can set to DTR_CONTROL_HANDSHAKE, that appears to do exactly this. > This then leaves RTS/CTS (with RTS usually just stuck high) for > controlling flow into the DCE (peripheral). Again, lots of hardware > devices actually do this. > > I don't work on Windows, so can't be sure of what happens. But on > the MacOS X version of RXTX, CTS low stops transmission, exactly as > the "old" style would expect. Well, the Linux Serial HOWTO is where I got most of my information. And yes, I thought it was wrong as well, but it's apparently how things are implemented: Donno - but it works for me... Pete From tjarvi at qbang.org Tue Aug 29 19:11:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 29 Aug 2006 19:11:40 -0600 (MDT) Subject: [Rxtx] Porting to AIX In-Reply-To: <024901c6cba5$714c3560$341416ac@basis.com> References: <01f201c6cb9d$034d4f20$341416ac@basis.com> <024901c6cba5$714c3560$341416ac@basis.com> Message-ID: Hi Mark That should do it. You can put ifdef around the B57600 as we did with higher baudrates. You may want to use tip, minicom, kermit or some other serial application on the AIX to confirm that the lockfiles created are correct. Neat stuff. On Tue, 29 Aug 2006, Mark E. Schnedar wrote: > After looking through the build messages closer, > there is an error building SerialImp.c: > > gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o > /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type > > Looks like B57600 is not defined and there are no > definitions for DEVICEDIR and LOCKDIR on AIX. > > Can I just a the following to SerialImp.h? > > #if defined(__aix__) > # define DEVICEDIR "/dev/" > # define LOCKDIR "/var/lock" > # define LOCKFILEPREFIX "LCK.." > # define FHS > #endif /* __aix__ */ > > Mark Schnedar > > > ----- Original Message ----- > From: "Mark E. Schnedar" > To: > Sent: Tuesday, August 29, 2006 12:57 PM > Subject: [Rxtx] Porting to AIX > > > Hi, > > I'm new to rxtx. Currently my company has an interpreter product > that uses rxtx on Windows and Linux. I am trying to get rxtx to > build on AIX. I downloaded rxtx, ran ./configure and make. When > I run make I get the following error: > > libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object > make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 > > Do you have any suggestions on how to fix this problem? > > I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error > on both systems). I did have our system administrator load > automake, autoconf, make (gnu), and gcc. Here are the versions: > > AIX 4.3.3 AIX 5.3.0 > rxtx: 2.1-7r2 2.1-7r2 > autoconf: 2.53 2.59 > automake: 1.5 1.8.5 > make: 3.79.1 3.80 > gcc: (used native cc) 4.0.0 > > Any help would be appreciated. > > Mark Schnedar > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From guille at sms.nl Wed Aug 30 01:14:32 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 09:14:32 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <7.0.1.0.0.20060830091204.03652de0@sms.nl> At 16:49 29/08/2006, Bob Jacobsen wrote: >At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > > > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >is defined as: > > > > > Enables RTS flow-control handshaking. The driver raises the RTS line, > >> enabling the DCE to send, when the input buffer has enough room to > >> receive data. The driver lowers the RTS line, preventing the DCE to > >> send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. > > > >which clearly reflects the newer usage style - it keeps the RTS line high > >as long as there is space to _receive_ data. And takes it low when the > >receive/input buffer is getting full to stop the modem from sending it data. > > > >Does this jive with other peoples understanding of RTS usage? > >Can you point to any devices that actually implement this "new" understanding? Many (most) of the embedded devices we work with implement this kind of flow control. The host (DTE) raises RTS when it can receive data, and lowers it when the input buffers are full. In turn it watches the CTS line to see whether it can send data to the DCE. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From tjarvi at qbang.org Wed Aug 30 01:23:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 30 Aug 2006 01:23:46 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830091204.03652de0@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 16:49 29/08/2006, Bob Jacobsen wrote: >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: >>> >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >>> is defined as: >>> >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, >>>> enabling the DCE to send, when the input buffer has enough room to >>>> receive data. The driver lowers the RTS line, preventing the DCE to >>>> send, when the input buffer does not have enough room to receive >>>> data. If this value is used, it is an error for the application to adjust >>>> the line with EscapeCommFunction. >>> >>> which clearly reflects the newer usage style - it keeps the RTS line high >>> as long as there is space to _receive_ data. And takes it low when the >>> receive/input buffer is getting full to stop the modem from sending it data. >>> >>> Does this jive with other peoples understanding of RTS usage? >> >> Can you point to any devices that actually implement this "new" understanding? > > Many (most) of the embedded devices we work with implement this kind of flow > control. The host (DTE) raises RTS when it can receive data, and lowers it > when the input buffers are full. In turn it watches the CTS line to see > whether it can send data to the DCE. > I think this explains some hardware control 'bugs' I've seen. -- Trent Jarvi tjarvi at qbang.org From guille at sms.nl Wed Aug 30 02:01:35 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 10:01:35 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> At 09:23 30/08/2006, Trent Jarvi wrote: >On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > > > At 16:49 29/08/2006, Bob Jacobsen wrote: > >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >>> > >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >>> is defined as: > >>> > >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, > >>>> enabling the DCE to send, when the input buffer has enough room to > >>>> receive data. The driver lowers the RTS line, preventing the DCE to > >>>> send, when the input buffer does not have enough room to receive > >>>> data. If this value is used, it is an error for the > application to adjust > >>>> the line with EscapeCommFunction. > >>> > >>> which clearly reflects the newer usage style - it keeps the RTS line high > >>> as long as there is space to _receive_ data. And takes it low when the > >>> receive/input buffer is getting full to stop the modem from > sending it data. > >>> > >>> Does this jive with other peoples understanding of RTS usage? > >> > >> Can you point to any devices that actually implement this "new" > understanding? > > > > Many (most) of the embedded devices we work with implement this > kind of flow > > control. The host (DTE) raises RTS when it can receive data, and lowers it > > when the input buffers are full. In turn it watches the CTS line to see > > whether it can send data to the DCE. > > > >I think this explains some hardware control 'bugs' I've seen. I think the above is the most widespread use, but that may just mean it is the most widespread use in our specific segment (embedded systems). Some UART chips (e.g. from Exar) implement this kind of flow control directly in hardware. For example the Exar can be configured to suspend transmission when it sees CTS low, and resume transmission when it sees CTS high. This is also consistent with our experience. Maybe this helps clarify: http://www.tldp.org/HOWTO/Text-Terminal-HOWTO-10.html#ss10.7 Note the "Old RTS/CTS handshaking is different" section, which refers to "older terminals" whereas newer equipment would use RTS/CTS flow control (or equivalently DTR/DTS) as described above. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From Bob_Jacobsen at lbl.gov Wed Aug 30 07:55:31 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 30 Aug 2006 06:55:31 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> <7.0.1.0.0.20060830095557.0374ff28@sms.nl> Message-ID: I think we all agree that CTS inactive means "Send no more from DTE to DCE". The question is how to express the other direction, "Send no more from DCE to DTE". There are two parts to this question: What do various DTE-like devices do, and what do various DCE-like devices expect? Electrically, the lines that go that direction are DTR, DCD, and RTS (plus some special-purpose lines that are rarely present). All three devices I work most with respect the DTR lead. On the other hand, the FTDI chips for doing serial over USB provide either (RTS and CTS) or (DTR and DSR) as the two leads. What we're probably seeing is two different approaches, that have propagated separately. That's a problem. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From Pawan.Kharbanda at dot.state.co.us Wed Aug 30 09:07:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 30 Aug 2006 09:07:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0455E5E5@hqexchange3.dot.state.co.us> Trent, Sorry for not responding earlier to your email. I was actually waiting for the release of our software on the new Hardware. As I mentioned in my previous emails, RXTX crashes and locks up serial ports with the older version of Redhat (Linux 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:28:55 EDT 2005 i686 i686 i386 GNU/Linux), it might work ok if you are using one or 2 ports but anything more than that it has issues. I was using JDK1.5.0_06 and older firmwares of Digi boxes. Let me know if you need any more specific information of the older system. Thanks Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Thursday, August 10, 2006 5:40 AM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even > after 10000 operations (now I am trying 100,000 :). This is all with > the original RXTX 2.1.7 (final) api's without any of my fixes that I > have been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying > the RXTX saying the suggested kernel for Redhat Linux is > 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Aug 1 01:11:30 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 1 Aug 2006 09:11:30 +0200 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <34B6BC40-1405-4A13-8054-0FC6CE10466A@buechse.de> This is a problem with lock files. You should find it somewhere in the documentation... On 01.08.2006, at 03:53, Richard P. Welty wrote: > trying to get my app running on a Mac OS X powerbook, when > the following is executed as the first thing inside the > run method of a Thread: > > > try { > port = (SerialPort) selectedPort.open( > this.getClass().getName(), 2000); > } catch ( PortInUseException ex){ > ex.printStackTrace(); > return; > } > > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java: > 354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run > (ScaleWatcher.java:143) > > i've not seen any documentation suggesting that rxtx would be finicky > about application names... > > thanks for any suggestions, > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From rwelty at suespammers.org Tue Aug 1 05:37:53 2006 From: rwelty at suespammers.org (Richard P. Welty) Date: Tue, 01 Aug 2006 07:37:53 -0400 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <44CF3D11.9060108@suespammers.org> Richard P. Welty wrote: > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) Aha, a confusing error message. it's really a lock file problem; the code is trying to fill in the application name but when it's getting "Unknown Application" and filling that in... richard From ajmas at sympatico.ca Tue Aug 1 13:10:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:10:59 -0400 Subject: [Rxtx] Application Name? Message-ID: <20060801191059.HFCD18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> You need the source code in CVS. The forth coming 2.18 will correct this, but currently the only place to find the correction is in CVS. No idea when 2.18 is due. > > From: "Richard P. Welty" > Date: 2006/08/01 Tue AM 07:37:53 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Application Name? > > Richard P. Welty wrote: > > > i get the following: > > > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > at > > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) > > Aha, a confusing error message. it's really a lock file problem; the > code is trying to fill in the application name but when it's getting > "Unknown Application" and filling that in... > > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:15:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:15:57 -0400 Subject: [Rxtx] Do interfaces break backwards compatibility? Message-ID: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> It is the class that decides to add serializable that needs to worry about those issues. For the most part serial ports and their connection states should be considered as transient, since there is no guarantee they will still be present or that their state will be, especially in a USB world. What you can store is the port settings and port id and then simply test for port availability next time. Nothing else should be assumed. > > From: Gregg Wonderly > Date: 2006/07/31 Mon PM 01:21:19 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Do interfaces break backwards compatibility? > > Doug Berkland wrote: > > As far as I can tell, nothing in either RXTX or Sun's JavaCOMM > > implements Serializable. Therefore, there are no worries from that > > either. (I can't think of a reason anything in JavaCOMM should > > implement Serializable either.) > > Any interface in javax.comm can become implemented by a serializable object. > Thus, if someone wants to provide remote access to a serial port, then they > might (and I think this is not wise) choose to subclass and add Serializable to > the interface list. > > It's that kind of Serialization compatibility that I'm talking about. > > Gregg Wonderly > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:18:11 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:18:11 -0400 Subject: [Rxtx] precompiled for Intel Mac? Message-ID: <20060801191811.FLJY27612.tomts16-srv.bellnexxia.net@smtp1.sympatico.ca> > > From: Joachim Buechse > There will be. However not before we have figured out some remaining issues. What issues are remaining? Andre From Pawan.Kharbanda at dot.state.co.us Tue Aug 1 16:55:08 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 1 Aug 2006 16:55:08 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Hi, I am also experiencing occasional JVM crash thru the native code. I am attaching the log from the crash. Any ideas what might be causing it???? Regards Pawan Kharbanda # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # --------------- T H R E A D --------------- Current thread (0x8d000480): JavaThread "Thread-119" [_thread_in_native, id=111 51] siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba Registers: EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 Top of Stack: (sp=0x8d3482b8) 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 0x8d348308: 00000000 00000002 00000000 00000000 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 Instructions: (pc=0xb75e39b2) 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~StubRoutines::call_stub V [libjvm.so+0x2607ec] V [libjvm.so+0x423828] V [libjvm.so+0x260045] V [libjvm.so+0x2600de] V [libjvm.so+0x2d7745] V [libjvm.so+0x4c2ba3] V [libjvm.so+0x424338] C [libpthread.so.0+0x4dd8] 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 ) =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, id=11026] 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, id=11023] From tjarvi at qbang.org Tue Aug 1 18:46:21 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 1 Aug 2006 18:46:21 -0600 (MDT) Subject: [Rxtx] JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Message-ID: On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) > C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] > 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, > id=11034] > 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, > id=11033] > 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, > id=11032] > 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, > id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] > 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, > id=11028] > 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, > id=11027] > 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, > id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] > 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- Index: termios.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/termios.c,v retrieving revision 1.9.2.57 diff -u -r1.9.2.57 termios.c --- termios.c 4 Jun 2006 02:50:01 -0000 1.9.2.57 +++ termios.c 11 Jun 2006 21:51:10 -0000 @@ -1048,26 +1048,29 @@ if ( !first_tl ) { port->prev = NULL; + port->next = NULL; first_tl = port; } else { - while ( index->next ) + while ( ( index->fd < port->fd ) && index->next ) index = index->next; - if ( port == first_tl ) + if ( index->fd > port->fd ) { - port->prev = NULL; - port->next = first_tl; - first_tl->prev = port; - first_tl = port; + /* inserting previously closed fd */ + port->prev = index->prev; + port->next=index + index->prev->next = port; + index->prev = port; } else { + /* adding to end of list */ port->prev = index; + port->next = NULL; index->next = port; } } - port->next = NULL; LEAVE( "add_port" ); return port; From gergg at cox.net Tue Aug 1 23:25:19 2006 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 02 Aug 2006 00:25:19 -0500 Subject: [Rxtx] Do interfaces break backwards compatibility? In-Reply-To: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <44D0373F.7020600@cox.net> Andre-John Mas wrote: > It is the class that decides to add serializable that needs to worry about those issues. > For the most part serial ports and their connection states should be considered as > transient, since there is no guarantee they will still be present or that their state > will be, especially in a USB world. Right, but when you provide an interface as the standard, that opens the doors for a lot more interpretation and variation. An abstract class can indicate a lot more about what the expected implementation is. Gregg Wonderly From lyon at docjava.com Wed Aug 2 06:02:15 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:02:15 -0400 Subject: [Rxtx] jsr spec and license issues Message-ID: Hi All, Trent and I have been discussing the license issues of the JSR spec and code that we develop, as a community. Here is what we have come up with: >During the development, the new JSR spec that we derive >will be >covered under the LGPL license. Since it is >just interfaces, any contributions will come back to me, for inclusion >into the specification. The goal is to provide a detailed set of >interfaces that >document the present state of our reference model. I am using >the RXTX as the reference model. If there is something missing from >the reference model, or if the reference model has something that should >not be there, we will need to discuss it. > >After Sun accepts the JSR, I, as the copyright holder, can issue >a version with a JSR compatible license. > >The goal is to migrate the interfaces into javax.comm. Does this sound like a reasonable plan to everyone? Thanks! - Doug From joachim at buechse.de Wed Aug 2 06:21:03 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 14:21:03 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Good day, quite frankly I think that this is a very bad idea. This specification (!) should be in the public domain and nowhere else. Defining a spec under the (L)GPL makes absolutely no sense. After all it is a specification not an implementation. There is no or only trivial code attached to it. So while nothing can be gained by putting it under the LGPL, a lot can be lost - for example the contribution of companies that do not like to open source their implementations. Furthermore you are plain wrong assuming you will be the copyright holder to additions made by other people. Best regards, Joachim On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for >> inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that >> should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Aug 2 06:39:28 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:39:28 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Hi All, I don't know anything about licensing issues. The below sounds reasonable. If we make this public domain, will that be compatible with Sun's JSR? Thanks! - DL P.S. I really don't care what we do, as long as there is some sort of collective agreement. >Good day, > >quite frankly I think that this is a very bad idea. This specification >(!) should be in the public domain and nowhere else. > >Defining a spec under the (L)GPL makes absolutely no sense. After all? >it is a specification not an implementation. There is no or only? >trivial code attached to it. So while nothing can be gained by? >putting it under the LGPL, a lot can be lost - for example the? >contribution of companies that do not like to open source their? >implementations. > >Furthermore you are plain wrong assuming you will be the copyright? >holder to additions made by other people. > >Best regards, >Joachim > > >On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for? >>> inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that? >>> should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> >> Does this sound like a reasonable plan to everyone? >> >> Thanks! >> - Doug >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 07:50:09 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 10:50:09 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D0AD91.4080103@gmail.com> Hi, I have been searching the web and here it is: http://jcp.org/en/resources/license_reference Here there is a list of the licenses that are compatible with the JCP for JSR submitting. I think that Apache, CDDL, CPL and OSL are the one that are compatible with our needs. But I think that Apache is the best for us, Doug why do not make a votation? Regards, Manuel > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. > >> Good day, >> >> quite frankly I think that this is a very bad idea. This specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From lyon at docjava.com Wed Aug 2 08:10:55 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 10:10:55 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D0AD91.4080103@gmail.com> References: <44D0AD91.4080103@gmail.com> Message-ID: Hi All, I have no objection to an Apache license for the JSR interfaces that we produce. Would anyone care to comment? Joachim: Does this address your public domain concerns? How does this impact the reference implementation (i.e. RXTX)? Thanks! - DL >Hi, >I have been searching the web and here it is: >http://jcp.org/en/resources/license_reference >Here there is a list of the licenses that are compatible with the JCP >for JSR submitting. >I think that Apache, CDDL, CPL and OSL are the one that are compatible >with our needs. >But I think that Apache is the best for us, Doug why do not make a votation? >Regards, >Manuel > >> Hi All, >> I don't know anything about licensing issues. >> The below sounds reasonable. If we make this public domain, >> will that be compatible with Sun's JSR? >> Thanks! >> - DL >> P.S. I really don't care what we do, as long as there is >> some sort of collective agreement. >>?? >>> Good day, >>> >>> quite frankly I think that this is a very bad idea. This specification >>> (!) should be in the public domain and nowhere else. >>> >>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>> it is a specification not an implementation. There is no or only >>> trivial code attached to it. So while nothing can be gained by >>> putting it under the LGPL, a lot can be lost - for example the >>> contribution of companies that do not like to open source their >>> implementations. >>> >>> Furthermore you are plain wrong assuming you will be the copyright >>> holder to additions made by other people. >>> >>> Best regards, > >> Joachim >>> >>> >>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>> >>>???? >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>?????? >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for >>>>> inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that >>>>> should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>>>???????? >>>> Does this sound like a reasonable plan to everyone? >>>> >>>> Thanks! >>>> - Doug >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>?????? >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>???? >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 08:20:29 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 11:20:29 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D0AD91.4080103@gmail.com> Message-ID: <44D0B4AD.2050106@gmail.com> Doug; > How does this impact the reference implementation (i.e. RXTX)? > Fuck I have not thinked about that, we would need that everyone who had colaborated with RXTX and have putted code on it to agree a license chaging. Or start from sractch. I don't know if Trent have the right to do that. Regards, Manuel > > >> Hi, >> I have been searching the web and here it is: >> http://jcp.org/en/resources/license_reference >> Here there is a list of the licenses that are compatible with the JCP >> for JSR submitting. >> I think that Apache, CDDL, CPL and OSL are the one that are compatible >> with our needs. >> But I think that Apache is the best for us, Doug why do not make a votation? >> Regards, >> Manuel >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> >> >> Joachim >> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 08:21:15 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 16:21:15 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Putting something in the public domain means, that it can be used by anyone for whatever (s)he thinks is appropriate. The authors define no restriction regarding it's use. That's how any specification should be. Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From berkland at spamcop.net Wed Aug 2 08:50:50 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 10:50:50 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> You may want to consider making it available under two separate licenses. 1 - LGPL as it is today The LGPL can be used by anyone wanting to extend the current functionality, as long as they provide code for anything they change. 2 - Sun Community Source License (SCSL) http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf The SCSL will allow anyone who wants to do a closed source implementation from the ground up to do so, if I'm reading it correctly, as long as they don't use any of the code from the Reference Implementation. This will satisfy any company that wants to have a closed-source implementation, but not help them out very much. On 8/2/06, Joachim Buechse wrote: > Putting something in the public domain means, that it can be used by > anyone for whatever (s)he thinks is appropriate. The authors define > no restriction regarding it's use. That's how any specification > should be. > > Best regards, > Joachim > > > On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > > > Hi All, > > I don't know anything about licensing issues. > > The below sounds reasonable. If we make this public domain, > > will that be compatible with Sun's JSR? > > Thanks! > > - DL > > P.S. I really don't care what we do, as long as there is > > some sort of collective agreement. > >> Good day, > >> > >> quite frankly I think that this is a very bad idea. This > >> specification > >> (!) should be in the public domain and nowhere else. > >> > >> Defining a spec under the (L)GPL makes absolutely no sense. After all > >> it is a specification not an implementation. There is no or only > >> trivial code attached to it. So while nothing can be gained by > >> putting it under the LGPL, a lot can be lost - for example the > >> contribution of companies that do not like to open source their > >> implementations. > >> > >> Furthermore you are plain wrong assuming you will be the copyright > >> holder to additions made by other people. > >> > >> Best regards, > >> Joachim > >> > >> > >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> > >>> Hi All, > >>> Trent and I have been discussing the license issues of the > >>> JSR spec and code that we develop, as a community. > >>> Here is what we have come up with: > >>> > >>>> During the development, the new JSR spec that we derive > >>>> will be > >>>> covered under the LGPL license. Since it is > >>>> just interfaces, any contributions will come back to me, for > >>>> inclusion > >>>> into the specification. The goal is to provide a detailed set of > >>>> interfaces that > >>>> document the present state of our reference model. I am using > >>>> the RXTX as the reference model. If there is something missing > >>>> from > >>>> the reference model, or if the reference model has something that > >>>> should > >>>> not be there, we will need to discuss it. > >>>> > >>>> After Sun accepts the JSR, I, as the copyright holder, can issue > >>>> a version with a JSR compatible license. > >>>> > >>>> The goal is to migrate the interfaces into javax.comm. > >>> > >>> Does this sound like a reasonable plan to everyone? > >>> > >>> Thanks! > >>> - Doug > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From naranjo.manuel at gmail.com Wed Aug 2 09:03:02 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 12:03:02 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> References: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> Message-ID: <44D0BEA6.2040408@gmail.com> Or even better, you can use Apache v2, which allows both Open Source and Closed Source forms ;-) > You may want to consider making it available under two separate licenses. > > 1 - LGPL as it is today > > The LGPL can be used by anyone wanting to extend the current > functionality, as long as they provide code for anything they change. > > 2 - Sun Community Source License (SCSL) > http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf > > The SCSL will allow anyone who wants to do a closed source > implementation from the ground up to do so, if I'm reading it > correctly, as long as they don't use any of the code from the > Reference Implementation. This will satisfy any company that wants to > have a closed-source implementation, but not help them out very much. > > On 8/2/06, Joachim Buechse wrote: > >> Putting something in the public domain means, that it can be used by >> anyone for whatever (s)he thinks is appropriate. The authors define >> no restriction regarding it's use. That's how any specification >> should be. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This >>>> specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> Joachim >>>> >>>> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing >>>>>> from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 09:46:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 17:46:25 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> I assume that javax.comm/RXTX is to be redefined using Interfaces. In this case we should separate 2 things: 1) The specification and it's incarnation in the form of java classes defining the interfaces. 2) The actual implementation of the functionality. It is possible that 1) may contain some trivial code in abstract or none abstract classes (ie PortFactory, PortRegistry, etc). Doug's original question was regarding 1) - unless I misunderstood. I personally think that 1) should be in the public domain. It should not be covered by any restrictions what-so-ever. Let it be free as in "totally free in any respect". I do not care under which license 2) is released. Why? Because it is in my very interest that all/almost all vendors include implementations with their distributions. Which will only happen if they do not need to respect open source licenses. (javax.comm is not nearly as important as the Apache web server or MySql, so nobody will take licensing risks). Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ssbello at gmail.com Wed Aug 2 10:28:30 2006 From: ssbello at gmail.com (Simone) Date: Wed, 2 Aug 2006 18:28:30 +0200 Subject: [Rxtx] pocketPC 2003 Message-ID: <39ed505d0608020928k6ceb01aen470c2e6a78c5a6b0@mail.gmail.com> Does anyone know if the Rxtx works on PocketPc 2003? If yes, could you, please, give me some suggestion. Thanks, Simone Bell? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/72e0fb87/attachment-0005.html From berkland at spamcop.net Wed Aug 2 13:00:10 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 15:00:10 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> Message-ID: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> How about these for the "Business Terms" of the new JSR: > The specification will be released in accordance with standard terms > as specified by the JCP process. > > The reference implementation (RI) will be delivered in binary form > free of charge from http://rxtx.org. Licensing details are expected to > be under the Binary Code License (BCL). > > The source for the reference implementation is expected to be > delivered via the Limited GNU Public License (LGPL) and available free > of charge. > > The TCK will be made available free of charge to all J2SE and J2EE licensees. > > The TCK will be offered for license at no charge, without support or > any trademark license rights, to qualified not-for-profit entities > (including not-for-profit) academic institutions) and qualified > individuals engaged in efforts to create compatible implementations of > the Specification. From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 13:13:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 13:13:33 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E495@hqexchange3.dot.state.co.us> Trent, I didn't exactly get it. Again I am not a C guy, maybe its very simple for you but I don't see any checks for FD (as written in the patch for termios.c) in the initialise_event_info_struct, I see some checks in the interruptEventLoop call. Second as you explained I open three("/dev/cuf01","/dev/cuf01","/dev/cuf01") ports, I close the 2nd ("/dev/cuf02", the other 2 are still open) , I never try to open the third ("/dev/cuf03") port again if it is already open. Are you planning to have a fix for this in the next release 2.1.8. Its very important for me to have a fix for this, its causing some major headaches for our project. I know you have your regular job too, I will appreciate any help. Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, August 01, 2006 6:46 PM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java > VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic > frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) C [librxtxSerial.so+0x69b2] > initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] > Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" > [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: > /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread > "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 > JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon > [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" > daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread > "AdapterThread" daemon [_thread_blocked, id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, > id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Wed Aug 2 13:14:20 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 16:14:20 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> Message-ID: <44D0F98C.1070600@gmail.com> +1 Agree > How about these for the "Business Terms" of the new JSR: > > >> The specification will be released in accordance with standard terms >> as specified by the JCP process. >> >> The reference implementation (RI) will be delivered in binary form >> free of charge from http://rxtx.org. Licensing details are expected to >> be under the Binary Code License (BCL). >> >> The source for the reference implementation is expected to be >> delivered via the Limited GNU Public License (LGPL) and available free >> of charge. >> >> The TCK will be made available free of charge to all J2SE and J2EE licensees. >> >> The TCK will be offered for license at no charge, without support or >> any trademark license rights, to qualified not-for-profit entities >> (including not-for-profit) academic institutions) and qualified >> individuals engaged in efforts to create compatible implementations of >> the Specification. >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From savagobr at yahoo.com Wed Aug 2 13:40:42 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:40:42 -0700 (PDT) Subject: [Rxtx] jsr spec and license issues Message-ID: <20060802194042.83599.qmail@web53807.mail.yahoo.com> Friends Apache seems ok... if I get it right, does it *almost* equals to BSD? Regarding public domain: I think that the good people that spent so much time on this library will like to keep some rights over its own work, don't you think? Best regards Savago --------------------------------- Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/79abdfd5/attachment-0005.html From savagobr at yahoo.com Wed Aug 2 13:58:04 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:58:04 -0700 (PDT) Subject: [Rxtx] JVM Crashing Message-ID: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago --------------------------------- Groups are talking. We´re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/47d561ae/attachment-0005.html From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 14:09:18 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 14:09:18 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E4AD@hqexchange3.dot.state.co.us> Thank You :) ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adenilson Cavalcanti Sent: Wednesday, August 02, 2006 1:58 PM To: rxtx at qbang.org Subject: Re: [Rxtx] JVM Crashing Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago ________________________________ Groups are talking. We?re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/b4eb22cf/attachment-0005.html From tjarvi at qbang.org Wed Aug 2 20:23:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 20:23:42 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > Hi Doug As mentioned off the list, the important point in my mind is that everyone is on the same base more than what license is decided upon. These things are just best addressed early so there isn't confusion. The Apache license is fairly standard in the Open Source community vs several of the relatively unknown [and obviously redundat even by their descriptions] offerings by Sun. Perhaps one option here that would kill a few birds with one stone is to dual license the interface as Apache and LGPL. This would allow everyone to use the interfaces without needing to do wastefull work for internal license requirements. Projects could choose between the two the license that best suits their needs. If there is a software shop doing Java that isn't familiar with the Apache license, they must be doing some strange Java. I do think it is foolhearty to blindly travel in public domain but nobody is trying to undermine the spec files. The intent is to use the work for a JSR submission that everyone can use without confusion later on down the line. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 21:01:16 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 20:01:16 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D166FC.9090005@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> Does this sound like a reasonable plan to everyone? >> > > Hi Doug > > As mentioned off the list, the important point in my mind is that everyone > is on the same base more than what license is decided upon. These things > are just best addressed early so there isn't confusion. > > The Apache license is fairly standard in the Open Source community vs > several of the relatively unknown [and obviously redundat even by > their descriptions] offerings by Sun. The JCP is a reasonable process for what the RxTx project intends to achieve by evolving the API. There isn't much to lose by going the JSR route. The community will benefit from a fair API like so many other that have undergone the process. Sun isn't going to own the API or manipulate it into anything weird anymore than anyone else is. I think your fears are rather vague and unfounded. Which isn't to say that I am a well-informed representative of the JCP, I've only sat through one JSR process and we ended up with javax.usb, and IBM got what it wanted out of the deal and the community got a very nice standard. Paul > > Perhaps one option here that would kill a few birds with one stone is to > dual license the interface as Apache and LGPL. This would allow everyone > to use the interfaces without needing to do wastefull work for internal > license requirements. Projects could choose between the two the license > that best suits their needs. If there is a software shop doing Java that > isn't familiar with the Apache license, they must be doing some strange > Java. > > I do think it is foolhearty to blindly travel in public domain but nobody > is trying to undermine the spec files. The intent is to use the work for > a JSR submission that everyone can use without confusion later on down the > line. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Aug 2 22:10:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 22:10:48 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D166FC.9090005@sun.com> References: <44D166FC.9090005@sun.com> Message-ID: On Wed, 2 Aug 2006, Paul Klissner wrote: > Trent Jarvi wrote: >> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> Does this sound like a reasonable plan to everyone? >>> >> >> Hi Doug >> >> As mentioned off the list, the important point in my mind is that everyone >> is on the same base more than what license is decided upon. These things >> are just best addressed early so there isn't confusion. >> >> The Apache license is fairly standard in the Open Source community vs >> several of the relatively unknown [and obviously redundat even by >> their descriptions] offerings by Sun. > > The JCP is a reasonable process for what the RxTx project intends > to achieve by evolving the API. > > There isn't much to lose by going the JSR route. The community will > benefit from a fair API like so many other that have undergone > the process. Sun isn't going to own the API or manipulate it > into anything weird anymore than anyone else is. I think your > fears are rather vague and unfounded. > > Which isn't to say that I am a well-informed representative > of the JCP, I've only sat through one JSR process and we ended > up with javax.usb, and IBM got what it wanted out of the deal > and the community got a very nice standard. > Hi Paul The JCP should work fine. As our intentions are in line, licensing so that everyone can use the interface code should not be a problem. Note that the current default right now is that the interfaces are copyrighted and no license for distribution is included. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 22:33:51 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 21:33:51 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D166FC.9090005@sun.com> Message-ID: <44D17CAF.1090802@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Paul Klissner wrote: > >> Trent Jarvi wrote: >>> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>> Does this sound like a reasonable plan to everyone? >>>> >>> Hi Doug >>> >>> As mentioned off the list, the important point in my mind is that everyone >>> is on the same base more than what license is decided upon. These things >>> are just best addressed early so there isn't confusion. >>> >>> The Apache license is fairly standard in the Open Source community vs >>> several of the relatively unknown [and obviously redundat even by >>> their descriptions] offerings by Sun. >> The JCP is a reasonable process for what the RxTx project intends >> to achieve by evolving the API. >> >> There isn't much to lose by going the JSR route. The community will >> benefit from a fair API like so many other that have undergone >> the process. Sun isn't going to own the API or manipulate it >> into anything weird anymore than anyone else is. I think your >> fears are rather vague and unfounded. >> >> Which isn't to say that I am a well-informed representative >> of the JCP, I've only sat through one JSR process and we ended >> up with javax.usb, and IBM got what it wanted out of the deal >> and the community got a very nice standard. >> > > Hi Paul > > The JCP should work fine. As our intentions are in line, licensing so > that everyone can use the interface code should not be a problem. Sorry, looks like my concerns were unfounded. I haven't been following the threads closely this week, as work got busy with an escalated issue and new project. Sorry about that. > > Note that the current default right now is that the interfaces are > copyrighted and no license for distribution is included. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Aug 3 03:45:56 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 03 Aug 2006 05:45:56 -0400 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: Hi All, I have been waiting a day for things to cool down. Licensing appears to be a hot-button topic. I have no objection to dual license the interfaces as both Apache and LGPL. Some thoughts: Goal: developers wish to work together on a common piece of code that the team needs. It makes sense that the code base they work on should be Apache-licensed. That makes it possible for the team to use and develop common code, even if the end result is LGPL'd as a whole. If we combine licenses, we must follow the terms of both licenses when distributing the combined work. Thus, the dual license contains the super set of terms in the licenses of Apached and LGPL. This should address concern about using Apache-licensed code within LGPL projects due to the FSF's claim that they are incompatible. Here is a draft statement for RXSL: The RXTX Specification Library (RXSL) uses a dual license strategy for the source code. These licenses are the GNU Lesser General Public License (LGPL) and the Apache License. I strongly encourage users to use the LGPL license and participate fully in the free software community. Dual licensing of the RXSL source code provides open and free access to the technology both for the GPL community and for other developers or companies that cannot use the GPL. Dual license is common practice in open source projects like OpenOffice, Perl and Mozilla. Through the combined use of LGPL and Apache license, developers will have a high degree of freedom yet compatibility and interoperability will be preserved. You can freely modify, extend, and improve the RXSL source code. The only question is whether or not you must provide the source code and contribute modifications to the community. The GNU and Apache licenses allow different ranges of flexibility in this regard, but in the end, regardless of the license used, any and all incompatible changes must be published openly. Note that there is the RXTX Reference Model that uses the org.rxtx package, which itself is protected by the LGPL. This may be part of the distribution, however, it can not be redistributed using a different license. Is everybody OK with this? Thanks Trent, great idea! - Doug From joachim at buechse.de Thu Aug 3 04:15:44 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 3 Aug 2006 12:15:44 +0200 Subject: [Rxtx] JVM Crashing In-Reply-To: <20060802195804.70935.qmail@web53812.mail.yahoo.com> References: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Message-ID: <6ABA2AB2-CECE-4C4B-A7D6-0CDF8B9C95A8@buechse.de> I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of > rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jvermillard at archean.fr Thu Aug 3 04:26:48 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Thu, 03 Aug 2006 12:26:48 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <1154600808.16732.18.camel@localhost.localdomain> Hi, I'm a developer of the Apache MINA framework. It's a network application framework which helps users develop high performance and high scalability network applications easily. http://directory.apache.org/subprojects/mina/index.html . I would like to integrate serial connection to the framework (actualy supporting TCP, UDP (broadcast) and in VM communications), but LGPL is an issue for me. An Apache License would be pretty usefull for me and integrate rxtx functionnalities easly. Thanks, Julien Le jeudi 03 ao?t 2006 ? 05:45 -0400, Dr. Douglas Lyon a ?crit : > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/755cca7f/smime-0005.bin From pascal at quies.net Thu Aug 3 04:32:35 2006 From: pascal at quies.net (Pascal S. de Kloe) Date: Thu, 3 Aug 2006 12:32:35 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <200608031232.35838.pascal@quies.net> Hi Doug, The Apache license is unnessesary complex. It puts all kinds of limitations on the usage. Is there a particular reason why people chose this or was it just the familiar name? I agree with Joachim (again) that the specification and the interfaces should be public domain. However, if we realy need a license then have a look at the X11 license because that one is compatible with the GPL and suits our needs: http://www.fsf.org/licensing/licenses/index_html http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3 ---- start: implementation Copyright (C) 2006 Sun Microsystems, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Sun Microsystems shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Sun Microsystems. Java is a trademark of Sun Microsystems, Inc. ---- end Op donderdag 3 augustus 2006 11:45, schreef Dr. Douglas Lyon: > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Aug 3 05:17:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 05:17:07 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154600808.16732.18.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: On Thu, 3 Aug 2006, Julien Vermillard wrote: > Hi, > > I'm a developer of the Apache MINA framework. It's a network application > framework which helps users develop high performance and high > scalability network applications easily. > http://directory.apache.org/subprojects/mina/index.html . I would like > to integrate serial connection to the framework (actualy supporting TCP, > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > An Apache License would be pretty usefull for me and integrate rxtx > functionnalities easly. > > Thanks, > > Julien > Hi Julien The rxtx license itself will not change. This is just the interface. You would be free to implement an rxtx replacement if the LGPL low level code is a problem for you. These licensing details would make it possible to take the interface code instead of needing to recode them for a new project. You are probably confusing the license problems with the GPL not the LGPL though you can share links to concerns off the list if you would like to go through them. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 11:59:48 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 11:59:48 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E516@hqexchange3.dot.state.co.us> Joachim, I think my both problems (JVM crashing & Port Locking) are being caused by the corruption of "Event Info Struct / EIS" I have noticed with in EIS my "FD" and "Closing" value being overwritten. The problem is definitely in SerialImp.c file. I am trying to understand what the code does and try to pin point the problem by trying few other options. I will keep everybody posted. Regards Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Joachim Buechse Sent: Thursday, August 03, 2006 4:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Thu Aug 3 13:50:07 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 14:50:07 -0500 Subject: [Rxtx] slow startup Message-ID: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete From brian at mbari.org Thu Aug 3 14:05:57 2006 From: brian at mbari.org (Brian Schlining) Date: Thu, 3 Aug 2006 13:05:57 -0700 Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> References: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Message-ID: Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B > Greetings, > I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/ > qbang.org). > > In testing things out, I ran the list ports example from the Wiki, > and it seems to take quite a while for the library to initialize? > Like on the order of 30+ seconds or so after startup (and the RXTX > banner prints), and before the application starts running. > > Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then > I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ > terminal server) and I'm wondering if they are not responding properly > and this is causing the slow startup? Or is this a known problem of > some kind, or maybe something on my system is screwy? > > Thanks, > Pete > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/6123f730/attachment-0005.html From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 14:13:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 14:13:47 -0600 Subject: [Rxtx] slow startup Message-ID: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Hi Pete, RXTX does open and close the ports in Windows. Try downloading utility like PORTMON(only for windows) and you can see that whenever you load RXTX it tries to register all the available COMM ports in the system. It is a little slow if you have virtual ports, we use digi as a terminal server, Its going to get worst of you have comm ports in 100's Thanks Pawan Kharbanda ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Brian Schlining Sent: Thursday, August 03, 2006 2:06 PM To: RXTX Developers and Users Subject: Re: [Rxtx] slow startup Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/94fd105d/attachment-0005.html From pete.flugstad at gmail.com Thu Aug 3 14:32:04 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 15:32:04 -0500 Subject: [Rxtx] slow startup In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Message-ID: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> On 8/3/06, Kharbanda, Pawan wrote: > RXTX does open and close the ports in Windows. Try downloading utility > like PORTMON(only for windows) and you can see that whenever you load RXTX > it tries to register all the available COMM ports in the system. It is a > little slow if you have virtual ports, we use digi as a terminal server, Its > going to get worst of you have comm ports in 100's Okay, I can understand that, but from the PORTMON output, it looks like it's opening each port TWICE: 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS ... 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS Also, assuming instead of listing the ports I wanted to just open one, I'm still seeing the 30 second delay, so it's scanning at startup regardless of what the Java code is going to do. Probably necessary, but annoying. I know, I know, contribute patches... :-) Thanks, Pete From tjarvi at qbang.org Thu Aug 3 15:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 15:04:42 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: On Thu, 3 Aug 2006, Pete Flugstad wrote: > On 8/3/06, Kharbanda, Pawan wrote: >> RXTX does open and close the ports in Windows. Try downloading utility >> like PORTMON(only for windows) and you can see that whenever you load RXTX >> it tries to register all the available COMM ports in the system. It is a >> little slow if you have virtual ports, we use digi as a terminal server, Its >> going to get worst of you have comm ports in 100's > > Okay, I can understand that, but from the PORTMON output, it looks > like it's opening each port TWICE: > > 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > ... > 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > > Also, assuming instead of listing the ports I wanted to just open one, > I'm still seeing the 30 second delay, so it's scanning at startup > regardless of what the Java code is going to do. Probably necessary, > but annoying. > > I know, I know, contribute patches... :-) > I think this problem is in RXTXCommDriver.java. I've just not tracked it down but it should be in the java code, not the native code so easy enough to track down. -- Trent Jarvi tjarvi at qbang.org From jvermillard at archean.fr Fri Aug 4 03:43:28 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:43:28 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: <1154684608.6181.4.camel@localhost.localdomain> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > Hi, > > > > I'm a developer of the Apache MINA framework. It's a network application > > framework which helps users develop high performance and high > > scalability network applications easily. > > http://directory.apache.org/subprojects/mina/index.html . I would like > > to integrate serial connection to the framework (actualy supporting TCP, > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > An Apache License would be pretty usefull for me and integrate rxtx > > functionnalities easly. > > > > Thanks, > > > > Julien > > > > Hi Julien > > The rxtx license itself will not change. This is just the interface. > You would be free to implement an rxtx replacement if the LGPL low level > code is a problem for you. These licensing details would make it possible > to take the interface code instead of needing to recode them for a new > project. > > You are probably confusing the license problems with the GPL not the LGPL > though you can share links to concerns off the list if you would like to > go through them. > > -- > Trent Jarvi > tjarvi at qbang.org Hi, I'm not a license expert but some guys at ASF said me you can't call LGPLed libs from java. some peoples interprete that as static linking and not dynamic linking (no idea why). So ASF/BSD licensied interface willl solve the license probleme. If you got some questions about the ASL and the way you can dual license LGPL/ASL you can ask it on legal-discuss at apache.org Julien -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/8d46c0aa/smime-0005.bin From jvermillard at archean.fr Fri Aug 4 03:51:30 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:51:30 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <1154685091.6181.6.camel@localhost.localdomain> erm from java -> from ASLed Java code Le vendredi 04 ao?t 2006 ? 11:43 +0200, Julien Vermillard a ?crit : > Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > Hi, > > I'm not a license expert but some guys at ASF said me you can't call > LGPLed libs from java. some peoples interprete that as static linking > and not dynamic linking (no idea why). So ASF/BSD licensied interface > willl solve the license probleme. > > If you got some questions about the ASL and the way you can dual license > LGPL/ASL you can ask it on legal-discuss at apache.org > > Julien > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dcc29d70/smime-0005.bin From guille at sms.nl Fri Aug 4 04:35:24 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Fri, 04 Aug 2006 12:35:24 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <7.0.1.0.0.20060804123322.036dc748@sms.nl> At 11:43 04/08/2006, Julien Vermillard wrote: >Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > >Hi, > >I'm not a license expert but some guys at ASF said me you can't call >LGPLed libs from java. some peoples interprete that as static linking >and not dynamic linking (no idea why). This interpretation is wrong. See the official position of the FSF regarding the LGPL and Java: http://www.gnu.org/licenses/lgpl-java.html http://www.fsf.org/licensing/licenses/lgpl-java.html Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From hambyiii at hotmail.com Fri Aug 4 04:52:47 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 10:52:47 +0000 Subject: [Rxtx] error getting InputStream Message-ID: Hi, I have written a program in Java for Windows xp using RXTX (which is why I am using this mailing list :). However, I am getting a problem. I am connecting to a serial port, like so: private CommPortIdentifier portID; private boolean openPort(String selectedPort) { boolean portFound = false; Enumeration portList; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portID.getName().equals(selectedPort)) { portFound = true; break; } } } return portFound; } and then I try and get the serial port input stream (leaving out the try and catch for the sake of space): SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); InputStream inputStream = serialPort.getInputStream(); but on the getInputStream() I get the following error message: Bad file descriptor in nativeavailable I cannot figure out where it is going wrong...anyone any ideas. A quick answer would be wonderful, as I am kinda under the hammer to get this fixed quickly Thanks in Advance Keith From tjarvi at qbang.org Fri Aug 4 05:13:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 05:13:19 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <7.0.1.0.0.20060804123322.036dc748@sms.nl> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> <7.0.1.0.0.20060804123322.036dc748@sms.nl> Message-ID: On Fri, 4 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 11:43 04/08/2006, Julien Vermillard wrote: >> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : >>> On Thu, 3 Aug 2006, Julien Vermillard wrote: >>> >>>> Hi, >>>> >>>> I'm a developer of the Apache MINA framework. It's a network application >>>> framework which helps users develop high performance and high >>>> scalability network applications easily. >>>> http://directory.apache.org/subprojects/mina/index.html . I would like >>>> to integrate serial connection to the framework (actualy supporting TCP, >>>> UDP (broadcast) and in VM communications), but LGPL is an issue for me. >>>> >>>> An Apache License would be pretty usefull for me and integrate rxtx >>>> functionnalities easly. >>>> >>>> Thanks, >>>> >>>> Julien >>>> >>> >>> Hi Julien >>> >>> The rxtx license itself will not change. This is just the interface. >>> You would be free to implement an rxtx replacement if the LGPL low level >>> code is a problem for you. These licensing details would make it possible >>> to take the interface code instead of needing to recode them for a new >>> project. >>> >>> You are probably confusing the license problems with the GPL not the LGPL >>> though you can share links to concerns off the list if you would like to >>> go through them. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >> >> Hi, >> >> I'm not a license expert but some guys at ASF said me you can't call >> LGPLed libs from java. some peoples interprete that as static linking >> and not dynamic linking (no idea why). > > This interpretation is wrong. See the official position of the FSF regarding > the LGPL and Java: > > http://www.gnu.org/licenses/lgpl-java.html > > http://www.fsf.org/licensing/licenses/lgpl-java.html > What I do with legal groups that go down that rat hole is give them a copy of the rxtx 2.0 license. Since the confused legal folks are going in a direction that does not represent the intent of the license or authors at that point and are confused about basic things in our industry that most consider facts, the discussions are very short. The rxtx 2.0 license just adds the following and has for 6 years or so. Not because the lawyers are right. They get confused about intent and even facts. The following is added to make confused lawyers that cant understand intent go far away and never come back. period. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. From hambyiii at hotmail.com Fri Aug 4 05:42:21 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 11:42:21 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Okay, I made a little mistake in my last message. The error is not occuring where I thought it was. Instead it is occuring when I do the following: byte[] readBuffer = new byte[128]; try { int numBytes = 0; try { Thread.sleep(500); } catch (InterruptedException e) {} while (inputStream.available() > 0) { numBytes = inputStream.read(readBuffer); } processReceivedData(readBuffer, numBytes); } catch (IOException e) { System.out.println(e.getMessage()); } So I guess the error is happening on the inputStream.read(readBuffer) again, any help is appreciated and again, thanks in advance Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 10:52:47 +0000 > >Hi, > >I have written a program in Java for Windows xp using RXTX (which is why I >am using this mailing list :). However, I am getting a problem. I am >connecting to a serial port, like so: > private CommPortIdentifier portID; > > private boolean openPort(String selectedPort) > { > boolean portFound = false; > Enumeration portList; > > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portID.getName().equals(selectedPort)) > { > portFound = true; > break; > } > } > } > > return portFound; > } > >and then I try and get the serial port input stream (leaving out the try >and >catch for the sake of space): > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >InputStream inputStream = serialPort.getInputStream(); > >but on the getInputStream() I get the following error message: > >Bad file descriptor in nativeavailable > >I cannot figure out where it is going wrong...anyone any ideas. A quick >answer would be wonderful, as I am kinda under the hammer to get this fixed >quickly > >Thanks in Advance >Keith > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From hambyiii at hotmail.com Fri Aug 4 07:08:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:08:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Hi, I know I am replying to myself a lot at the moment, but more information has come to light (These errors are actually happening on a client machine, on software that has worked for the past month, and only now has started to fail, which is why I am a little slow finding things out) The errors I have already written about are only symptoms of an orignal error. The original error occurs the first time I try to WRITE thte OutputStream: OutputStream oStream = serialPort.getOutputStream(); serialPort.notifyOnOutputEmpty(true); byte[] bs = encodeMessage(configString.toString()); oStream.write(bs); oStream.flush(); The error occurs on oStream.write(bs); and is: Input/output error in writeArray Now writeArray is native code, so I have no idea what is going on there. Any help would be appreciated Thanks Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 11:42:21 +0000 > >Okay, I made a little mistake in my last message. > >The error is not occuring where I thought it was. Instead it is occuring >when I do the following: > >byte[] readBuffer = new byte[128]; > >try { > > int numBytes = 0; > try { > Thread.sleep(500); > } > catch (InterruptedException e) > {} > > while (inputStream.available() > 0) > { > numBytes = inputStream.read(readBuffer); > } > > processReceivedData(readBuffer, numBytes); >} >catch (IOException e) >{ > System.out.println(e.getMessage()); >} > >So I guess the error is happening on the inputStream.read(readBuffer) > >again, any help is appreciated and again, thanks in advance >Keith > > >From: "Keith Thorne" > >Reply-To: RXTX Developers and Users > >To: rxtx at qbang.org > >Subject: [Rxtx] error getting InputStream > >Date: Fri, 04 Aug 2006 10:52:47 +0000 > > > >Hi, > > > >I have written a program in Java for Windows xp using RXTX (which is why >I > >am using this mailing list :). However, I am getting a problem. I am > >connecting to a serial port, like so: > > private CommPortIdentifier portID; > > > > private boolean openPort(String selectedPort) > > { > > boolean portFound = false; > > Enumeration portList; > > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > > while (portList.hasMoreElements()) > > { > > portID = (CommPortIdentifier) portList.nextElement(); > > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > > { > > if (portID.getName().equals(selectedPort)) > > { > > portFound = true; > > break; > > } > > } > > } > > > > return portFound; > > } > > > >and then I try and get the serial port input stream (leaving out the try > >and > >catch for the sake of space): > > > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); > >InputStream inputStream = serialPort.getInputStream(); > > > >but on the getInputStream() I get the following error message: > > > >Bad file descriptor in nativeavailable > > > >I cannot figure out where it is going wrong...anyone any ideas. A quick > >answer would be wonderful, as I am kinda under the hammer to get this >fixed > >quickly > > > >Thanks in Advance > >Keith > > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Aug 4 07:26:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: Hi Keith Can you tell us more about the physical serial port? Might it be 'vanishing?' On Fri, 4 Aug 2006, Keith Thorne wrote: > Hi, > > I know I am replying to myself a lot at the moment, but more information has > come to light (These errors are actually happening on a client machine, on > software that has worked for the past month, and only now has started to > fail, which is why I am a little slow finding things out) > > The errors I have already written about are only symptoms of an orignal > error. The original error occurs the first time I try to WRITE thte > OutputStream: > > OutputStream oStream = serialPort.getOutputStream(); > serialPort.notifyOnOutputEmpty(true); > > byte[] bs = encodeMessage(configString.toString()); > > oStream.write(bs); > oStream.flush(); > > The error occurs on oStream.write(bs); and is: > > Input/output error in writeArray > > Now writeArray is native code, so I have no idea what is going on there. Any > help would be appreciated > Thanks > Keith > > >> From: "Keith Thorne" >> Reply-To: RXTX Developers and Users >> To: rxtx at qbang.org >> Subject: Re: [Rxtx] error getting InputStream >> Date: Fri, 04 Aug 2006 11:42:21 +0000 >> >> Okay, I made a little mistake in my last message. >> >> The error is not occuring where I thought it was. Instead it is occuring >> when I do the following: >> >> byte[] readBuffer = new byte[128]; >> >> try { >> >> int numBytes = 0; >> try { >> Thread.sleep(500); >> } >> catch (InterruptedException e) >> {} >> >> while (inputStream.available() > 0) >> { >> numBytes = inputStream.read(readBuffer); >> } >> >> processReceivedData(readBuffer, numBytes); >> } >> catch (IOException e) >> { >> System.out.println(e.getMessage()); >> } >> >> So I guess the error is happening on the inputStream.read(readBuffer) >> >> again, any help is appreciated and again, thanks in advance >> Keith >> >>> From: "Keith Thorne" >>> Reply-To: RXTX Developers and Users >>> To: rxtx at qbang.org >>> Subject: [Rxtx] error getting InputStream >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 >>> >>> Hi, >>> >>> I have written a program in Java for Windows xp using RXTX (which is why >> I >>> am using this mailing list :). However, I am getting a problem. I am >>> connecting to a serial port, like so: >>> private CommPortIdentifier portID; >>> >>> private boolean openPort(String selectedPort) >>> { >>> boolean portFound = false; >>> Enumeration portList; >>> >>> portList = CommPortIdentifier.getPortIdentifiers(); >>> >>> while (portList.hasMoreElements()) >>> { >>> portID = (CommPortIdentifier) portList.nextElement(); >>> if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) >>> { >>> if (portID.getName().equals(selectedPort)) >>> { >>> portFound = true; >>> break; >>> } >>> } >>> } >>> >>> return portFound; >>> } >>> >>> and then I try and get the serial port input stream (leaving out the try >>> and >>> catch for the sake of space): >>> >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >>> InputStream inputStream = serialPort.getInputStream(); >>> >>> but on the getInputStream() I get the following error message: >>> >>> Bad file descriptor in nativeavailable >>> >>> I cannot figure out where it is going wrong...anyone any ideas. A quick >>> answer would be wonderful, as I am kinda under the hammer to get this >> fixed >>> quickly >>> >>> Thanks in Advance >>> Keith >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From hambyiii at hotmail.com Fri Aug 4 07:52:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:52:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more information >has > > come to light (These errors are actually happening on a client machine, >on > > software that has worked for the past month, and only now has started to > > fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an orignal > > error. The original error occurs the first time I try to WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); > >> } > >> catch (IOException e) > >> { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance > >> Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I am > >>> connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Fri Aug 4 08:21:07 2006 From: gergg at cox.net (Gregg Wonderly) Date: Fri, 04 Aug 2006 09:21:07 -0500 Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: <44D357D3.40303@cox.net> Keith Thorne wrote: > Okay, I made a little mistake in my last message. > > The error is not occuring where I thought it was. Instead it is occuring > when I do the following: > > byte[] readBuffer = new byte[128]; > > try { > > } > catch (IOException e) > { > System.out.println(e.getMessage()); > } > > So I guess the error is happening on the inputStream.read(readBuffer) This is one of the most frustrating things to see over and over. The exception tells you exactly which line the error is occuring on, if you will use it to see where. In Java, these days, every class should do the following. import java.util.logging.*; public class MyClass { Logger log = Logger.getLogger( getClass().getName() ); ...in some method... { String data = ...; // any extra data like addresses or // ports which might be wrong and // cause an exception. try { ... } catch( SomeException ex ) { log.log( Level.SEVERE, ex.toString()+": "+data, ex ); } } } By default, you will see all of the appropriate details of any exception logged at the WARNING or SEVERE level. You can read the javadocs about logging to get more information too. Once you do this, people can then turn up logging and get more information, or otherwise manage it with a logging configuration file or other tools such as JMX or my http://logman.dev.java.net project. Gregg Wonderly From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 09:15:24 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 09:15:24 -0600 Subject: [Rxtx] error getting InputStream Message-ID: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Keith, Please send the full stack trace of the exception, may be I can help you. On Trent's question regarding physical 'Serial Port', do you mean you have a USB(Connected to Client Machine) to 9 Pin Serial cable(Connected to H/W device)? Also please mention which java version you are using? Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Keith Thorne Sent: Friday, August 04, 2006 7:52 AM To: rxtx at qbang.org Subject: Re: [Rxtx] error getting InputStream The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more > > information >has > > come to light (These errors are actually happening on a client > > machine, >on > > software that has worked for the past month, and only now has > > started to fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an > > orignal error. The original error occurs the first time I try to > > WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); } catch (IOException > >> e) { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the > >> inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which > >>> is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I > >>> am connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out > >>> the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get > >>> this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 14:36:16 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 14:36:16 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Trent, As discussed over the phone yesterday, I am emailing you all the details of the bugs I have been experiencing. We do not use Serial Ports like most of the applications. Our application uses approx 80 -100 serial ports (attached thru Digi boxes) which are opened and closed every 20 sec to 1 minute depending upon the type of device. Some Serial ports are left opened all the time and receive event based serial calls while other devices uses polling (request and reply) to collect data. So the opening and closing of the Serial Ports is not really in a sequential order as you mentioned in our conversation yesterday. Also 2 same serial ports can never be opened at one time we have business locks to prevent that from happening. Our findings so far (of course with the help of RXTX user group): The real culprit is in the SerialImp.c file, somehow the other the Event Info Structure in the Linked List gets damaged and loses references to the original EIS structure. I believe both the problems are caused because of the corruption of EIS packet. I have noticed that the link list traversal of EIS in the following methods under SerialImp.c : 1)initialise_event_info_struct 2)finalize_event_info_struct 3)interruptEventLoop So culprit code might be in one of these methods. I am currently using JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and Fedora Core 5). I am also attaching a Test Class to replicate the problem. You need to modify the class and add your systems Serial ports into the code and execute. java TestOpenClosePort 100 It will open and close all the serial ports 100 times in there own thread. Please let me know, I will be available thru out this weekend and can help you as much as I can with testing. Regards Pawan Kharbanda CDOT-ITS 303-478-2991 (cell) 303-985-4350 (home) -------------- next part -------------- A non-text attachment was scrubbed... Name: TestOpenClosePort.java Type: application/octet-stream Size: 6139 bytes Desc: TestOpenClosePort.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dd3754d9/TestOpenClosePort-0005.obj From tjarvi at qbang.org Fri Aug 4 15:43:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 15:43:09 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: Thanks, I'll look at it tomorrow morning. I don't know when I'll find the solution but you may check email tomorrow afternoon to see if I think I found it. On Fri, 4 Aug 2006, Kharbanda, Pawan wrote: > Trent, > As discussed over the phone yesterday, I am emailing you all the > details of the bugs I have been experiencing. We do not use Serial Ports > like most of the applications. Our application uses approx 80 -100 > serial ports (attached thru Digi boxes) which are opened and closed > every 20 sec to 1 minute depending upon the type of device. Some Serial > ports are left opened all the time and receive event based serial calls > while other devices uses polling (request and reply) to collect data. So > the opening and closing of the Serial Ports is not really in a > sequential order as you mentioned in our conversation yesterday. Also 2 > same serial ports can never be opened at one time we have business locks > to prevent that from happening. > > Our findings so far (of course with the help of RXTX user group): > > The real culprit is in the SerialImp.c file, somehow the other the Event > Info Structure in the Linked List gets damaged and loses references to > the original EIS structure. I believe both the problems are caused > because of the corruption of EIS packet. I have noticed that the link > list traversal of EIS in the following methods under SerialImp.c : > > 1)initialise_event_info_struct > 2)finalize_event_info_struct > 3)interruptEventLoop > > So culprit code might be in one of these methods. I am currently using > JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and > Fedora Core 5). > > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > > Regards > Pawan Kharbanda > CDOT-ITS > 303-478-2991 (cell) > 303-985-4350 (home) > > > > > > > > > > From tjarvi at qbang.org Sat Aug 5 12:32:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:32:40 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:34:27 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:34:27 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> You need to run it few times. More the number of ports, more frequently you can reproduce. With just 2 ports it will be hard to reproduce frequently. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:33 PM To: Kharbanda, Pawan Cc: tjarvi at qbang.org; RXTX Developers and Users Subject: Re: Port Locking / JVM Crashing > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Aug 5 12:52:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:52:26 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> Message-ID: Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more frequently > you can reproduce. With just 2 ports it will be hard to reproduce > frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:57:49 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:57:49 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Trent, I have 5 ports of Digi and I can reproduce almost every time. Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX version -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:52 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more > frequently you can reproduce. With just 2 ports it will be hard to > reproduce frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need >> to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From tjarvi at qbang.org Sat Aug 5 13:06:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:06:07 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Message-ID: You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few thousand > iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:07:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:07:33 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E659@hqexchange3.dot.state.co.us> We use our own locks but I haven't turned off the RXTX locks. I am still using the RXTX locks that might be the difference. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:13:22 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:13:22 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Trent, How can you turn off the lock files? I can try using that. I never tried that, I thought you can't turn off the file locking. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From tjarvi at qbang.org Sat Aug 5 13:18:53 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:18:53 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Message-ID: Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java > -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except lockfiles > are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:31:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:31:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Trent, I am able to constantly replicate almost everytime even when I have locks disabled. Don't know the reason why you are not able to on your environment. Any suggestions??????? Cycle No (Thread ::: /dev/cuf04) ::::::: 7 Cycle No (Thread ::: /dev/cuf01) ::::::: 7 Cycle No (Thread ::: /dev/cuf02) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) Exiting Thread ::: /dev/cuf03 Cycle No (Thread ::: /dev/cuf03) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent Port /dev/cuf01 is Opened 0x01 Sent Port /dev/cub01 is Opened 0x01 Sent Port /dev/cuf01 is Closed Port /dev/cuf02 is Closed Port /dev/cuf03 is Closed Port /dev/cuf04 is Closed Port /dev/cub01 is Closed Exiting Thread ::: /dev/cuf03 Exiting Thread ::: /dev/cuf02 Cycle No (Thread ::: /dev/cuf03) ::::::: 8 Cycle No (Thread ::: /dev/cuf02) ::::::: 8 Exiting Thread ::: /dev/cuf04 Exiting Thread ::: /dev/cuf01 Cycle No (Thread ::: /dev/cuf01) ::::::: 8 Cycle No (Thread ::: /dev/cuf04) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened 0x01 Sent Port /dev/cuf01 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 # # An error report file with more information is saved as hs_err_pid21386.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:19 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) > 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux > java -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except > lockfiles are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code >>>> and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm >>> running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From tjarvi at qbang.org Sat Aug 5 14:14:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 14:14:49 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: I'd stick a couple $15 dual port serial boards in the machine to see if its kernel driver specific. I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more problematic. They do not get the same number of eyes looking for problems. You could try putting #undef TIOCSERGETLSR #undef TIOCGICOUNT in the very top of SerialImp.h or one or the other to flip bits of code off and on. The kernel here is 2.6.11.4-20a-smp from Suse. glibc is 2.3.4-23.4 from Suse the jre is 1.5.0_06-b05 from Sun. The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC ram. You should be able to reproduce what I'm seeing then go from there. I don't think I'm going to see this problem without having the same cornercase hardware you have. Maybe we can work that out off the list but I doubt I'm going to find it in rxtx at this point. I have seen problems in the past were kernel structs don't match user space struct and bad things happen but I was including a kernel struct to get functionality that had not made its way into user space at the time. The only thing I may be missing is that when I write 0x01 out the port, nothing comes back. That was not specified but you could easily disconnect anything connected to the ports to see if that changes anything. rxtx is far from bug free but I do not see anything yet. On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I am able to constantly replicate almost everytime even when I have > locks disabled. Don't know the reason why you are not able to on your > environment. Any suggestions??????? > > > Cycle No (Thread ::: /dev/cuf04) ::::::: 7 > Cycle No (Thread ::: /dev/cuf01) ::::::: 7 > Cycle No (Thread ::: /dev/cuf02) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > Exiting Thread ::: /dev/cuf03 > Cycle No (Thread ::: /dev/cuf03) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > Port /dev/cuf01 is Opened > 0x01 Sent > Port /dev/cub01 is Opened > 0x01 Sent > Port /dev/cuf01 is Closed > Port /dev/cuf02 is Closed > Port /dev/cuf03 is Closed > Port /dev/cuf04 is Closed > Port /dev/cub01 is Closed > Exiting Thread ::: /dev/cuf03 > Exiting Thread ::: /dev/cuf02 > Cycle No (Thread ::: /dev/cuf03) ::::::: 8 > Cycle No (Thread ::: /dev/cuf02) ::::::: 8 > Exiting Thread ::: /dev/cuf04 > Exiting Thread ::: /dev/cuf01 > Cycle No (Thread ::: /dev/cuf01) ::::::: 8 > Cycle No (Thread ::: /dev/cuf04) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > 0x01 Sent > Port /dev/cuf01 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 > # > # An error report file with more information is saved as > hs_err_pid21386.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > Aborted > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:19 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Lockfiles are a compile time option. I've turned them on now, corrected > a mistake resulting in only 3 ports being used and now have it going > through a few hundred iterations again without a crash. > > To disable lockfiles.. > > ./configure --disable-lockfiles && make install > > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > Port /dev/ttyS5 is Closed > Exiting Thread ::: /dev/ttyS1 > Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: > /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting > Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port > /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS1 is Closed > Port /dev/ttyS4 is Closed > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > > > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, How can you turn off the lock files? I can try using that. I >> never tried that, I thought you can't turn off the file locking. >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:06 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> You may try 4 ports instead of 5 to make sure thats not the issue. >> >> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >> 2.6.11.4-20a-smp >> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >> java -version java version "1.5.0_06" >> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >> >> I'm using rxtx 2.1-7 (final) with default configuration except >> lockfiles are disabled. I gathered that you are doing your own > resource locking. >> >> ... >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> ... >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>> version >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:52 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> Whats a few times? I've got 4 ports here and have run it a few >>> thousand iterations. >>> >>> Is that true for you if you run it with just four of your DIGI ports? >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> You need to run it few times. More the number of ports, more >>>> frequently you can reproduce. With just 2 ports it will be hard to >>>> reproduce frequently. >>>> >>>> ~pk >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:33 PM >>>> To: Kharbanda, Pawan >>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>> Subject: Re: Port Locking / JVM Crashing >>>> >>>>> I am also attaching a Test Class to replicate the problem. You need > >>>>> to >>>> >>>>> modify the class and add your systems Serial ports into the code >>>>> and >> >>>>> execute. >>>>> >>>>> java TestOpenClosePort 100 >>>>> >>>>> It will open and close all the serial ports 100 times in there own >>>>> thread. >>>>> >>>>> Please let me know, I will be available thru out this weekend and >>>>> can >>> >>>>> help you as much as I can with testing. >>>>> >>>> >>>> How reproducable is the problem with the above testcase? I'm >>>> running >> >>>> 100's of iterations without reproducing the problem. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> >>> >> > From rtlane01 at comcast.net Tue Aug 1 19:22:03 2006 From: rtlane01 at comcast.net (Randall T. Lane) Date: Tue, 01 Aug 2006 21:22:03 -0400 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] Message-ID: <44CFFE3B.90001@comcast.net> Rxtx Community: Please see my e-mail to Trent. Does anyone have any experience using rxtx to successfully communicate with hardware via USB? Thanks. Randy Lane -------------- next part -------------- An embedded message was scrubbed... From: Trent Jarvi Subject: Re: Help with RxTx for USB Communication Date: Tue, 1 Aug 2006 18:49:13 -0600 (MDT) Size: 3300 Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060801/9bbbc255/HelpwithRxTxforUSBCommunication-0005.mht From naranjo.manuel at gmail.com Sun Aug 6 16:59:28 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Sun, 06 Aug 2006 19:59:28 -0300 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44CFFE3B.90001@comcast.net> References: <44CFFE3B.90001@comcast.net> Message-ID: <44D67450.8010100@gmail.com> Randy: I have been able to communicate to AIRcable USB Bluetooth Dongle, with success. I'm not sure which are the options that you have to send to RXTX library, but you can indeed. Check that you do not have the port avaible for much long. I have heard of a problem with WinXP that it simply turn off virtual ports when they are too much long with out activity. If you want I can send you my code, because it is avaible under GPL, the new release is not avaible at AIRcable web site, but it should in short time. Regards, Manu > Rxtx Community: > > Please see my e-mail to Trent. Does anyone have any experience using > rxtx to successfully communicate with hardware via USB? > > Thanks. > > Randy Lane > > ------------------------------------------------------------------------ > > Asunto: > Re: Help with RxTx for USB Communication > De: > Trent Jarvi > Fecha: > Tue, 1 Aug 2006 18:49:13 -0600 (MDT) > Para: > "Randall T. Lane" > > Para: > "Randall T. Lane" > CC: > taj at www.linux.org.uk > > > On Tue, 1 Aug 2006, Randall T. Lane wrote: > >> Trent, >> >> I am working on a project written in Java (1.5) and need to >> communicate to an external device via a USB port. >> >> I have downloaded rxtx-2.1-7-bins-r2.zip from www.rxtx.org and setup >> a Java test project to learn how to use rxtx. I am able to list the >> serial ports available, however rxtx does not recognize my USB port. >> I am running on Windows XP. Here is some output from my test project >> ... >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> COM1 - Serial >> COM3 - Serial >> LPT1 - Parallel >> >> I would appreciate any help you could provide in getting rxtx to >> allow me to communicate via my USB port. >> >> Here is my code, if that would help. >> >> public static void main(String[] args) { >> listPorts(); >> // The listPorts() and getPortTypeName() methods are used for >> port identification. >> static void listPorts() >> { >> Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); >> while ( portEnum.hasMoreElements() ) >> { >> CommPortIdentifier portIdentifier = (CommPortIdentifier) >> portEnum.nextElement(); >> System.out.println(portIdentifier.getName() + " - " + >> getPortTypeName(portIdentifier.getPortType()) ); >> } } >> static String getPortTypeName ( int portType ) >> { >> switch ( portType ) >> { >> case CommPortIdentifier.PORT_I2C: >> return "I2C"; >> case CommPortIdentifier.PORT_PARALLEL: >> return "Parallel"; >> case CommPortIdentifier.PORT_RAW: >> return "Raw"; >> case CommPortIdentifier.PORT_RS485: >> return "RS485"; >> case CommPortIdentifier.PORT_SERIAL: >> return "Serial"; >> default: >> return "unknown type"; >> } >> } >> >> Thanks. >> >> Randy Lane >> > > Hi Randy > > The rxtx mail list is a better place to ask as there are more eyes. > I'm swamped with work. > > Be sure to look to see that your serial port dongle shows up as a > serial port in device manager and no other applications have it open. > USB serial dongles do work with rxtx. Some are less complete than > others. > > -- > Trent Jarvi > tjarvi at qbang.org > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From eddythejekyll at gmail.com Sun Aug 6 23:31:45 2006 From: eddythejekyll at gmail.com (Ed) Date: Sun, 6 Aug 2006 23:31:45 -0600 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? Message-ID: I have written a simple client server (RMI) application without using RxTx where the server controls a parallel port simply by addressing the port and banging the bits in order to drive a relay. It also reads the port's. I am doing this by making Runtime.exec calls to a binary that actually does the parallel port bit banging and reading. However, I'd like to use RxTx so it is a pure Java application, and I've so far installed and figured out how to discover the ports, but I'm having trouble finding good examples or some howto type documentation for this. I did find the two examples on the Wiki: one for serial IO and the other to discover the ports on a system. As I said, I have so far installed RxTx and gotten it to compile and run and I can identify the ports. When I run the server I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found Ports! Found port COM1 Found port COM3 Found port LPT1 LPT1 Not Currently owned EASSwitch Server starting. EASSwitch is bound. Server Ready. So it looks like thing are installed and working, but I feel all dressed up and no idea how to proceed. Basically, I just want to be able to toggle the data lines on the parallel port and read them. Very simple. No parallel printer type usage. Are there any examples I can work off of? If so, please advise. Thank you. -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060806/c7e39898/attachment-0005.html From hambyiii at hotmail.com Sun Aug 6 23:53:54 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Mon, 07 Aug 2006 05:53:54 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Message-ID: Hi, sorry I took the weekend to reply, but I was away for the last couple of days. Unfortunately I cannot send the full stack trace yet. The problem is not, unfortunately, happening on my computer, but on a clients computer, which I will go and visit today. I will hopefully be able to get a stack trace then. As to the physical connection, tt is indeed a USB from the computer, connected to a 9 pin serial device that connects to the hard-ware. My java version is 1.5.06 >From: "Kharbanda, Pawan" >Reply-To: RXTX Developers and Users >To: "RXTX Developers and Users" >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 09:15:24 -0600 > >Keith, > Please send the full stack trace of the exception, may be I can help >you. On Trent's question regarding physical 'Serial Port', do you mean >you have a USB(Connected to Client Machine) to 9 Pin Serial >cable(Connected to H/W device)? > >Also please mention which java version you are using? > >Thanks >Pawan Kharbanda > > >-----Original Message----- >From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >Of Keith Thorne >Sent: Friday, August 04, 2006 7:52 AM >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream > >The physical serial port is actually a USB connection that is then >changed to a "virtual serial port", so I can use the serial port >protocols to connect to it. The other end of the connection is a >hardware device that is constantly turned on. I am not sure about the >port 'vanishing'...we have another piece of software that came with the >hardware device, which we can test the device (and with it the virtual >serial port) with. This has no problem connecting to the serial port or >writing to/reading from the device. >It is only when my software is run, that the error occurs. Like I have >said, my software (using rxtx) is connecting to the serial port >successfully, but it is when I try and write to the serial port that I >get the error. > >Although to be truthful, I am not absolutely certain if the error is >happening on the oStream.write() or the oStream.flush(). I only think it >is the write(), because that is where the writeArray() function is >called. > >thanks >Keith > > > >From: Trent Jarvi > >Reply-To: RXTX Developers and Users > >To: RXTX Developers and Users > >Subject: Re: [Rxtx] error getting InputStream > >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > > > > >Hi Keith > > > >Can you tell us more about the physical serial port? Might it be > >'vanishing?' > > > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > > > Hi, > > > > > > I know I am replying to myself a lot at the moment, but more > > > information > >has > > > come to light (These errors are actually happening on a client > > > machine, > >on > > > software that has worked for the past month, and only now has > > > started to fail, which is why I am a little slow finding things out) > > > > > > The errors I have already written about are only symptoms of an > > > orignal error. The original error occurs the first time I try to > > > WRITE thte > > > OutputStream: > > > > > > OutputStream oStream = serialPort.getOutputStream(); > > > serialPort.notifyOnOutputEmpty(true); > > > > > > byte[] bs = encodeMessage(configString.toString()); > > > > > > oStream.write(bs); > > > oStream.flush(); > > > > > > The error occurs on oStream.write(bs); and is: > > > > > > Input/output error in writeArray > > > > > > Now writeArray is native code, so I have no idea what is going on >there. > >Any > > > help would be appreciated > > > Thanks > > > Keith > > > > > > > > >> From: "Keith Thorne" > > >> Reply-To: RXTX Developers and Users > > >> To: rxtx at qbang.org > > >> Subject: Re: [Rxtx] error getting InputStream > > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > > >> > > >> Okay, I made a little mistake in my last message. > > >> > > >> The error is not occuring where I thought it was. Instead it is > >occuring > > >> when I do the following: > > >> > > >> byte[] readBuffer = new byte[128]; > > >> > > >> try { > > >> > > >> int numBytes = 0; > > >> try { > > >> Thread.sleep(500); > > >> } > > >> catch (InterruptedException e) > > >> {} > > >> > > >> while (inputStream.available() > 0) > > >> { > > >> numBytes = inputStream.read(readBuffer); > > >> } > > >> > > >> processReceivedData(readBuffer, numBytes); } catch (IOException > > >> e) { > > >> System.out.println(e.getMessage()); > > >> } > > >> > > >> So I guess the error is happening on the > > >> inputStream.read(readBuffer) > > >> > > >> again, any help is appreciated and again, thanks in advance Keith > > >> > > >>> From: "Keith Thorne" > > >>> Reply-To: RXTX Developers and Users > > >>> To: rxtx at qbang.org > > >>> Subject: [Rxtx] error getting InputStream > > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > > >>> > > >>> Hi, > > >>> > > >>> I have written a program in Java for Windows xp using RXTX (which > > >>> is > >why > > >> I > > >>> am using this mailing list :). However, I am getting a problem. I > > >>> am connecting to a serial port, like so: > > >>> private CommPortIdentifier portID; > > >>> > > >>> private boolean openPort(String selectedPort) > > >>> { > > >>> boolean portFound = false; > > >>> Enumeration portList; > > >>> > > >>> portList = CommPortIdentifier.getPortIdentifiers(); > > >>> > > >>> while (portList.hasMoreElements()) > > >>> { > > >>> portID = (CommPortIdentifier) portList.nextElement(); > > >>> if (portID.getPortType() == > >CommPortIdentifier.PORT_SERIAL) > > >>> { > > >>> if (portID.getName().equals(selectedPort)) > > >>> { > > >>> portFound = true; > > >>> break; > > >>> } > > >>> } > > >>> } > > >>> > > >>> return portFound; > > >>> } > > >>> > > >>> and then I try and get the serial port input stream (leaving out > > >>> the > >try > > >>> and > > >>> catch for the sake of space): > > >>> > > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", > >2000); > > >>> InputStream inputStream = serialPort.getInputStream(); > > >>> > > >>> but on the getInputStream() I get the following error message: > > >>> > > >>> Bad file descriptor in nativeavailable > > >>> > > >>> I cannot figure out where it is going wrong...anyone any ideas. A > >quick > > >>> answer would be wonderful, as I am kinda under the hammer to get > > >>> this > > >> fixed > > >>> quickly > > >>> > > >>> Thanks in Advance > > >>> Keith > > >>> > > >>> > > >>> _______________________________________________ > > >>> Rxtx mailing list > > >>> Rxtx at qbang.org > > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > > >> > > >> > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Aug 7 06:22:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:22:03 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: Hmm.. I left the test running went I went home Saturday. It looks like something did show up after ~30k iterations. I'll look at it more in my free time. Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS5 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 29417 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 29417 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 29417 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00002aab14c2ec63, pid=20573, tid=1095125344 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6c63] initialise_event_info_struct+0x63 # [thread 1087756640 also had an error] Port /dev/ttyS5 is Opened 0x01 Sent [thread 1089861984 also had an error] Port /dev/ttyS4 is Opened 0x01 Sent [thread 1090914656 also had an error] # An error report file with more information is saved as [thread 1090914656 also had an error] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted On Sat, 5 Aug 2006, Trent Jarvi wrote: > > I'd stick a couple $15 dual port serial boards in the machine to see if its > kernel driver specific. > > I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more > problematic. They do not get the same number of eyes looking for problems. > > You could try putting > > #undef TIOCSERGETLSR > #undef TIOCGICOUNT > > in the very top of SerialImp.h or one or the other to flip bits of code off > and on. > > The kernel here is 2.6.11.4-20a-smp from Suse. > glibc is 2.3.4-23.4 from Suse > the jre is 1.5.0_06-b05 from Sun. > > The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC > ram. > > You should be able to reproduce what I'm seeing then go from there. I don't > think I'm going to see this problem without having the same cornercase > hardware you have. Maybe we can work that out off the list but I doubt I'm > going to find it in rxtx at this point. > > I have seen problems in the past were kernel structs don't match user space > struct and bad things happen but I was including a kernel struct to get > functionality that had not made its way into user space at the time. > > The only thing I may be missing is that when I write 0x01 out the port, > nothing comes back. That was not specified but you could easily disconnect > anything connected to the ports to see if that changes anything. > > rxtx is far from bug free but I do not see anything yet. > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, >> I am able to constantly replicate almost everytime even when I have >> locks disabled. Don't know the reason why you are not able to on your >> environment. Any suggestions??????? >> >> >> Cycle No (Thread ::: /dev/cuf04) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> Exiting Thread ::: /dev/cuf03 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> Port /dev/cuf01 is Opened >> 0x01 Sent >> Port /dev/cub01 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Closed >> Port /dev/cuf02 is Closed >> Port /dev/cuf03 is Closed >> Port /dev/cuf04 is Closed >> Port /dev/cub01 is Closed >> Exiting Thread ::: /dev/cuf03 >> Exiting Thread ::: /dev/cuf02 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 8 >> Exiting Thread ::: /dev/cuf04 >> Exiting Thread ::: /dev/cuf01 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf04) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 >> # >> # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 >> # >> # An error report file with more information is saved as >> hs_err_pid21386.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> Aborted >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:19 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Lockfiles are a compile time option. I've turned them on now, corrected >> a mistake resulting in only 3 ports being used and now have it going >> through a few hundred iterations again without a crash. >> >> To disable lockfiles.. >> >> ./configure --disable-lockfiles && make install >> >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> Port /dev/ttyS5 is Closed >> Exiting Thread ::: /dev/ttyS1 >> Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: >> /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting >> Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port >> /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> >> >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, How can you turn off the lock files? I can try using that. I >>> never tried that, I thought you can't turn off the file locking. >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 1:06 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> You may try 4 ports instead of 5 to make sure thats not the issue. >>> >>> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >>> 2.6.11.4-20a-smp >>> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >>> java -version java version "1.5.0_06" >>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >>> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >>> >>> I'm using rxtx 2.1-7 (final) with default configuration except >>> lockfiles are disabled. I gathered that you are doing your own >> resource locking. >>> >>> ... >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> Port /dev/ttyS4 is Closed >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> ... >>> >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>>> version >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:52 PM >>>> To: Kharbanda, Pawan >>>> Cc: Trent Jarvi; RXTX Developers and Users >>>> Subject: RE: Port Locking / JVM Crashing >>>> >>>> >>>> Whats a few times? I've got 4 ports here and have run it a few >>>> thousand iterations. >>>> >>>> Is that true for you if you run it with just four of your DIGI ports? >>>> >>>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>>> >>>>> You need to run it few times. More the number of ports, more >>>>> frequently you can reproduce. With just 2 ports it will be hard to >>>>> reproduce frequently. >>>>> >>>>> ~pk >>>>> >>>>> -----Original Message----- >>>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>>> Sent: Saturday, August 05, 2006 12:33 PM >>>>> To: Kharbanda, Pawan >>>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>>> Subject: Re: Port Locking / JVM Crashing >>>>> >>>>>> I am also attaching a Test Class to replicate the problem. You need >> >>>>>> to >>>>> >>>>>> modify the class and add your systems Serial ports into the code >>>>>> and >>> >>>>>> execute. >>>>>> >>>>>> java TestOpenClosePort 100 >>>>>> >>>>>> It will open and close all the serial ports 100 times in there own >>>>>> thread. >>>>>> >>>>>> Please let me know, I will be available thru out this weekend and >>>>>> can >>>> >>>>>> help you as much as I can with testing. >>>>>> >>>>> >>>>> How reproducable is the problem with the above testcase? I'm >>>>> running >>> >>>>> 100's of iterations without reproducing the problem. >>>>> >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> >>>> >>> >> > From iinjlv01 at gmail.com Mon Aug 7 06:22:07 2006 From: iinjlv01 at gmail.com (J LV) Date: Mon, 7 Aug 2006 14:22:07 +0200 Subject: [Rxtx] Data lost or Slow sampling Message-ID: Hello I am using RXTX to comm with a motion controller using Serial Port and i can write the commands using SerialPort or RXTXPort without problems, but when i try write and read at high sampling rate, for example to know the position and speed at every moment of a trajectory, i obtain a very irregular response times. I am using the most simple algorimth: 1-Write the command "is trajectory finished?" and wait for SerialPortEvent.DATA_AVAILABLE 2-Read the InputStreamReader of serial port while not empty 3-If trajectory finished then stop program, else, continue 4-Read actual time using System.currentTimeMillis() (t0) 5-Write the command "give me position" and wait for SerialPortEvent.DATA_AVAILABLE 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) 7-Read the InputStreamReader of serial port while not empty 8-Save position in Vector or ArrayList and repeat from 1 I don't know if the problem is the RXTX, my program or the motion controller hardware but i have response times from 16 millis to 78 millis at 19200 bauds!. I am using SwingWorked to threading SerialPort reading/writing process. Any idea or similar data leak problem? Thanks for RXTX project and sorry for my badde english! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/909a4cb3/attachment-0005.html From tjarvi at qbang.org Mon Aug 7 06:50:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:50:10 -0600 (MDT) Subject: [Rxtx] Data lost or Slow sampling In-Reply-To: References: Message-ID: On Mon, 7 Aug 2006, J LV wrote: > Hello > > I am using RXTX to comm with a motion controller using Serial Port and i can > write the commands using SerialPort or RXTXPort without problems, but when i > try write and read at high sampling rate, for example to know the position > and speed at every moment of a trajectory, i obtain a very irregular > response times. I am using the most simple algorimth: > 1-Write the command "is trajectory finished?" and wait for > SerialPortEvent.DATA_AVAILABLE > 2-Read the InputStreamReader of serial port while not empty > 3-If trajectory finished then stop program, else, continue > 4-Read actual time using System.currentTimeMillis() (t0) > 5-Write the command "give me position" and wait for > SerialPortEvent.DATA_AVAILABLE > 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) > 7-Read the InputStreamReader of serial port while not empty > 8-Save position in Vector or ArrayList and repeat from 1 > > > I don't know if the problem is the RXTX, my program or the motion controller > hardware but i have response times from 16 millis to 78 millis at 19200 > bauds!. I am using SwingWorked to threading SerialPort reading/writing > process. > > Any idea or similar data leak problem? > > Thanks for RXTX project and sorry for my badde english! > This can be platform dependant. What you may do for a starting point is use a loopback connection and time the same thing at 19200. Write the date, wait for data available, read the data. I would expect from write to data available to take around 10 ms from past experiences. You can experiment with turning on and off buffering in the port settings of the OS, if the OS supports more realtime like interrupts, that could help. You have a java schedual and the kernel schedual. Serial interrupts traditionally have very high priority but modern OSs tend to realize thats not good for GUIs, ... and delay responding to the interrupts. You should be able to have usec response times in a realtime OS. Windows and Linux are not typically setup as realtime OSs. For comparison, the last time I looked which was about 5 years ago, windows NT4 came back with data available in 8 ms and Linux came back in 10 ms. I would be interested in seeing what you get today. -- Trent Jarvi tjarvi at qbang.org From gergg at cox.net Mon Aug 7 09:21:56 2006 From: gergg at cox.net (Gregg Wonderly) Date: Mon, 07 Aug 2006 10:21:56 -0500 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? In-Reply-To: References: Message-ID: <44D75A94.9030205@cox.net> Ed wrote: > Are there any examples I can work off of? If so, please advise. Just read the javax.comm javadocs. You need to take the parallel port and write values to it based on which bits of which lines you want on and off. Gregg Wonderly From pete.flugstad at gmail.com Mon Aug 7 09:36:19 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 7 Aug 2006 10:36:19 -0500 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44D67450.8010100@gmail.com> References: <44CFFE3B.90001@comcast.net> <44D67450.8010100@gmail.com> Message-ID: <84d4a6d50608070836v97e9a29q96e98441ea903ac7@mail.gmail.com> FYI, I'm talking to a USB<->Serial dongle just fine under Windows XP Pro. I did have to install a driver for the thing - Windows XP by default, did not recognize it. Once installed, it just showed up as another COM port, and I've been pushing data over it with no problems. Pete From savagobr at yahoo.com Mon Aug 7 10:13:06 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Mon, 7 Aug 2006 09:13:06 -0700 (PDT) Subject: [Rxtx] Port Locking / JVM Crashing: 2 ports (Serial + usb) Message-ID: <20060807161306.9648.qmail@web53803.mail.yahoo.com> Trent This is curious, since I did reproduced the aformentioned bug using only 2 ports: /dev/ttyS0 and /dev/ttyUSB0. It only need to run for 500 times: $ java -cp . TestOpenClosePort 500 500 Port /dev/ttyS0 is Closed Excpetion ::: Thread ::: /dev/ttyUSB0null Exiting Thread ::: /dev/ttyUSB0 Cycle No (Thread ::: /dev/ttyUSB0) ::::::: 227 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 184 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x203d2044, pid=32368, tid=2986859424 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing) # Problematic frame: # C 0x203d2044 # # An error report file with more information is saved as /tmp/hs_err_pid32368.log # # If you would like to submit a bug report, please visit: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Best regards Savago ps: Test environment $ uname -a Linux localhost.localdomain 2.6.15-1.2054_FC5 #1 Tue Mar 14 15:48:33 EST 2006 i686 i686 i386 GNU/Linux $ java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) $gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.1 20060525 (Red Hat 4.1.1-1) --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/c6ca8094/attachment-0005.html From Pawan.Kharbanda at dot.state.co.us Mon Aug 7 17:23:25 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 7 Aug 2006 17:23:25 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Trent, I think I got the problem fixed after some code changes in the C (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the staging environment (with 10 devices) with real time data and haven't seen a JVM lock/ Port locking since last night. I am going to do further stress testing and will send all my code changes and my findings in next few days. I believe the problem was causing due to the digi drivers and how the Linux kernel talked to it, so after making some code changes and synchronization fixes, I got it to work. I am keeping my fingers crossed :) Thanks for all your help. You have been a great help. Will keep you posted. Cheers ~pk PS : We are going to test my new RXTX changes with the 2.6 Red Hat kernel (currently using 2.4.21-37.ELsmp) too. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 5:08 PM To: Kharbanda, Pawan Subject: RE: Port Locking / JVM Crashing Hi Pawan As mentioned I did reproduce the error but after several hours of cycles. I'm looking at RXTXPort.java and thinking about what may be happening. The error is in the C layer but it may be preventable in the java code. lets say two closes are overlapping or an operation is trying to happen while another port is closing. The structure may be out of sync by the time the code using the structure in another thread gets to the event info struct. So I'm wondering if synchronization in RXTXPort() and close() may help you. A second thing that may help is you can put printf("got here\n"); in each of the lines in initialize event info struct to verify that the problem is in walking the linked list. Thats my suspicion. So a properly timed close() while calling the constructor may be catching rxtx off guard. You can synchronize to test that and it may do away with the problem. From tjarvi at qbang.org Mon Aug 7 18:01:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 18:01:54 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Message-ID: Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do further > stress testing and will send all my code changes and my findings in next > few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to happen > while another port is closing. The structure may be out of sync by the > time the code using the structure in another thread gets to the event > info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may do > away with the problem. > From Pawan.Kharbanda at dot.state.co.us Tue Aug 8 13:49:14 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 8 Aug 2006 13:49:14 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Trent, I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and have absolutely no problem with JVM crashing or Port Locking even after 10000 operations (now I am trying 100,000 :). This is all with the original RXTX 2.1.7 (final) api's without any of my fixes that I have been trying for last 2-3 weeks. I will suggest that we update the INSTALL or Readme file accompnying the RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: 82000685_G 02/02/2006). This should helped everybody using the RXTX API's with RedHat Linux atleast. Regards Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 6:02 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do > further stress testing and will send all my code changes and my > findings in next few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers > crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to > happen while another port is closing. The structure may be out of > sync by the time the code using the structure in another thread gets > to the event info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may > do away with the problem. > From jimo at earthlink.net Wed Aug 9 21:21:00 2006 From: jimo at earthlink.net (Jim Owen) Date: Wed, 9 Aug 2006 20:21:00 -0700 Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat Message-ID: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Hi All, I've run into some difficulties with rxtx that have me baffled and need some help. I have an application that has used earlier versions of rxtx successfully and on a variety of platforms. We recently needed to deploy this application into an environment where we could not utilize lock files. I pulled down the 2.0.7 pre1 source distribution and executed configure with --disable-lockfiles. I then executed make and make install. When I execute the program, as root, I get the following error: ************************************************************************ Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) # Problematic frame: # C 0x00001004 # # An error report file with more information is saved as hs_err_pid20151.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # **************************************************************************** If I execute as a normal user, I get no errors, but no ports listed: (Using an earlier version, I get a serial and parallel port listed.) **************************************************************************** [jim at linuxDev ingenicoApp]$ java VerifyCommBuild Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Some ports appear to have been found, let's try to enumerate them. Complete. **************************************************************************** When I built rxtx, there was a warning given of the following: **************************************************************************** conftest.c: In function 'main': conftest.c:6: warning: incompatible implicit declaration of built-in function 'printf' conftest.c:7: warning: incompatible implicit declaration of built-in function 'exit' WARNING: Kernel include files do not match the current kernel **************************************************************************** uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux JAVA_HOME=/usr/java/j2sdk1.4.2_11 javax.comm.properties: Driver=gnu.io.RXTXCommDriver Here's the code for VerifyCommBuild.java that I'm using to test: **************************************************************************** import javax.comm.*; import java.util.Enumeration; /** * A quick app to check that the javax.comm (Serial) Communications extension has been properly * installed and configured on this machine. * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. */ public class VerifyCommBuild { public static void main(String args[]) { Enumeration ports; System.out.println("Verifying Comm Build Environment"); try { ports = CommPortIdentifier.getPortIdentifiers(); if (ports == null) { System.out.println("No comm ports found!"); return; } System.out.println("Some ports appear to have been found, let's try to enumerate them."); while (ports.hasMoreElements()) { System.out.println("Here is a port [" + ((CommPortIdentifier)ports.nextElement()).getName() + "]"); } } catch (Exception e) { System.out.println("Failed to enumerate ports [" + e.getMessage() + "]"); e.printStackTrace(); } System.out.println("Complete."); } } **************************************************************************** Any suggestions as to what I'm missing? Thanks, Jim Owen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060809/92503a81/attachment-0005.html From tjarvi at qbang.org Thu Aug 10 05:39:36 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 05:39:36 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Message-ID: On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even after > 10000 operations (now I am trying 100,000 :). This is all with the > original RXTX 2.1.7 (final) api's without any of my fixes that I have > been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying the > RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp > and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From oliver.archner at bayceer.uni-bayreuth.de Wed Aug 9 06:13:36 2006 From: oliver.archner at bayceer.uni-bayreuth.de (Oliver Archner) Date: Wed, 09 Aug 2006 14:13:36 +0200 Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() Message-ID: <44D9D170.5020806@bayceer.uni-bayreuth.de> Dear Users, i would like to send a byte to a parallel device. The following piece of code works well but throws an IOException in LPRPort$ParallelOutputStream.write() saying that everything is ok ?! Oliver import java.io.*; import gnu.io.*; public class Test { public static void main(String[] args) { RXTXCommDriver TxPort = new RXTXCommDriver(); ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", CommPortIdentifier.PORT_PARALLEL); OutputStream oStream = null; try { oStream = pPort.getOutputStream(); oStream.write((byte)0x51); } catch (IOException e) { e.printStackTrace(); } finally { try { if (oStream != null) oStream.close(); } catch (IOException e) { e.printStackTrace(); } } } } Output: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Der Vorgang wurde erfolgreich beendet. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at Test.main(Test.java:12) From tjarvi at qbang.org Thu Aug 10 18:12:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 18:12:27 -0600 (MDT) Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() In-Reply-To: <44D9D170.5020806@bayceer.uni-bayreuth.de> References: <44D9D170.5020806@bayceer.uni-bayreuth.de> Message-ID: On Wed, 9 Aug 2006, Oliver Archner wrote: > Dear Users, > > i would like to send a byte to a parallel device. > The following piece of code works well but throws an IOException in > LPRPort$ParallelOutputStream.write() saying that everything is ok ?! > > Oliver > > > import java.io.*; > import gnu.io.*; > > public class Test { > > public static void main(String[] args) { > RXTXCommDriver TxPort = new RXTXCommDriver(); > ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", > CommPortIdentifier.PORT_PARALLEL); > OutputStream oStream = null; > try { > oStream = pPort.getOutputStream(); > oStream.write((byte)0x51); > } catch (IOException e) { > e.printStackTrace(); > } finally { > try { > if (oStream != null) oStream.close(); > } catch (IOException e) { > e.printStackTrace(); > > } > } > > } > } > > Output: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Der Vorgang wurde erfolgreich beendet. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at Test.main(Test.java:12) WriteFile is returning a negative value or 0. I do not know what that exception is saying but it should be an IO Exception. The native code in question is line 405 in ParallelImp.c. If you find the documentation pointing out how the code is wrong, we can fix it. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 08:12:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 09:12:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question Message-ID: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Hello, I'm trying to send data over a serial port using the RXTX libraries. I've got the binaries for Windows XP from qbang.org. On the receiving side, I'm using event notification (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial Ports InputStream. Similarly on the transmist side, I use SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. First question: does this make sense? The code was largely adopted from an existing Windows C++ program and that's more or less how it operated (overlapped io using ReadFile, WriteFile, GetOverlappedResult, Events, etc). Second question: in a small standalone test program I wrote, everything seems to work just fine - whenever SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good chunk of data available (I explicitly set the in/out buffers to 1024 bytes) to read. However, when I pull my "library" into a much larger environment (OSGI framework based, but same JVM/OS/etc), whenever SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a byte or two available. Needless to say, this really kills performance. Everything appears to still operate properly, just really, really slowly. So, has anyone seen this problem before? I haven't dived into the details of RXTX library, and I'm wondering what the mechanism is here? How does the RXTX thread determine when to issue the SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to tweak in RXTX or the JVM to get this to operate more like the small test program? Seems like I want RXTX to call me back _less_ often. Thanks, Pete From tjarvi at qbang.org Fri Aug 11 09:55:23 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 09:55:23 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Hello, > > I'm trying to send data over a serial port using the RXTX > libraries. I've got the binaries for Windows XP from qbang.org. > > On the receiving side, I'm using event notification > (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial > Ports InputStream. Similarly on the transmist side, I use > SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. > > First question: does this make sense? The code was largely adopted > from an existing Windows C++ program and that's more or less how it > operated (overlapped io using ReadFile, WriteFile, > GetOverlappedResult, Events, etc). > > Second question: in a small standalone test program I wrote, > everything seems to work just fine - whenever > SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good > chunk of data available (I explicitly set the in/out buffers to 1024 > bytes) to read. > > However, when I pull my "library" into a much larger environment > (OSGI framework based, but same JVM/OS/etc), whenever > SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a > byte or two available. Needless to say, this really kills > performance. Everything appears to still operate properly, just > really, really slowly. > > So, has anyone seen this problem before? I haven't dived into the > details of RXTX library, and I'm wondering what the mechanism is here? > How does the RXTX thread determine when to issue the > SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to > tweak in RXTX or the JVM to get this to operate more like the small > test program? > Seems like I want RXTX to call me back _less_ often. > Hi Pete RXTX is doing overlapped IO in termios.c. In this file we map the windows functionality to termios (mostly POSIX). From there, we just talk termios to all platforms. What I guess is happening is the eventloop is waiting a specified amount of time. As you application uses more cpu cycles, you observe the difference in behavior. You could go into the C code and change this after looking at the eventLoop() code in serialImp.c and following that to the serial_ioctl() and serial_select() in termios.c Another option is to go into RXTXPort.java and put a sleep in the sendEvent() code. This way you would not have to recompile the native code (not very easy at this point). -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 13:27:36 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:27:36 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > Another option is to go into RXTXPort.java and put a sleep in the > sendEvent() code. This way you would not have to recompile the native > code (not very easy at this point). Are the instructions in the INSTALL file still valid? If so, it wasn't very hard to build it (I already had MinGW installed). Everything seemed to build just fine. Haven't tried to install/use it yet, but it wasn't a big deal (assuming those instructions were correct. Thanks, Pete From pete.flugstad at gmail.com Fri Aug 11 13:42:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:42:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, but there doesn't appear to be a way to select that via RXTX (which appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control is selected). Is there a way I'm not seeing? Thanks, Pete From eddythejekyll at gmail.com Fri Aug 11 15:20:44 2006 From: eddythejekyll at gmail.com (Ed) Date: Fri, 11 Aug 2006 15:20:44 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion Message-ID: I'm trying to read and write a parallel port on a standard (Dell) pc running RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. I'm having problems getting rxtx to return a port enumeration from getPortIdentifiers. I'm using a file PortChooser.java as a test file to get things going. This is from the Java CookBook 2nd edition (Chapter 12). The call // get list of ports available on this particular computer, // by calling static method in CommPortIdentifier. Enumeration pList = CommPortIdentifier.getPortIdentifiers(); returns a null pList; I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and compile without --disable-lockfiles I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ... When I compile with --disable-lockfiles the call to getPortIdentifiers simply returns a null Enumeration. I've read the documention and threads about this issue and I feel like I've tried everything, so at the moment I'm stumped. I can supply any further info that may help. Thanks in advance. Ed -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060811/80c4eeec/attachment-0005.html From tjarvi at qbang.org Fri Aug 11 18:29:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:29:48 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > On 8/11/06, Trent Jarvi wrote: >> Another option is to go into RXTXPort.java and put a sleep in the >> sendEvent() code. This way you would not have to recompile the native >> code (not very easy at this point). > > Are the instructions in the INSTALL file still valid? If so, it > wasn't very hard to build it > (I already had MinGW installed). Everything seemed to build just > fine. Haven't tried to install/use it yet, but it wasn't a big deal > (assuming those instructions were correct. > Hi Pete The instructions are correct. You will want to make sure that the exports worked. If the library does not work properly, then the exports failed. The exports are currently generated with nm, sed and grep in the Makefile which is often commented out. If the def file is old, it will cause problems. You should be good to go then. Look at the serial_select and eventLoop code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:33:32 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:33:32 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > but there doesn't appear to be a way to select that via RXTX (which > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > is selected). > > Is there a way I'm not seeing? > Hi Pete I'm guessing I didn't know the difference. At the time, I really didn't have windows API documentation. I just had some pages I found with altivista/google. Later microsoft made their documentation available on msdn or I learned about it. For rxtx, the calls need to be platform neutral. So if you see how to do each in termios, then we can get it going. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:45:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:45:24 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Fri, 11 Aug 2006, Ed wrote: > I'm trying to read and write a parallel port on a standard (Dell) pc running > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. > > I'm having problems getting rxtx to return a port enumeration from > getPortIdentifiers. I'm using a file > PortChooser.java as a test file to get things going. This is from the Java > CookBook 2nd edition (Chapter 12). The call > > // get list of ports available on this particular computer, > // by calling static method in CommPortIdentifier. > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > returns a null pList; > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and > compile without --disable-lockfiles I get: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > ... > > When I compile with --disable-lockfiles the call to getPortIdentifiers > simply returns a null Enumeration. > > I've read the documention and threads about this issue and I feel like I've > tried everything, so at the moment I'm stumped. > > I can supply any further info that may help. > > Thanks in advance. > > Ed > Hi Ed You may want to check the permissions of /dev/lp*. Also make sure lp or your kernel support for lp is loaded. It should show up in dmesg and lsmod. For my laptop with no printer port enabled in BIOS is see: lp: driver loaded but no devices found in desg |grep lp [] $ ls -l /dev/lp* crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 here root and group lp can read and write. Normal users cannot. Try a simple read as a user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: Permission denied Fix as root [] chmod 666 /dev/lp* [] $ ls -l /dev/lp* crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 Now as user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: No such device or address So this is saying there is no lp0 on my laptop. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:58:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:58:31 -0600 (MDT) Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat In-Reply-To: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> References: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Message-ID: On Wed, 9 Aug 2006, Jim Owen wrote: > Hi All, > > I've run into some difficulties with rxtx that have me baffled and need > some help. > > I have an application that has used earlier versions of rxtx > successfully and on a variety of platforms. We recently needed to deploy > this application into an environment where we could not utilize lock files. > > I pulled down the 2.0.7 pre1 source distribution and executed configure > with --disable-lockfiles. I then executed make and make install. > > When I execute the program, as root, I get the following error: > > ************************************************************************ > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) > # Problematic frame: > # C 0x00001004 > # > # An error report file with more information is saved as hs_err_pid20151.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > **************************************************************************** > > If I execute as a normal user, I get no errors, but no ports listed: > (Using an earlier version, I get a serial and parallel port listed.) > > **************************************************************************** > [jim at linuxDev ingenicoApp]$ java VerifyCommBuild > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Some ports appear to have been found, let's try to enumerate them. > Complete. > **************************************************************************** > > When I built rxtx, there was a warning given of the following: > > **************************************************************************** > conftest.c: In function 'main': > conftest.c:6: warning: incompatible implicit declaration of built-in > function 'printf' > conftest.c:7: warning: incompatible implicit declaration of built-in > function 'exit' > > WARNING: Kernel include files do not match the current kernel > **************************************************************************** > > > uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 > Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux > > JAVA_HOME=/usr/java/j2sdk1.4.2_11 > > javax.comm.properties: Driver=gnu.io.RXTXCommDriver > > Here's the code for VerifyCommBuild.java that I'm using to test: > > > **************************************************************************** > import javax.comm.*; > import java.util.Enumeration; > /** > * A quick app to check that the javax.comm (Serial) Communications > extension has been properly > * installed and configured on this machine. > * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. > */ > public class VerifyCommBuild > { > public static void main(String args[]) > { > Enumeration ports; > System.out.println("Verifying Comm Build Environment"); > try > { > ports = CommPortIdentifier.getPortIdentifiers(); > if (ports == null) > { > System.out.println("No comm ports found!"); > return; > } > System.out.println("Some ports appear to have been found, let's > try to enumerate them."); > while (ports.hasMoreElements()) > { > System.out.println("Here is a port [" + > ((CommPortIdentifier)ports.nextElement()).getName() > + "]"); > } > } catch (Exception e) > { > System.out.println("Failed to enumerate ports [" + > e.getMessage() + "]"); > e.printStackTrace(); > } > System.out.println("Complete."); > } > } > Hi Jim This is a new one to me. Have you tried it on another system. Maybe something isnt sane in your toolchain. -- Trent Jarvi tarvi at qbang.org From eddythejekyll at gmail.com Sat Aug 12 11:45:39 2006 From: eddythejekyll at gmail.com (Ed) Date: Sat, 12 Aug 2006 11:45:39 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Trent, Right after I sent the results indicated below I re-ran the app and it apparently found the parallel port. The difference was that I set the permissions to : /dev: wildcard lp* crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 I'm still not sure how to interpret the dmesg and lsmod before. However I'm thinking that since the user now has permission to access the lp* port, a request to access it loaded the lp and parport modules automatically and allowed me access. Here's the output of lsmod now: ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp lp 5540 0 (autoclean) parport 21608 1 (autoclean) [parport_pc lp] and dmesg: ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp On node 0 totalpages: 161776 lp0: using parport0 (polling). So I think I'm good, and ready to move on the next steps. Thanks Trent! Ed On 8/12/06, Ed wrote: > > Thanks for the reply Trent. > > I'm on a different system today but am trying your suggestons. This is a > debian 3.1r2 system and I'm running jdk 1.5.0_04. > > Take a look below, but I think I have no parallel port support on this > kernel, however I never get the "No such device or address" return from the > cat call as you did so I'm not sure how to interpret the results. > > When I run the test program (PortChooser.java), the getPortIdentifiers > call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is > more than I found on the RedHat system. Incidently --disable-lockfiles has > no effect. > > It looks as though there is no parallel support in this kernel: > falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > On node 0 totalpages: 161776 > falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > > I'm a little confused by the results when I cat to the lp0 device. It > seems from the dmesg output that I don't have parallel printer support, but > when I cat to the lp0 device, I get permission denied if I'm non-root user > and input/output error if I'm root. Apparently this means I have the device, > but no support in the kernel? > > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > ed at falcon:~/src/workspace/EASServer/src$ su > Password: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > > Here's my lp* device permissions. > /dev: > wildcard lp* > crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > If I change it to > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I get: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > falcon:/home/ed/src/workspace/EASServer/src# exit > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > cat: /dev/lp0: Input/output error > ed at falcon:~/src/workspace/EASServer/src$ > > What do you think? Should I recompile the kernel or is it something else? > > By the way, I added the user ed to the lp and uucp groups on this system. > > Thanks again, > > Ed > > On 8/11/06, Trent Jarvi wrote: > > > > On Fri, 11 Aug 2006, Ed wrote: > > > > > I'm trying to read and write a parallel port on a standard (Dell) pc > > running > > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > > gates. > > > > > > I'm having problems getting rxtx to return a port enumeration from > > > getPortIdentifiers. I'm using a file > > > PortChooser.java as a test file to get things going. This is from the > > Java > > > CookBook 2nd edition (Chapter 12). The call > > > > > > // get list of ports available on this particular computer, > > > // by calling static method in CommPortIdentifier. > > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > > > > > returns a null pList; > > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure > > and > > > compile without --disable-lockfiles I get: > > > > > > Stable Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7 > > > Java lib Version = RXTX-2.1-7 > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > ... > > > > > > When I compile with --disable-lockfiles the call to getPortIdentifiers > > > > > simply returns a null Enumeration. > > > > > > I've read the documention and threads about this issue and I feel like > > I've > > > tried everything, so at the moment I'm stumped. > > > > > > I can supply any further info that may help. > > > > > > Thanks in advance. > > > > > > Ed > > > > > > > Hi Ed > > > > You may want to check the permissions of /dev/lp*. Also make sure lp or > > your kernel support for lp is loaded. It should show up in dmesg and > > lsmod. > > > > For my laptop with no printer port enabled in BIOS is see: > > > > lp: driver loaded but no devices found > > > > in desg |grep lp > > > > [] $ ls -l /dev/lp* > > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > here root and group lp can read and write. Normal users cannot. > > > > Try a simple read as a user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > > > > Fix as root > > > > [] chmod 666 /dev/lp* > > [] $ ls -l /dev/lp* > > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > Now as user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: No such device or address > > > > So this is saying there is no lp0 on my laptop. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > > > -- > > Ed > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060812/c2afe1f8/attachment-0005.html From tjarvi at qbang.org Sat Aug 12 14:01:52 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 12 Aug 2006 14:01:52 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Remember that the lp code expects a printer - or something like it. There is a line that specifies the printer is online. If you are doing hobby work, you will need to raise that line or loop it back to something that is raised. If you just try reading a port with no device connected and online, there will be an error while trying to read. This should be addressed in the mail-list archives. On Sat, 12 Aug 2006, Ed wrote: > Trent, > Right after I sent the results indicated below I re-ran the app and it > apparently found the parallel port. The difference was that I set the > permissions to : > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I'm still not sure how to interpret the dmesg and lsmod before. However I'm > thinking that since the user now has permission to access the lp* port, a > request to access it loaded the lp and parport modules automatically and > allowed me access. Here's the output of lsmod now: > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > lp 5540 0 (autoclean) > parport 21608 1 (autoclean) [parport_pc lp] > > and dmesg: > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > On node 0 totalpages: 161776 > lp0: using parport0 (polling). > > So I think I'm good, and ready to move on the next steps. > > Thanks Trent! > > Ed > > > On 8/12/06, Ed wrote: >> >> Thanks for the reply Trent. >> >> I'm on a different system today but am trying your suggestons. This is a >> debian 3.1r2 system and I'm running jdk 1.5.0_04. >> >> Take a look below, but I think I have no parallel port support on this >> kernel, however I never get the "No such device or address" return from the >> cat call as you did so I'm not sure how to interpret the results. >> >> When I run the test program (PortChooser.java), the getPortIdentifiers >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is >> more than I found on the RedHat system. Incidently --disable-lockfiles has >> no effect. >> >> It looks as though there is no parallel support in this kernel: >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp >> On node 0 totalpages: 161776 >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp >> >> I'm a little confused by the results when I cat to the lp0 device. It >> seems from the dmesg output that I don't have parallel printer support, but >> when I cat to the lp0 device, I get permission denied if I'm non-root user >> and input/output error if I'm root. Apparently this means I have the >> device, >> but no support in the kernel? >> >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> >> cat: /dev/lp0: Permission denied >> ed at falcon:~/src/workspace/EASServer/src$ su >> Password: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> >> Here's my lp* device permissions. >> /dev: >> wildcard lp* >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> If I change it to >> /dev: >> wildcard lp* >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> I get: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> falcon:/home/ed/src/workspace/EASServer/src# exit >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> ed at falcon:~/src/workspace/EASServer/src$ >> >> What do you think? Should I recompile the kernel or is it something else? >> >> By the way, I added the user ed to the lp and uucp groups on this system. >> >> Thanks again, >> >> Ed >> >> On 8/11/06, Trent Jarvi wrote: >> > >> > On Fri, 11 Aug 2006, Ed wrote: >> > >> > > I'm trying to read and write a parallel port on a standard (Dell) pc >> > running >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the >> > gates. >> > > >> > > I'm having problems getting rxtx to return a port enumeration from >> > > getPortIdentifiers. I'm using a file >> > > PortChooser.java as a test file to get things going. This is from the >> > Java >> > > CookBook 2nd edition (Chapter 12). The call >> > > >> > > // get list of ports available on this particular computer, >> > > // by calling static method in CommPortIdentifier. >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); >> > > >> > > returns a null pList; >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure >> > and >> > > compile without --disable-lockfiles I get: >> > > >> > > Stable Library >> > > ========================================= >> > > Native lib Version = RXTX-2.1-7 >> > > Java lib Version = RXTX-2.1-7 >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > ... >> > > >> > > When I compile with --disable-lockfiles the call to getPortIdentifiers >> > >> > > simply returns a null Enumeration. >> > > >> > > I've read the documention and threads about this issue and I feel like >> > I've >> > > tried everything, so at the moment I'm stumped. >> > > >> > > I can supply any further info that may help. >> > > >> > > Thanks in advance. >> > > >> > > Ed >> > > >> > >> > Hi Ed >> > >> > You may want to check the permissions of /dev/lp*. Also make sure lp or >> > your kernel support for lp is loaded. It should show up in dmesg and >> > lsmod. >> > >> > For my laptop with no printer port enabled in BIOS is see: >> > >> > lp: driver loaded but no devices found >> > >> > in desg |grep lp >> > >> > [] $ ls -l /dev/lp* >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > here root and group lp can read and write. Normal users cannot. >> > >> > Try a simple read as a user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: Permission denied >> > >> > Fix as root >> > >> > [] chmod 666 /dev/lp* >> > [] $ ls -l /dev/lp* >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > Now as user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: No such device or address >> > >> > So this is saying there is no lp0 on my laptop. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > >> >> >> >> -- >> >> Ed >> > > > > From pete.flugstad at gmail.com Mon Aug 14 07:51:41 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 08:51:41 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: <84d4a6d50608140651h3cb2266ap90c47780abace00@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > On Fri, 11 Aug 2006, Pete Flugstad wrote: > > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > > but there doesn't appear to be a way to select that via RXTX (which > > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > > is selected). > > I'm guessing I didn't know the difference. At the time, I really didn't > have windows API documentation. I just had some pages I found with > altivista/google. Later microsoft made their documentation available on > msdn or I learned about it. > > For rxtx, the calls need to be platform neutral. So if you see how to do > each in termios, then we can get it going. so, RTSCTS_IN/OUT at the COMM API is mapped to HARDWARE_FLOW_CONTROL in the POSIX layer. Which termios.c maps to RTS_CONTROL_HANDSHAKE and fOutxCtsFlow = true. Since termios.c is Windows only anway... Would it work to change the mapping in termios.c to map hardware flow control to RTS_CONTROL_TOGGLE? I just wondering (I'm going to go look, but there's a lot of code in there) if the code does anything special playing with flow control signals? Thanks, Pete From pete.flugstad at gmail.com Mon Aug 14 09:42:48 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 10:42:48 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> On 8/3/06, Trent Jarvi wrote: > On Thu, 3 Aug 2006, Pete Flugstad wrote: > > Okay, I can understand that, but from the PORTMON output, it looks > > like it's opening each port TWICE: > > I think this problem is in RXTXCommDriver.java. I've just not tracked it > down but it should be in the java code, not the native code so easy > enough to track down. Okay, I'm trying to track this down... Looks like the CommPortIdentifier static initializer loads RXTXCommDriver, and then calls RXTXDriver.initialize. But then CommPortIdentifier.getPortIdentifiers does the exact same thing. So that's where the two scans are coming from. I would guess that one or the other can be removed? Probably the one in the CommPortIdentifier.getPortIdentifiers? Doing so removes the 2nd scan. Pete PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) val = System.getProperty("gnu.io.SerialPorts"); Shouldn't the comparison be != null? getProperty returns null if the variable is NOT found, and you only want to assign to val if it IS found, right? Same thing for the parallel port case. End result is the same I guess, since you check for null later, but probably should be fixed. From eddythejekyll at gmail.com Mon Aug 14 11:55:17 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 11:55:17 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: When I try to get the mode with int mode = pPort.getMode(); it returns 0 which isn't any of the valid modes. I tried setting it explicitely with pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced the requested mode in nativeSetSerialPortParams at gnu.io.LPRPort.setLPRMode(Native Method) at gnu.io.LPRPort.setMode(LPRPort.java:87) Except for LPT_MODE_ANY, but the getMode call still failed out with an invalid state. I'm wondering if it's because I don't have the line pulled high like you said. This isn't a printer connected. It's a relay board with pins 2-9 tied to data, and 18-25 to gnd. The rest are open. I looked at a DB25 pinout diagram and I'm not sure which pin I need to tie high, and I looked through the archives, but didn't find a reference to something definitive. Can someone help me with which pin is the "online" pin as Trent mentioned? DB25 spec has ( I hope this formats correctly in this email) BUSY (11), SEL (13) or INIT (16) are candidates, but I'm guessing. Any clues? *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Thanks, Ed On 8/12/06, Trent Jarvi wrote: > > > Remember that the lp code expects a printer - or something like it. There > is a line that specifies the printer is online. If you are doing hobby > work, you will need to raise that line or loop it back to something that > is raised. > > If you just try reading a port with no device connected and online, there > will be an error while trying to read. This should be addressed in the > mail-list archives. > > On Sat, 12 Aug 2006, Ed wrote: > > > Trent, > > Right after I sent the results indicated below I re-ran the app and it > > apparently found the parallel port. The difference was that I set the > > permissions to : > > /dev: > > wildcard lp* > > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > > > I'm still not sure how to interpret the dmesg and lsmod before. However > I'm > > thinking that since the user now has permission to access the lp* port, > a > > request to access it loaded the lp and parport modules automatically and > > allowed me access. Here's the output of lsmod now: > > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > > lp 5540 0 (autoclean) > > parport 21608 1 (autoclean) [parport_pc lp] > > > > and dmesg: > > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > > On node 0 totalpages: 161776 > > lp0: using parport0 (polling). > > > > So I think I'm good, and ready to move on the next steps. > > > > Thanks Trent! > > > > Ed > > > > > > On 8/12/06, Ed wrote: > >> > >> Thanks for the reply Trent. > >> > >> I'm on a different system today but am trying your suggestons. This is > a > >> debian 3.1r2 system and I'm running jdk 1.5.0_04. > >> > >> Take a look below, but I think I have no parallel port support on this > >> kernel, however I never get the "No such device or address" return from > the > >> cat call as you did so I'm not sure how to interpret the results. > >> > >> When I run the test program (PortChooser.java), the getPortIdentifiers > >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this > is > >> more than I found on the RedHat system. Incidently --disable-lockfiles > has > >> no effect. > >> > >> It looks as though there is no parallel support in this kernel: > >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > >> On node 0 totalpages: 161776 > >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > >> > >> I'm a little confused by the results when I cat to the lp0 device. It > >> seems from the dmesg output that I don't have parallel printer support, > but > >> when I cat to the lp0 device, I get permission denied if I'm non-root > user > >> and input/output error if I'm root. Apparently this means I have the > >> device, > >> but no support in the kernel? > >> > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> > >> cat: /dev/lp0: Permission denied > >> ed at falcon:~/src/workspace/EASServer/src$ su > >> Password: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> > >> Here's my lp* device permissions. > >> /dev: > >> wildcard lp* > >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> If I change it to > >> /dev: > >> wildcard lp* > >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> I get: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> falcon:/home/ed/src/workspace/EASServer/src# exit > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> ed at falcon:~/src/workspace/EASServer/src$ > >> > >> What do you think? Should I recompile the kernel or is it something > else? > >> > >> By the way, I added the user ed to the lp and uucp groups on this > system. > >> > >> Thanks again, > >> > >> Ed > >> > >> On 8/11/06, Trent Jarvi wrote: > >> > > >> > On Fri, 11 Aug 2006, Ed wrote: > >> > > >> > > I'm trying to read and write a parallel port on a standard (Dell) > pc > >> > running > >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > >> > gates. > >> > > > >> > > I'm having problems getting rxtx to return a port enumeration from > >> > > getPortIdentifiers. I'm using a file > >> > > PortChooser.java as a test file to get things going. This is from > the > >> > Java > >> > > CookBook 2nd edition (Chapter 12). The call > >> > > > >> > > // get list of ports available on this particular computer, > >> > > // by calling static method in CommPortIdentifier. > >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > >> > > > >> > > returns a null pList; > >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I > configure > >> > and > >> > > compile without --disable-lockfiles I get: > >> > > > >> > > Stable Library > >> > > ========================================= > >> > > Native lib Version = RXTX-2.1-7 > >> > > Java lib Version = RXTX-2.1-7 > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > ... > >> > > > >> > > When I compile with --disable-lockfiles the call to > getPortIdentifiers > >> > > >> > > simply returns a null Enumeration. > >> > > > >> > > I've read the documention and threads about this issue and I feel > like > >> > I've > >> > > tried everything, so at the moment I'm stumped. > >> > > > >> > > I can supply any further info that may help. > >> > > > >> > > Thanks in advance. > >> > > > >> > > Ed > >> > > > >> > > >> > Hi Ed > >> > > >> > You may want to check the permissions of /dev/lp*. Also make sure lp > or > >> > your kernel support for lp is loaded. It should show up in dmesg and > >> > lsmod. > >> > > >> > For my laptop with no printer port enabled in BIOS is see: > >> > > >> > lp: driver loaded but no devices found > >> > > >> > in desg |grep lp > >> > > >> > [] $ ls -l /dev/lp* > >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > here root and group lp can read and write. Normal users cannot. > >> > > >> > Try a simple read as a user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: Permission denied > >> > > >> > Fix as root > >> > > >> > [] chmod 666 /dev/lp* > >> > [] $ ls -l /dev/lp* > >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > Now as user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: No such device or address > >> > > >> > So this is saying there is no lp0 on my laptop. > >> > > >> > -- > >> > Trent Jarvi > >> > tjarvi at qbang.org > >> > > >> > >> > >> > >> -- > >> > >> Ed > >> > > > > > > > > > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/59164078/attachment-0005.html From eddythejekyll at gmail.com Mon Aug 14 14:19:58 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 14:19:58 -0600 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? Message-ID: I'm using the ParallelPort class to drive a relay board. According to Mr. Jarvi, since this board isn't a printer, there will be a read error unless I hold the "printer online" line high in order to make the API think I'm talking to a printer. The problem is, I can't figure out which line is the "printer online". My DB25 spec lists the following: *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Anyone know which one I should tie high? I tried the busy line and it still errored out on the read. Thanks in advance, -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/66cf3c3e/attachment-0005.html From tjarvi at qbang.org Mon Aug 14 18:06:29 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:06:29 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Mon, 14 Aug 2006, Ed wrote: > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > which isn't any of the valid modes. I tried setting it explicitely with > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced > the requested mode in nativeSetSerialPortParams > at gnu.io.LPRPort.setLPRMode(Native Method) > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > invalid state. This is because rxtx only supports the basics. JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } One could program in more support. When I did that I just had a daisy wheel printer to test with and doing any more would have been blind. So that behavior is expected. I'll look to see if the Parallel Complete book mentions which pins you need to raise. If you look in the source code [ParallelImp.c] you can see this code isn't well tested. It has worked for hobby use in the past as I'd guess you are trying to do. But my experience with the code is as is mentioned in the top of the source: /* fear he who enter here. It appears that things have changed. An attempt has been made to put things the way the should be. It compiles and ParallelBlackBox runs. No further guarantees. Well... One.. it will print "Hello World!" on an epson DX 10 printer. you know.. the 10 character per second daisy wheel printer ;) - Trent Jarvi */ That comment is from 1997 or so. Since then some windows support was contributed but it is still very green code. We get about four requests for parallel support a year so its just not a well traveled area. It would be nice to have some documentation for the people trying to hook parallel ports to electronic projects. That appears to be the exclusive use of the Parallel support. The wiki pages are intended to let people share information like this to help each other in their projects as they figure out the details. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Aug 14 18:40:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:40:40 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: > PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): > > if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) > val = System.getProperty("gnu.io.SerialPorts"); > > Shouldn't the comparison be != null? getProperty returns null if the > variable is NOT found, and you only want to assign to val if it IS > found, right? Same thing for the > parallel port case. End result is the same I guess, since you check > for null later, > but probably should be fixed. I think this is just a fallback to the second property. gnu.io.SerialPorts isn't documented but perhaps it is used. It should behave properly as documented in INSTALL. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 14 18:56:55 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 19:56:55 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: <44E11BD7.5030102@gmail.com> Trent Jarvi wrote: >> PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): >> >> if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) >> val = System.getProperty("gnu.io.SerialPorts"); >> > > I think this is just a fallback to the second property. > gnu.io.SerialPorts isn't documented but perhaps it is used. It should > behave properly as documented in INSTALL. Doh - yup, I missed the fact that the property names were different... Pete From berkland at spamcop.net Mon Aug 14 19:58:21 2006 From: berkland at spamcop.net (Doug Berkland) Date: Mon, 14 Aug 2006 21:58:21 -0400 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? In-Reply-To: References: Message-ID: <269e40090608141858g698c2579v8d962deca3f4df53@mail.gmail.com> Based on memory and this page as confirmation, I would say pin 13 is the "Online" pin for SPP (standard parallel port). http://www.quatech.com/support/comm-over-parallel.php On 8/14/06, Ed wrote: > > I'm using the ParallelPort class to drive a relay board. According to Mr. > Jarvi, since this board isn't a printer, there will be a read error unless I > hold the "printer online" line high in order to make the API think I'm > talking to a printer. The problem is, I can't figure out which line is the > "printer online". My DB25 spec lists the following: > > *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and > Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data > Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 > D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select > 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select > In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit > 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 > Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and > Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground > > Anyone know which one I should tie high? I tried the busy line and it > still errored out on the read. > > Thanks in advance, > > -- > Ed > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/842bb770/attachment-0005.html From eddythejekyll at gmail.com Mon Aug 14 20:25:42 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 20:25:42 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Ah, I see. I've seen the caveats about limited Parallel support, but I thought it was mainly about the javax.comm package. The gnu.io is derived from javax.comm package right? That is, is the parallel support in rxtx is a superset of what's in javax.comm? I'm using this not for hobby usage, but for some simple instrumenation and control. If the project mandates it, I'll gladly work on extending the support. In the meantime, I need to get some sanity checks working, and repair my relay board (I smoked the ULN2803 chip, apparently by tying the BUSY (pin 11) to vcc). I guess I'll try the SEL pin next (and a supply of 2803s) with a ~1K pullup. The caveat in the comment block isn't very encouraging (!), but I borrowed an old Epson Stylus Color 600 printer to see what I can do. If I can write out characters to it I'll be happy. Parallel printers aren't easy to find these days. I haven't yet looked at the native source, yet, but I've just imported it into eclipse and I'll surf around a bit. Ed On 8/14/06, Trent Jarvi wrote: > > On Mon, 14 Aug 2006, Ed wrote: > > > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > > which isn't any of the valid modes. I tried setting it explicitely with > > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to > proced > > the requested mode in nativeSetSerialPortParams > > at gnu.io.LPRPort.setLPRMode(Native Method) > > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > > invalid state. > > This is because rxtx only supports the basics. > > JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > jclass jclazz, jint mode) > { > switch(mode) > { > case LPT_MODE_ANY: > break; > case LPT_MODE_SPP: > case LPT_MODE_PS2: > case LPT_MODE_EPP: > case LPT_MODE_ECP: > case LPT_MODE_NIBBLE: > default: > throw_java_exception( env, > UNSUPPORTED_COMM_OPERATION, > "nativeSetSerialPortParams", > "setLPRMode was unable to proced the > requested \ > mode" > ); > } > return(JNI_TRUE); > } > > One could program in more support. When I did that I just had a daisy > wheel printer to test with and doing any more would have been blind. > > So that behavior is expected. I'll look to see if the Parallel Complete > book mentions which pins you need to raise. If you look in the source > code [ParallelImp.c] you can see this code isn't well tested. It has > worked for hobby use in the past as I'd guess you are trying to do. But > my experience with the code is as is mentioned in the top of the source: > > /* > fear he who enter here. It appears that things have changed. An > attempt > has been made to put things the way the should be. > > It compiles and ParallelBlackBox runs. No further guarantees. > > Well... One.. it will print "Hello World!" on an epson DX 10 > printer. > you know.. the 10 character per second daisy wheel printer ;) > > - Trent Jarvi > */ > > That comment is from 1997 or so. > > Since then some windows support was contributed but it is still very green > code. We get about four requests for parallel support a year so its just > not a well traveled area. > > It would be nice to have some documentation for the people trying to hook > parallel ports to electronic projects. That appears to be the exclusive > use of the Parallel support. The wiki pages are intended to let people > share information like this to help each other in their projects as they > figure out the details. > > -- > Trent Jarvi > tjarvi at qbang.org > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/fbb5ddb4/attachment-0005.html From lyon at docjava.com Tue Aug 15 06:06:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 15 Aug 2006 08:06:27 -0400 Subject: [Rxtx] smoking is bad for your health In-Reply-To: References: Message-ID: Hi All, If you are connecting to the parallel port and smoking chips, it is time for extra stuff to buffer the parallel port. You may be want more current, in which case driver transistors are needed, or, if you are using the port as an output only device, you may like to add your own bus transceiver (e.g., 74245), set for output. Do be careful to design this properly; http://www.beyondlogic.org/spp/parallel.htm Some people like to use Octal D-type F.F's with OC outputs, like a 74374, http://upgrade.cntc.ac.kr/data/ttl/74374.html I like this one, as it has the D FF's and can latch the outputs for presentation to slower electronics (like relays). But careful! A relay that needs more current than the family of the device you have selected will look like a short to ground, and you will smoke your bug! And MOBO's do NOT come with the ability to drive any load you like. Check the power specs on your relay and be sure to protect the chip against back EMF with a diode. It is best to smoke test this on a bread board BEFORE hooking it to the computer. And be sure you smoke test the corner points in the ckt for a while, lest it fail in the field. - Doug >Ah, I see. I've seen the caveats about limited >Parallel support, but I thought it was mainly >about the javax.comm package. The >gnu.io is derived from javax.comm >package right? That is, is the parallel support >in rxtx is a superset of what's in javax.comm? > >I'm using this not for hobby usage, but for some >simple instrumenation and control. If the >project mandates it, I'll gladly work on >extending the support. In the meantime, I need >to get some sanity checks working, and repair my >relay board (I smoked the ULN2803 chip, >apparently by tying the BUSY (pin 11) to vcc). I >guess I'll try the SEL pin next (and a supply of >2803s) with a ~1K pullup. > >The caveat in the comment block isn't very >encouraging (!), ?but?I borrowed an old Epson >Stylus Color 600 printer to see what I can do. >?If I can write out characters to it I'll be >happy. Parallel printers aren't easy to find >these days. > > I haven't yet looked at the native source, yet, >but I've just imported it into eclipse and I'll >surf around a bit. > >Ed > >On 8/14/06, Trent Jarvi <tjarvi at qbang.org> wrote: > >On Mon, 14 Aug 2006, Ed wrote: > >> When I try to get the mode with int mode = pPort.getMode(); it returns 0 >> which isn't any of the valid modes. I tried setting it explicitely with >> pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with >> >> gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced >> the requested mode in nativeSetSerialPortParams >> at gnu.io.LPRPort.setLPRMode(Native Method) >> at gnu.io.LPRPort.setMode(LPRPort.java:87) >> >> Except for LPT_MODE_ANY, but the getMode call still failed out with an >> invalid state. > >This is because rxtx only supports the basics. > >JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > ???????jclass jclazz, jint mode) >{ > ???????switch(mode) > ???????{ > ???????????????case LPT_MODE_ANY: > ???????????????????????break; > ???????????????case LPT_MODE_SPP: > ???????????????case LPT_MODE_PS2: > ???????????????case LPT_MODE_EPP: > ???????????????case LPT_MODE_ECP: > ???????????????case LPT_MODE_NIBBLE: > ???????????????default: > ???????????????????????throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, > ???????????????????????????????"nativeSetSerialPortParams", > ???????????????????????????????"setLPRMode was >unable to proced the requested \ > ???????????????????????????????mode" > ???????????????????????); > ???????} > ???????return(JNI_TRUE); >} > >One could program in more support.??When I did that I just had a daisy >wheel printer to test with and doing any more would have been blind. > >So that behavior is expected.??I'll look to see if the Parallel Complete >book mentions which pins you need to raise.??If you look in the source >code [ParallelImp.c] you can see this code isn't well tested.??It has >worked for hobby use in the past as I'd guess you are trying to do.??But >my experience with the code is as is mentioned in the top of the source: > >/* > fear he who enter here.??It appears that things have changed.??An attempt > has been made to put things the way the should be. > > ???????It compiles and ParallelBlackBox runs.??No further guarantees. > > ???????Well... One.. it will print "Hello World!" on an epson DX 10 printer. > ???????you know.. the 10 character per second daisy wheel printer ;) > > ???????- Trent Jarvi >*/ > >That comment is from 1997 or so. > >Since then some windows support was contributed but it is still very green >code.??We get about four requests for parallel support a year so its just >not a well traveled area. > >It would be nice to have some documentation for the people trying to hook >parallel ports to electronic projects.??That appears to be the exclusive >use of the Parallel support.??The wiki pages are intended to let people >share information like this to help each other in their projects as they >figure out the details. > >-- >Trent Jarvi >tjarvi at qbang.org > > > > >-- >Ed > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 15 13:26:16 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 15 Aug 2006 14:26:16 -0500 Subject: [Rxtx] crash with too much memory Message-ID: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded from qbang.org. I'm exercising the RXTX COMM serial interface, both in a small standalone test and with the same code pulled into a large OSGI framework setup. If I use the stock .jar/.dll's, then everything works correctly in both situations. I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 (mingw-special)). If I use my locally built version, then my small test case works just fine, both when run inside Eclipse and when run standalone on the command line. However, when I try and use my locally built .jar/.dll's in the large framework environment, then I get a JVM crash with the attached log. Normally this would lead me to think that I was running out of memory or something in the large environment, and when I try and play with the JVM memory args, some interesting things show up. In our large environment, we have -Xms32M/-Xmx1024M - this appears to be the problem. If I set max to something like 64M, then things work. The cross over point from working to failing seems to be around 32M/110M (works) and 32M/111M (fails). But 128M/128M works while 128M/129M fails. So it seems to have to do with how much memory is actually available, or something like that. The thing that occurs to me is if my GCC is somehow generating something like "near" calls. But when the JVM has a lot of RAM available, it puts the DLL up somehwere in the address space and then the near calls fail - far calls are needed. So, I'm thinking this is probably a difference in the MinGW GCC I'm using and the one that was used to build the stock binaries from qbang, or maybe some command line args were changed? So, I'm hoping someone will have an idea of what's going on here... Thanks, Pete From tjarvi at qbang.org Tue Aug 15 18:54:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 15 Aug 2006 18:54:04 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: On Tue, 15 Aug 2006, Pete Flugstad wrote: > I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded > from qbang.org. > > I'm exercising the RXTX COMM serial interface, both in a small > standalone test and with the same code pulled into a large OSGI > framework setup. > > If I use the stock .jar/.dll's, then everything works correctly in > both situations. > > I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 > (mingw-special)). > > If I use my locally built version, then my small test case works just > fine, both when run inside Eclipse and when run standalone on the > command line. However, when I try and use my locally built > .jar/.dll's in the large framework environment, then I get a JVM crash > with the attached log. > > Normally this would lead me to think that I was running out of memory > or something in the large environment, and when I try and play with > the JVM memory args, some interesting things show up. > > In our large environment, we have -Xms32M/-Xmx1024M - this appears to > be the problem. If I set max to something like 64M, then things work. > The cross over point from working to failing seems to be around > 32M/110M (works) and 32M/111M (fails). > But 128M/128M works while 128M/129M fails. So it seems to have to do > with how much memory is actually available, or something like that. > > The thing that occurs to me is if my GCC is somehow generating > something like "near" calls. But when the JVM has a lot of RAM > available, it puts the DLL up somehwere in the address space and then > the near calls fail - far calls are needed. > > So, I'm thinking this is probably a difference in the MinGW GCC I'm > using and the one that was used to build the stock binaries from > qbang, or maybe some command line args were changed? > > So, I'm hoping someone will have an idea of what's going on here... > Hi Pete The binaries are from the src. They should be reproducable. I did extensive testing of rxtx several years ago using mingw as the compiler. The version was 2.95. I have not changed versions since. There are way too many variables as it is. I have a linux->mingw cross compiler rpm I use for all windows use. If you want a copy of it you can have it. It isn't anything 'special' :) -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Thu Aug 17 11:49:24 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 17 Aug 2006 12:49:24 -0500 Subject: [Rxtx] crash with too much memory In-Reply-To: References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> On 8/15/06, Trent Jarvi wrote: > I did extensive testing of rxtx several years ago using mingw as the > compiler. The version was 2.95. I have not changed versions since. > There are way too many variables as it is. FYI, I believe I've solved this problem by changing how the dll's were built. The original mingw makefile was generating Serial.def, then performing various operations with dlltool and ld. I modified the makefile to create the dll using this page: as a guide. With that, there's no longer any need to deal with Serial.def and the makefile becomes _much_ simpler. This appears to have addressed my problems with crashing. FWIW, GCC 2.95 is _really_ old - you should consider investigating upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is supposed to generate a native binary (i.e. just like MinGW). Thanks, Pete From claretlc at yahoo.com Thu Aug 17 12:34:48 2006 From: claretlc at yahoo.com (Clare Cooley) Date: Thu, 17 Aug 2006 11:34:48 -0700 (PDT) Subject: [Rxtx] parallel port communication Message-ID: <20060817183448.76911.qmail@web53908.mail.yahoo.com> Hi, I'm trying to write a 1 to a bit 15 on a parallel port cable that isn't attached to a printer.(It's a control box for eye-tracking equipment.)I need to do this in Java. I looked at the javax.comm documentation, and it said, "Application programs should not directly create ParallelPortEvent objects." So is there a way to do this with your package? If not, do you have any suggestions of where to look? It really needs to be done in Java. Thanks, Clare Cooley __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From pat at xvalheru.org Thu Aug 17 13:13:52 2006 From: pat at xvalheru.org (pat) Date: Thu, 17 Aug 2006 21:13:52 +0200 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060817190751.M5586@xvalheru.org> Hi there, I've question(s) for you. I need to communicate with scale, I've used the Sun's direver. Now I've switched to Rxtx and the speed of the communication is perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, but the difference between the crash time is 5 second ... . My question is: Is there a stable driver ??? Or what I have to do to have stable enough serial port driver ??? OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. Thanks to all for the help. Pat From tjarvi at qbang.org Fri Aug 18 05:13:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 05:13:42 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> Message-ID: On Thu, 17 Aug 2006, Pete Flugstad wrote: > On 8/15/06, Trent Jarvi wrote: >> I did extensive testing of rxtx several years ago using mingw as the >> compiler. The version was 2.95. I have not changed versions since. >> There are way too many variables as it is. > > FWIW, GCC 2.95 is _really_ old - you should consider investigating > upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is > supposed to generate a native binary (i.e. just like MinGW). > It is really old but also well known like C itself. I have considered upgrading. The ToyBox builds should be gcc 3* cross-compiled. I'm not going to be validating gcc 3* w32 binaries though. It's looking like we will need to focus support on MSFT's toolchain for 64 bit windows support until it is possible for gcc to support w64. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Aug 18 05:32:10 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 07:32:10 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: Hi All, Does anyone know how to produce mac intel binaries on a Fedora Linux box? Thanks! - Doug From tjarvi at qbang.org Fri Aug 18 06:42:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 06:42:05 -0600 (MDT) Subject: [Rxtx] cross compilation for the mac In-Reply-To: References: Message-ID: On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Does anyone know how to produce > mac intel binaries on a Fedora Linux > box? > > Thanks! > - Doug Hi Doug You need to build the cross toolchain which means copying the Darwin/Mac binaries over to fedora. It would be nontrivial but possible. Do the Darwin libraries work with Mac in general? I'm not aware of the licensing issues associated with grabbing Mac binaries. Same with OpenSolaris/Solaris. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Aug 18 08:15:26 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 10:15:26 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> In theory building against Darwin would be sufficient to getting things working on MacOS X. You need to remember that Darwin is the low-level OS, while MacOS X adds the everything else on top. IOKit, which is the I/O API, is available as part of Darwin. The only thing you will need extra are the Java libraries. One thing is that I would recommend that when producing binaries for the Mac, is to ensure they are Universal binaries (PPC+Intel). Andre > > From: Trent Jarvi > Date: 2006/08/18 Fri AM 08:42:05 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] cross compilation for the mac > > On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > > > Hi All, > > Does anyone know how to produce > > mac intel binaries on a Fedora Linux > > box? > > > > Thanks! > > - Doug > > Hi Doug > > You need to build the cross toolchain which means copying the Darwin/Mac > binaries over to fedora. It would be nontrivial but possible. > > Do the Darwin libraries work with Mac in general? I'm not aware of the > licensing issues associated with grabbing Mac binaries. > > Same with OpenSolaris/Solaris. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Aug 18 13:43:16 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 15:43:16 -0400 Subject: [Rxtx] cross compilation for the mac In-Reply-To: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: >In theory building against Darwin would be sufficient to getting >things working on MacOS X. You need to remember that Darwin is the >low-level OS, while MacOS X adds the everything else on top. IOKit, >which is the I/O API, is available as part of Darwin. The only thing >you will need extra are the Java libraries. > >One thing is that I would recommend that when producing binaries for >the Mac, is to ensure they are Universal binaries (PPC+Intel). > >Andre I find the xcode ide for generating a mix of universal binaries and java very difficult to make work. Is there a way to do this with make files? Thanks! - Doug From ajmas at sympatico.ca Fri Aug 18 13:54:55 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 15:54:55 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818195455.PGAP29052.tomts13-srv.bellnexxia.net@smtp1.sympatico.ca> It should be doable. XCode hands off the compilation process to gcc et al, for the compilation of C/C++ code and to javac et al. for the Java side. While ant is the favoured tool for 'automated' Java compilation, make can easily be used. All is needed is someone to volounteer to do the work. Andre "Dr. Douglas Lyon" wrote > > >In theory building against Darwin would be sufficient to getting > >things working on MacOS X. You need to remember that Darwin is the > >low-level OS, while MacOS X adds the everything else on top. IOKit, > >which is the I/O API, is available as part of Darwin. The only thing > >you will need extra are the Java libraries. > > > >One thing is that I would recommend that when producing binaries for > >the Mac, is to ensure they are Universal binaries (PPC+Intel). > > > >Andre > > I find the xcode ide for generating a mix of universal binaries > and java very difficult to make work. Is there a way to do this > with make files? > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Fri Aug 18 16:34:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 16:34:46 -0600 (MDT) Subject: [Rxtx] serial driver newbe question and problem In-Reply-To: <20060817190751.M5586@xvalheru.org> References: <20060817190751.M5586@xvalheru.org> Message-ID: On Thu, 17 Aug 2006, pat wrote: > Hi there, > > I've question(s) for you. I need to communicate with scale, I've used the > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > but the difference between the crash time is 5 second ... . > > My question is: Is there a stable driver ??? Or what I have to do to have > stable enough serial port driver ??? > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > Thanks to all for the help. > > Pat > Could you describe the hardware you have, the version of rxtx and provide the log of the crash? Did you download binaries? I've not been seeing a jvm crash with rxtx -- Trent Jarvi tjarvi at qbang.org From lunareclipse03 at web.de Sat Aug 19 12:11:48 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 19 Aug 2006 20:11:48 +0200 Subject: [Rxtx] Problem solved! Message-ID: <920065539@web.de> Hi everybody, I posted some months ago and asked about some help on my very special problem concerning my win32 port of a communications library. Now I just want to inform you that no further "mindstorming" is needed because I solved the problem by completely rewriting the win32 port of the library. Now everything works fine. Thank you all for your time and patience. --Sven Ahlemann __________________________________________________________________________ Erweitern Sie FreeMail zu einem noch leistungsst?rkeren E-Mail-Postfach! Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131 From ajmas at sympatico.ca Mon Aug 21 09:58:23 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 21 Aug 2006 11:58:23 -0400 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060821155823.TLSM18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Next time that happens, including a copy of the crash log, produced by Windows could probably help too. Andre Trent Jarvi wrote: > > On Thu, 17 Aug 2006, pat wrote: > > > Hi there, > > > > I've question(s) for you. I need to communicate with scale, I've used the > > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > > but the difference between the crash time is 5 second ... . > > > > My question is: Is there a stable driver ??? Or what I have to do to have > > stable enough serial port driver ??? > > > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > > > Thanks to all for the help. > > > > Pat > > > > Could you describe the hardware you have, the version of rxtx and > provide the log of the crash? Did you download binaries? > > I've not been seeing a jvm crash with rxtx > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From adrian.l.parker at gmail.com Thu Aug 24 09:10:39 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Thu, 24 Aug 2006 11:10:39 -0400 Subject: [Rxtx] Portability issues Message-ID: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use RXTX 2.0? Does it provide system librairies that javax.comm does not? I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, or 2000, or server 2003). Can this be done with a single implementation of RXTX? I don't want to have different versions of Java code that have different package names. References: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Message-ID: On Thu, 24 Aug 2006, Adrian Parker wrote: > Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use > RXTX 2.0? Does it provide system librairies that javax.comm does not? > > I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's > OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, > or 2000, or server 2003). Can this be done with a single implementation of > RXTX? I don't want to have different versions of Java code that have > different package names. > Hi Adrian. The native code can support all of the platforms you mention. I've never compiled for unixware or openunix but the patches are in the code. So you would need to compile for that target. >From there you would probably be best off going with rxtx 2.1 so you have all the classes in one package. You can opt to use rxtx 2.0 with Sun's commapi for Solaris v 2. The main differences are rxtx 2.1 comes with all the source/classes and is in package gnu.io while Sun's requires rxtx for some platforms but is in package javax.comm. The low level code is the same in either case as far as rxtx is concerned. -- Trent Jarvi tarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 04:12:52 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 06:12:52 -0400 Subject: [Rxtx] Serial.addEventListener bug? Message-ID: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on OpenServer 5.0.7). Its what Sun packages. I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an exception. It seems to throw the exception if no listener was previously declared (although I've not had chance to verify). Is this desireable behaviour? Sun's original API doesn't mention anything about an exception on this function, http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) Of course this is an old version of RXTX, so perhaps this has been changed. -- Adrian Parker Simulation Software Developer DLCSPM 4-4-3 (c) Building A31, CFB Kingston Tel: (613) 541-5010 x3020 CSN: 271-3020 Email: parker at lsec.dnd.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/22e2ea57/attachment-0005.html From tjarvi at qbang.org Fri Aug 25 05:15:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 25 Aug 2006 05:15:44 -0600 (MDT) Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: On Fri, 25 Aug 2006, Adrian Parker wrote: > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > OpenServer 5.0.7). Its what Sun packages. > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > exception. It seems to throw the exception if no listener was previously > declared (although I've not had chance to verify). > > Is this desireable behaviour? Sun's original API doesn't mention anything > about an exception on this function, > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > Of course this is an old version of RXTX, so perhaps this has been changed. > > > What exception was thrown? You can replace 1.4-8 with 2.0 for testing purposes. They are the same package. I doubt Sun shipped or packaged that. I think Caldera/SCOx/... did at one point. There may still be updates on their pages. I recall them sending patches here which are in current rxtx. -- Trent Jarvi tjarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 05:28:32 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 07:28:32 -0400 Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: <7da71e910608250428q32b86632g9a67b1b4efe69830@mail.gmail.com> On 8/25/06, Trent Jarvi wrote: > > On Fri, 25 Aug 2006, Adrian Parker wrote: > > > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > > OpenServer 5.0.7). Its what Sun packages. > > > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > > exception. It seems to throw the exception if no listener was > previously > > declared (although I've not had chance to verify). > > > > Is this desireable behaviour? Sun's original API doesn't mention > anything > > about an exception on this function, > > > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > > > Of course this is an old version of RXTX, so perhaps this has been > changed. > > > > > > > > What exception was thrown? Its weird. I catch an Exception. But when on that exception I call getClass().getName() I end up with a NullPointerException. You can replace 1.4-8 with 2.0 for testing > purposes. They are the same package. > > I doubt Sun shipped or packaged that. Doh! I meant to say SCO sorry. I was surfing Sun's site when I wrote that :) Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/e43aed3a/attachment-0005.html From sjudd at seas.upenn.edu Sat Aug 26 16:42:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Sat, 26 Aug 2006 18:42:09 -0400 Subject: [Rxtx] Mac commapi Message-ID: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? If so, where do I get it? Sun has various versions at http://www.sun.com/download/products.xml?id=43208d3d but they are for SolarisSparc, SolarisX86, Linux, and Generic. Do I use the Generic one? If so, read on; otherwise redirect me. While using the Generic version, my attempt to run the BlackBox sample program elicits a message saying it "can't find javax.comm.properties". I found a note in the rxtx.org HowTo (for Linux) saying to create this thing in /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties but where should it go on the Mac? After reading many versions of documentation around, and updates and revisions and re-authorings, I have worked my way into a state of confusion and high uncertainty. Please release me. sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060826/02d6b163/attachment-0005.html From tod at todbot.com Sat Aug 26 17:08:33 2006 From: tod at todbot.com (Tod E. Kurt) Date: Sat, 26 Aug 2006 16:08:33 -0700 Subject: [Rxtx] Mac commapi In-Reply-To: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Message-ID: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> You don't need Sun's CommAPI. You just need RXTX. Once you download RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and the native library is ("librxtxSerial.jnilib" on Mac OS X) via the standard methods. For instance, if you've placed those two files in a directory called 'rxtxlib' and you want to run a Java class called HelloWorld in the current directory, do the following: % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar HelloWorld On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? > If so, where do I get it? Sun has various versions at > http://www.sun.com/download/products.xml?id=43208d3d > but they are for SolarisSparc, SolarisX86, Linux, and Generic. > Do I use the Generic one? > If so, read on; otherwise redirect me. > > While using the Generic version, my attempt to run the BlackBox > sample program > elicits a message saying it "can't find javax.comm.properties". > I found a note in the rxtx.org HowTo (for Linux) saying to create > this thing in > /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties > but where should it go on the Mac? > > After reading many versions of documentation around, and updates > and revisions > and re-authorings, I have worked my way into a state of confusion > and high > uncertainty. Please release me. > > sj > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From sjudd at seas.upenn.edu Sun Aug 27 22:55:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Mon, 28 Aug 2006 00:55:09 -0400 Subject: [Rxtx] Mac commapi In-Reply-To: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> Message-ID: This was immensely helpful. Thank you, Tod. I wish it had been explicit somewhere in the documentation; it would have saved me 2 days of grief. One hugely valuable thing like this little set of instructions is that it implicitly lists all the hundreds of things you DON"T have to do. I know it seems obvious to those in the know, but every little bit of help on an arcane topic like this opens up the product to an exponentially wider group of dilettantes. I managed to get the SerialDemo program (from Sun) to work too. Hurrah! However, it required changing all the javax.comm references to gnu.io which I had heard of due to all my rambling readings. Is there not a demo program on rxtx.org already available that would not have needed this? BTW, the link on the Projects page for jPIC[Source] sends a *.hex file to a PIC 16F877 or similar chip... takes me to nowhere useful. I do not understand what the name "Toybox" is meant to imply. Thanks, sj On 2006 Aug 26, at 7:08 PM, Tod E. Kurt wrote: > You don't need Sun's CommAPI. You just need RXTX. Once you download > RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and > the native library is ("librxtxSerial.jnilib" on Mac OS X) via the > standard methods. > > For instance, if you've placed those two files in a directory called > 'rxtxlib' and you want to run a Java class called HelloWorld in the > current directory, do the following: > > % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar > HelloWorld > > > On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > >> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? >> If so, where do I get it? Sun has various versions at >> http://www.sun.com/download/products.xml?id=43208d3d >> but they are for SolarisSparc, SolarisX86, Linux, and Generic. >> Do I use the Generic one? >> If so, read on; otherwise redirect me. >> >> While using the Generic version, my attempt to run the BlackBox >> sample program >> elicits a message saying it "can't find javax.comm.properties". >> I found a note in the rxtx.org HowTo (for Linux) saying to create >> this thing in >> /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties >> but where should it go on the Mac? >> >> After reading many versions of documentation around, and updates >> and revisions and re-authorings, I have worked my way into a state >> of confusion and high uncertainty. Please release me. >> >> sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060827/b80d6389/attachment-0005.html From pete.flugstad at gmail.com Mon Aug 28 12:38:27 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 13:38:27 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE Message-ID: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Okay, my understanding is that originally, RTS meant "Request to Send" - the DTE (the PC) would assert this and the DCE (modem) would assert "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send data. This really only provided uni-directional flow control, from the PC to the modem. Now, as I understand it, the more modern usage of RTS is that it is used for the DTE to assert flow control back to the DCE - basically it means "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) raises this, then the DCE(modem) is free to send data to the DTE - this allows the DTE(PC) to exert flow control back towards the DCE(modem). This discussion is based on the Serial HOWTO from: and lots of other reading... Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which is defined as: > Enables RTS flow-control handshaking. The driver raises the RTS line, > enabling the DCE to send, when the input buffer has enough room to > receive data. The driver lowers the RTS line, preventing the DCE to > send, when the input buffer does not have enough room to receive > data. If this value is used, it is an error for the application to adjust > the line with EscapeCommFunction. which clearly reflects the newer usage style - it keeps the RTS line high as long as there is space to _receive_ data. And takes it low when the receive/input buffer is getting full to stop the modem from sending it data. Does this jive with other peoples understanding of RTS usage? Unfortunately, the hardware I'm trying to talk to wants to use the OLD style of RTS line usage. An existing Windows C++ program uses RTS_CONTROL_TOGGLE, which documentation states: > Specifies that the RTS line will be high if bytes are available for transmission. > After all buffered bytes have been sent, the RTS line will be low. If this value is > set, it would be an error for an application to adjust the line with > EscapeCommFunction. This value is ignored in Windows 95; it causes the > driver to act as if RTS_CONTROL_ENABLE were specified. This seems to be the OLD RTS behavior, right? So, what I seem to need is to be able to control the RTS line, either using TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS when getting ready to TX and clear it when the output buffer is empty). Does this make sense, or am I off in the weeds? Thanks, Pete From tjarvi at qbang.org Mon Aug 28 18:21:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 28 Aug 2006 18:21:10 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: On Mon, 28 Aug 2006, Pete Flugstad wrote: > Okay, my understanding is that originally, RTS meant "Request to Send" > - the DTE (the PC) would assert this and the DCE (modem) would assert > "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send > data. This really only provided uni-directional flow control, from the PC to > the modem. > > Now, as I understand it, the more modern usage of RTS is that it is used > for the DTE to assert flow control back to the DCE - basically it means > "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) > raises this, then the DCE(modem) is free to send data to the DTE - this > allows the DTE(PC) to exert flow control back towards the DCE(modem). > > This discussion is based on the Serial HOWTO from: > > > > and lots of other reading... > > Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > is defined as: > >> Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > > which clearly reflects the newer usage style - it keeps the RTS line high > as long as there is space to _receive_ data. And takes it low when the > receive/input buffer is getting full to stop the modem from sending it data. > > Does this jive with other peoples understanding of RTS usage? > > Unfortunately, the hardware I'm trying to talk to wants to use the OLD > style of RTS line usage. An existing Windows C++ program uses > RTS_CONTROL_TOGGLE, which documentation states: > >> Specifies that the RTS line will be high if bytes are available for transmission. >> After all buffered bytes have been sent, the RTS line will be low. If this value is >> set, it would be an error for an application to adjust the line with >> EscapeCommFunction. This value is ignored in Windows 95; it causes the >> driver to act as if RTS_CONTROL_ENABLE were specified. > > This seems to be the OLD RTS behavior, right? > > So, what I seem to need is to be able to control the RTS line, either using > TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS > when getting ready to TX and clear it when the output buffer is empty). > > Does this make sense, or am I off in the weeds? > Hi Pete OK. That sounds right. I do not know how you would communicate the difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through CommAPI as it stands. I take it you did not find anything either? Perhaps the best thing to do for your code is to toggle the RTS yourself. This could be a feature in the future JSR API perhaps. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 28 20:54:34 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 21:54:34 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <44F3AC6A.10908@gmail.com> Trent Jarvi wrote: > OK. That sounds right. I do not know how you would communicate the > difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through > CommAPI as it stands. I take it you did not find anything either? > > Perhaps the best thing to do for your code is to toggle the > RTS yourself. This could be a feature in the future JSR API perhaps. Yeah, this is what I ended up doing. I had to modify the dll in order to be able to set hardware flow control (which I do want), but leave the RTS flow control at RS_CONTROL_ENABLE. After that I just toggle setRTS(true) when I'm ready to send and setRTS(false) when I get a OUTPUT_BUFFER_EMPTY notification. Haven't tested with real hardware yet, but it seems to work OK. Thanks for the feedback! Pete From Bob_Jacobsen at lbl.gov Tue Aug 29 08:49:02 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 29 Aug 2006 07:49:02 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >is defined as: > > > Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > >which clearly reflects the newer usage style - it keeps the RTS line high >as long as there is space to _receive_ data. And takes it low when the >receive/input buffer is getting full to stop the modem from sending it data. > >Does this jive with other peoples understanding of RTS usage? Can you point to any devices that actually implement this "new" understanding? I think the person who wrote that documentation paragraph is just confused. The original "RTS/CTS" handshaking was extended to input (from DCE to DTE) handshaking via the DTR (Data Terminal Ready) line. I think the person who wrote the double-quoted paragraph above was just confused between the directions, and mixed them up. If you change "RTS" to "DTR" in that paragraph, you get: > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > enabling the DCE to send, when the input buffer has enough room to > > receive data. The driver lowers the DTR line, preventing the DCE to > > send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. which describes how dozens of devices actually work for controlling flow into the DTE (computer). This then leaves RTS/CTS (with RTS usually just stuck high) for controlling flow into the DCE (peripheral). Again, lots of hardware devices actually do this. I don't work on Windows, so can't be sure of what happens. But on the MacOS X version of RXTX, CTS low stops transmission, exactly as the "old" style would expect. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From mschned at basis.com Tue Aug 29 12:57:45 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 12:57:45 -0600 Subject: [Rxtx] Porting to AIX Message-ID: <01f201c6cb9d$034d4f20$341416ac@basis.com> Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar From mschned at basis.com Tue Aug 29 13:58:05 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 13:58:05 -0600 Subject: [Rxtx] Porting to AIX References: <01f201c6cb9d$034d4f20$341416ac@basis.com> Message-ID: <024901c6cba5$714c3560$341416ac@basis.com> After looking through the build messages closer, there is an error building SerialImp.c: gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type Looks like B57600 is not defined and there are no definitions for DEVICEDIR and LOCKDIR on AIX. Can I just a the following to SerialImp.h? #if defined(__aix__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __aix__ */ Mark Schnedar ----- Original Message ----- From: "Mark E. Schnedar" To: Sent: Tuesday, August 29, 2006 12:57 PM Subject: [Rxtx] Porting to AIX Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 29 15:25:35 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 29 Aug 2006 16:25:35 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <84d4a6d50608291425i1fb819d3i615cf9b85b1e9617@mail.gmail.com> On 8/29/06, Bob Jacobsen wrote: > Can you point to any devices that actually implement this "new" understanding? > > I think the person who wrote that documentation paragraph is just confused. The paragraph is from the Windows documentation of its DCB structure which is used to configure the Serial Device. This is what RXTX uses internally. My version is from MSDN, and Google finds the same text here: (search for fRtsControl). I have not seen any mention anywhere of it being incorrect (and yes, I did look, because I thought the same thing). My discussion is based on trying to use RXTX to talk to a device that used the old style of one-way flow control (RTS is raised to SEND data from the PC to the device). An existing VC++ app use the old-style RTS_CONTROL_TOGGLE. RXTX did not - it used the newer style RTS_CONTROL_HANDSHAKE, so things didn't work - the device was seeing RTS HIGH all the time, so it was thinking that the PC was ready to TX all the time. When I switch RXTX to using RTS_CONTROL_ENABLED and manually control RTS, then things work correctly. The behavior is consistent with this understanding if I hook two serial ports on Windows XP in lookback (via null modem). I'd be very surprised if this had not been corrected by M$ by this time. The same structure has been around since WinNT (mid 1990's) - their documentation is typically pretty good. > > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > > enabling the DCE to send, when the input buffer has enough room to > > > receive data. The driver lowers the DTR line, preventing the DCE to > > > send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. There is a seperate field, fDtrControl, which you can set to DTR_CONTROL_HANDSHAKE, that appears to do exactly this. > This then leaves RTS/CTS (with RTS usually just stuck high) for > controlling flow into the DCE (peripheral). Again, lots of hardware > devices actually do this. > > I don't work on Windows, so can't be sure of what happens. But on > the MacOS X version of RXTX, CTS low stops transmission, exactly as > the "old" style would expect. Well, the Linux Serial HOWTO is where I got most of my information. And yes, I thought it was wrong as well, but it's apparently how things are implemented: Donno - but it works for me... Pete From tjarvi at qbang.org Tue Aug 29 19:11:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 29 Aug 2006 19:11:40 -0600 (MDT) Subject: [Rxtx] Porting to AIX In-Reply-To: <024901c6cba5$714c3560$341416ac@basis.com> References: <01f201c6cb9d$034d4f20$341416ac@basis.com> <024901c6cba5$714c3560$341416ac@basis.com> Message-ID: Hi Mark That should do it. You can put ifdef around the B57600 as we did with higher baudrates. You may want to use tip, minicom, kermit or some other serial application on the AIX to confirm that the lockfiles created are correct. Neat stuff. On Tue, 29 Aug 2006, Mark E. Schnedar wrote: > After looking through the build messages closer, > there is an error building SerialImp.c: > > gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o > /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type > > Looks like B57600 is not defined and there are no > definitions for DEVICEDIR and LOCKDIR on AIX. > > Can I just a the following to SerialImp.h? > > #if defined(__aix__) > # define DEVICEDIR "/dev/" > # define LOCKDIR "/var/lock" > # define LOCKFILEPREFIX "LCK.." > # define FHS > #endif /* __aix__ */ > > Mark Schnedar > > > ----- Original Message ----- > From: "Mark E. Schnedar" > To: > Sent: Tuesday, August 29, 2006 12:57 PM > Subject: [Rxtx] Porting to AIX > > > Hi, > > I'm new to rxtx. Currently my company has an interpreter product > that uses rxtx on Windows and Linux. I am trying to get rxtx to > build on AIX. I downloaded rxtx, ran ./configure and make. When > I run make I get the following error: > > libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object > make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 > > Do you have any suggestions on how to fix this problem? > > I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error > on both systems). I did have our system administrator load > automake, autoconf, make (gnu), and gcc. Here are the versions: > > AIX 4.3.3 AIX 5.3.0 > rxtx: 2.1-7r2 2.1-7r2 > autoconf: 2.53 2.59 > automake: 1.5 1.8.5 > make: 3.79.1 3.80 > gcc: (used native cc) 4.0.0 > > Any help would be appreciated. > > Mark Schnedar > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From guille at sms.nl Wed Aug 30 01:14:32 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 09:14:32 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <7.0.1.0.0.20060830091204.03652de0@sms.nl> At 16:49 29/08/2006, Bob Jacobsen wrote: >At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > > > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >is defined as: > > > > > Enables RTS flow-control handshaking. The driver raises the RTS line, > >> enabling the DCE to send, when the input buffer has enough room to > >> receive data. The driver lowers the RTS line, preventing the DCE to > >> send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. > > > >which clearly reflects the newer usage style - it keeps the RTS line high > >as long as there is space to _receive_ data. And takes it low when the > >receive/input buffer is getting full to stop the modem from sending it data. > > > >Does this jive with other peoples understanding of RTS usage? > >Can you point to any devices that actually implement this "new" understanding? Many (most) of the embedded devices we work with implement this kind of flow control. The host (DTE) raises RTS when it can receive data, and lowers it when the input buffers are full. In turn it watches the CTS line to see whether it can send data to the DCE. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From tjarvi at qbang.org Wed Aug 30 01:23:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 30 Aug 2006 01:23:46 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830091204.03652de0@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 16:49 29/08/2006, Bob Jacobsen wrote: >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: >>> >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >>> is defined as: >>> >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, >>>> enabling the DCE to send, when the input buffer has enough room to >>>> receive data. The driver lowers the RTS line, preventing the DCE to >>>> send, when the input buffer does not have enough room to receive >>>> data. If this value is used, it is an error for the application to adjust >>>> the line with EscapeCommFunction. >>> >>> which clearly reflects the newer usage style - it keeps the RTS line high >>> as long as there is space to _receive_ data. And takes it low when the >>> receive/input buffer is getting full to stop the modem from sending it data. >>> >>> Does this jive with other peoples understanding of RTS usage? >> >> Can you point to any devices that actually implement this "new" understanding? > > Many (most) of the embedded devices we work with implement this kind of flow > control. The host (DTE) raises RTS when it can receive data, and lowers it > when the input buffers are full. In turn it watches the CTS line to see > whether it can send data to the DCE. > I think this explains some hardware control 'bugs' I've seen. -- Trent Jarvi tjarvi at qbang.org From guille at sms.nl Wed Aug 30 02:01:35 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 10:01:35 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> At 09:23 30/08/2006, Trent Jarvi wrote: >On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > > > At 16:49 29/08/2006, Bob Jacobsen wrote: > >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >>> > >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >>> is defined as: > >>> > >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, > >>>> enabling the DCE to send, when the input buffer has enough room to > >>>> receive data. The driver lowers the RTS line, preventing the DCE to > >>>> send, when the input buffer does not have enough room to receive > >>>> data. If this value is used, it is an error for the > application to adjust > >>>> the line with EscapeCommFunction. > >>> > >>> which clearly reflects the newer usage style - it keeps the RTS line high > >>> as long as there is space to _receive_ data. And takes it low when the > >>> receive/input buffer is getting full to stop the modem from > sending it data. > >>> > >>> Does this jive with other peoples understanding of RTS usage? > >> > >> Can you point to any devices that actually implement this "new" > understanding? > > > > Many (most) of the embedded devices we work with implement this > kind of flow > > control. The host (DTE) raises RTS when it can receive data, and lowers it > > when the input buffers are full. In turn it watches the CTS line to see > > whether it can send data to the DCE. > > > >I think this explains some hardware control 'bugs' I've seen. I think the above is the most widespread use, but that may just mean it is the most widespread use in our specific segment (embedded systems). Some UART chips (e.g. from Exar) implement this kind of flow control directly in hardware. For example the Exar can be configured to suspend transmission when it sees CTS low, and resume transmission when it sees CTS high. This is also consistent with our experience. Maybe this helps clarify: http://www.tldp.org/HOWTO/Text-Terminal-HOWTO-10.html#ss10.7 Note the "Old RTS/CTS handshaking is different" section, which refers to "older terminals" whereas newer equipment would use RTS/CTS flow control (or equivalently DTR/DTS) as described above. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From Bob_Jacobsen at lbl.gov Wed Aug 30 07:55:31 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 30 Aug 2006 06:55:31 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> <7.0.1.0.0.20060830095557.0374ff28@sms.nl> Message-ID: I think we all agree that CTS inactive means "Send no more from DTE to DCE". The question is how to express the other direction, "Send no more from DCE to DTE". There are two parts to this question: What do various DTE-like devices do, and what do various DCE-like devices expect? Electrically, the lines that go that direction are DTR, DCD, and RTS (plus some special-purpose lines that are rarely present). All three devices I work most with respect the DTR lead. On the other hand, the FTDI chips for doing serial over USB provide either (RTS and CTS) or (DTR and DSR) as the two leads. What we're probably seeing is two different approaches, that have propagated separately. That's a problem. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From Pawan.Kharbanda at dot.state.co.us Wed Aug 30 09:07:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 30 Aug 2006 09:07:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0455E5E5@hqexchange3.dot.state.co.us> Trent, Sorry for not responding earlier to your email. I was actually waiting for the release of our software on the new Hardware. As I mentioned in my previous emails, RXTX crashes and locks up serial ports with the older version of Redhat (Linux 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:28:55 EDT 2005 i686 i686 i386 GNU/Linux), it might work ok if you are using one or 2 ports but anything more than that it has issues. I was using JDK1.5.0_06 and older firmwares of Digi boxes. Let me know if you need any more specific information of the older system. Thanks Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Thursday, August 10, 2006 5:40 AM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even > after 10000 operations (now I am trying 100,000 :). This is all with > the original RXTX 2.1.7 (final) api's without any of my fixes that I > have been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying > the RXTX saying the suggested kernel for Redhat Linux is > 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Aug 1 01:11:30 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 1 Aug 2006 09:11:30 +0200 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <34B6BC40-1405-4A13-8054-0FC6CE10466A@buechse.de> This is a problem with lock files. You should find it somewhere in the documentation... On 01.08.2006, at 03:53, Richard P. Welty wrote: > trying to get my app running on a Mac OS X powerbook, when > the following is executed as the first thing inside the > run method of a Thread: > > > try { > port = (SerialPort) selectedPort.open( > this.getClass().getName(), 2000); > } catch ( PortInUseException ex){ > ex.printStackTrace(); > return; > } > > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java: > 354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run > (ScaleWatcher.java:143) > > i've not seen any documentation suggesting that rxtx would be finicky > about application names... > > thanks for any suggestions, > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From rwelty at suespammers.org Tue Aug 1 05:37:53 2006 From: rwelty at suespammers.org (Richard P. Welty) Date: Tue, 01 Aug 2006 07:37:53 -0400 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <44CF3D11.9060108@suespammers.org> Richard P. Welty wrote: > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) Aha, a confusing error message. it's really a lock file problem; the code is trying to fill in the application name but when it's getting "Unknown Application" and filling that in... richard From ajmas at sympatico.ca Tue Aug 1 13:10:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:10:59 -0400 Subject: [Rxtx] Application Name? Message-ID: <20060801191059.HFCD18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> You need the source code in CVS. The forth coming 2.18 will correct this, but currently the only place to find the correction is in CVS. No idea when 2.18 is due. > > From: "Richard P. Welty" > Date: 2006/08/01 Tue AM 07:37:53 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Application Name? > > Richard P. Welty wrote: > > > i get the following: > > > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > at > > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) > > Aha, a confusing error message. it's really a lock file problem; the > code is trying to fill in the application name but when it's getting > "Unknown Application" and filling that in... > > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:15:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:15:57 -0400 Subject: [Rxtx] Do interfaces break backwards compatibility? Message-ID: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> It is the class that decides to add serializable that needs to worry about those issues. For the most part serial ports and their connection states should be considered as transient, since there is no guarantee they will still be present or that their state will be, especially in a USB world. What you can store is the port settings and port id and then simply test for port availability next time. Nothing else should be assumed. > > From: Gregg Wonderly > Date: 2006/07/31 Mon PM 01:21:19 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Do interfaces break backwards compatibility? > > Doug Berkland wrote: > > As far as I can tell, nothing in either RXTX or Sun's JavaCOMM > > implements Serializable. Therefore, there are no worries from that > > either. (I can't think of a reason anything in JavaCOMM should > > implement Serializable either.) > > Any interface in javax.comm can become implemented by a serializable object. > Thus, if someone wants to provide remote access to a serial port, then they > might (and I think this is not wise) choose to subclass and add Serializable to > the interface list. > > It's that kind of Serialization compatibility that I'm talking about. > > Gregg Wonderly > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:18:11 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:18:11 -0400 Subject: [Rxtx] precompiled for Intel Mac? Message-ID: <20060801191811.FLJY27612.tomts16-srv.bellnexxia.net@smtp1.sympatico.ca> > > From: Joachim Buechse > There will be. However not before we have figured out some remaining issues. What issues are remaining? Andre From Pawan.Kharbanda at dot.state.co.us Tue Aug 1 16:55:08 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 1 Aug 2006 16:55:08 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Hi, I am also experiencing occasional JVM crash thru the native code. I am attaching the log from the crash. Any ideas what might be causing it???? Regards Pawan Kharbanda # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # --------------- T H R E A D --------------- Current thread (0x8d000480): JavaThread "Thread-119" [_thread_in_native, id=111 51] siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba Registers: EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 Top of Stack: (sp=0x8d3482b8) 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 0x8d348308: 00000000 00000002 00000000 00000000 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 Instructions: (pc=0xb75e39b2) 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~StubRoutines::call_stub V [libjvm.so+0x2607ec] V [libjvm.so+0x423828] V [libjvm.so+0x260045] V [libjvm.so+0x2600de] V [libjvm.so+0x2d7745] V [libjvm.so+0x4c2ba3] V [libjvm.so+0x424338] C [libpthread.so.0+0x4dd8] 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 ) =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, id=11026] 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, id=11023] From tjarvi at qbang.org Tue Aug 1 18:46:21 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 1 Aug 2006 18:46:21 -0600 (MDT) Subject: [Rxtx] JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Message-ID: On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) > C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 > C [librxtxSerial.so+0x6c00] Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] > 0x8df26950 JavaThread "Thread ::: /dev/cuf04" [_thread_in_native, > id=11034] > 0x8df25c10 JavaThread "Thread ::: /dev/cuf03" [_thread_in_native, > id=11033] > 0x8df248d0 JavaThread "Thread ::: /dev/cuf02" [_thread_blocked, > id=11032] > 0x8df24170 JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, > id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] > 0x8df01620 JavaThread "CompilerThread1" daemon [_thread_blocked, > id=11028] > 0x8df006d0 JavaThread "CompilerThread0" daemon [_thread_blocked, > id=11027] > 0x0811d3e0 JavaThread "AdapterThread" daemon [_thread_blocked, > id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] > 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- Index: termios.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/termios.c,v retrieving revision 1.9.2.57 diff -u -r1.9.2.57 termios.c --- termios.c 4 Jun 2006 02:50:01 -0000 1.9.2.57 +++ termios.c 11 Jun 2006 21:51:10 -0000 @@ -1048,26 +1048,29 @@ if ( !first_tl ) { port->prev = NULL; + port->next = NULL; first_tl = port; } else { - while ( index->next ) + while ( ( index->fd < port->fd ) && index->next ) index = index->next; - if ( port == first_tl ) + if ( index->fd > port->fd ) { - port->prev = NULL; - port->next = first_tl; - first_tl->prev = port; - first_tl = port; + /* inserting previously closed fd */ + port->prev = index->prev; + port->next=index + index->prev->next = port; + index->prev = port; } else { + /* adding to end of list */ port->prev = index; + port->next = NULL; index->next = port; } } - port->next = NULL; LEAVE( "add_port" ); return port; From gergg at cox.net Tue Aug 1 23:25:19 2006 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 02 Aug 2006 00:25:19 -0500 Subject: [Rxtx] Do interfaces break backwards compatibility? In-Reply-To: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <44D0373F.7020600@cox.net> Andre-John Mas wrote: > It is the class that decides to add serializable that needs to worry about those issues. > For the most part serial ports and their connection states should be considered as > transient, since there is no guarantee they will still be present or that their state > will be, especially in a USB world. Right, but when you provide an interface as the standard, that opens the doors for a lot more interpretation and variation. An abstract class can indicate a lot more about what the expected implementation is. Gregg Wonderly From lyon at docjava.com Wed Aug 2 06:02:15 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:02:15 -0400 Subject: [Rxtx] jsr spec and license issues Message-ID: Hi All, Trent and I have been discussing the license issues of the JSR spec and code that we develop, as a community. Here is what we have come up with: >During the development, the new JSR spec that we derive >will be >covered under the LGPL license. Since it is >just interfaces, any contributions will come back to me, for inclusion >into the specification. The goal is to provide a detailed set of >interfaces that >document the present state of our reference model. I am using >the RXTX as the reference model. If there is something missing from >the reference model, or if the reference model has something that should >not be there, we will need to discuss it. > >After Sun accepts the JSR, I, as the copyright holder, can issue >a version with a JSR compatible license. > >The goal is to migrate the interfaces into javax.comm. Does this sound like a reasonable plan to everyone? Thanks! - Doug From joachim at buechse.de Wed Aug 2 06:21:03 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 14:21:03 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Good day, quite frankly I think that this is a very bad idea. This specification (!) should be in the public domain and nowhere else. Defining a spec under the (L)GPL makes absolutely no sense. After all it is a specification not an implementation. There is no or only trivial code attached to it. So while nothing can be gained by putting it under the LGPL, a lot can be lost - for example the contribution of companies that do not like to open source their implementations. Furthermore you are plain wrong assuming you will be the copyright holder to additions made by other people. Best regards, Joachim On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for >> inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that >> should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Wed Aug 2 06:39:28 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 08:39:28 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Hi All, I don't know anything about licensing issues. The below sounds reasonable. If we make this public domain, will that be compatible with Sun's JSR? Thanks! - DL P.S. I really don't care what we do, as long as there is some sort of collective agreement. >Good day, > >quite frankly I think that this is a very bad idea. This specification >(!) should be in the public domain and nowhere else. > >Defining a spec under the (L)GPL makes absolutely no sense. After all? >it is a specification not an implementation. There is no or only? >trivial code attached to it. So while nothing can be gained by? >putting it under the LGPL, a lot can be lost - for example the? >contribution of companies that do not like to open source their? >implementations. > >Furthermore you are plain wrong assuming you will be the copyright? >holder to additions made by other people. > >Best regards, >Joachim > > >On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for? >>> inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that? >>> should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> >> Does this sound like a reasonable plan to everyone? >> >> Thanks! >> - Doug >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 07:50:09 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 10:50:09 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D0AD91.4080103@gmail.com> Hi, I have been searching the web and here it is: http://jcp.org/en/resources/license_reference Here there is a list of the licenses that are compatible with the JCP for JSR submitting. I think that Apache, CDDL, CPL and OSL are the one that are compatible with our needs. But I think that Apache is the best for us, Doug why do not make a votation? Regards, Manuel > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. > >> Good day, >> >> quite frankly I think that this is a very bad idea. This specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From lyon at docjava.com Wed Aug 2 08:10:55 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 02 Aug 2006 10:10:55 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D0AD91.4080103@gmail.com> References: <44D0AD91.4080103@gmail.com> Message-ID: Hi All, I have no objection to an Apache license for the JSR interfaces that we produce. Would anyone care to comment? Joachim: Does this address your public domain concerns? How does this impact the reference implementation (i.e. RXTX)? Thanks! - DL >Hi, >I have been searching the web and here it is: >http://jcp.org/en/resources/license_reference >Here there is a list of the licenses that are compatible with the JCP >for JSR submitting. >I think that Apache, CDDL, CPL and OSL are the one that are compatible >with our needs. >But I think that Apache is the best for us, Doug why do not make a votation? >Regards, >Manuel > >> Hi All, >> I don't know anything about licensing issues. >> The below sounds reasonable. If we make this public domain, >> will that be compatible with Sun's JSR? >> Thanks! >> - DL >> P.S. I really don't care what we do, as long as there is >> some sort of collective agreement. >>?? >>> Good day, >>> >>> quite frankly I think that this is a very bad idea. This specification >>> (!) should be in the public domain and nowhere else. >>> >>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>> it is a specification not an implementation. There is no or only >>> trivial code attached to it. So while nothing can be gained by >>> putting it under the LGPL, a lot can be lost - for example the >>> contribution of companies that do not like to open source their >>> implementations. >>> >>> Furthermore you are plain wrong assuming you will be the copyright >>> holder to additions made by other people. >>> >>> Best regards, > >> Joachim >>> >>> >>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>> >>>???? >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>?????? >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for >>>>> inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that >>>>> should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>>>???????? >>>> Does this sound like a reasonable plan to everyone? >>>> >>>> Thanks! >>>> - Doug >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>?????? >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>???? >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From naranjo.manuel at gmail.com Wed Aug 2 08:20:29 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 11:20:29 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D0AD91.4080103@gmail.com> Message-ID: <44D0B4AD.2050106@gmail.com> Doug; > How does this impact the reference implementation (i.e. RXTX)? > Fuck I have not thinked about that, we would need that everyone who had colaborated with RXTX and have putted code on it to agree a license chaging. Or start from sractch. I don't know if Trent have the right to do that. Regards, Manuel > > >> Hi, >> I have been searching the web and here it is: >> http://jcp.org/en/resources/license_reference >> Here there is a list of the licenses that are compatible with the JCP >> for JSR submitting. >> I think that Apache, CDDL, CPL and OSL are the one that are compatible >> with our needs. >> But I think that Apache is the best for us, Doug why do not make a votation? >> Regards, >> Manuel >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> >> >> Joachim >> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 08:21:15 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 16:21:15 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: Putting something in the public domain means, that it can be used by anyone for whatever (s)he thinks is appropriate. The authors define no restriction regarding it's use. That's how any specification should be. Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From berkland at spamcop.net Wed Aug 2 08:50:50 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 10:50:50 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> You may want to consider making it available under two separate licenses. 1 - LGPL as it is today The LGPL can be used by anyone wanting to extend the current functionality, as long as they provide code for anything they change. 2 - Sun Community Source License (SCSL) http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf The SCSL will allow anyone who wants to do a closed source implementation from the ground up to do so, if I'm reading it correctly, as long as they don't use any of the code from the Reference Implementation. This will satisfy any company that wants to have a closed-source implementation, but not help them out very much. On 8/2/06, Joachim Buechse wrote: > Putting something in the public domain means, that it can be used by > anyone for whatever (s)he thinks is appropriate. The authors define > no restriction regarding it's use. That's how any specification > should be. > > Best regards, > Joachim > > > On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > > > Hi All, > > I don't know anything about licensing issues. > > The below sounds reasonable. If we make this public domain, > > will that be compatible with Sun's JSR? > > Thanks! > > - DL > > P.S. I really don't care what we do, as long as there is > > some sort of collective agreement. > >> Good day, > >> > >> quite frankly I think that this is a very bad idea. This > >> specification > >> (!) should be in the public domain and nowhere else. > >> > >> Defining a spec under the (L)GPL makes absolutely no sense. After all > >> it is a specification not an implementation. There is no or only > >> trivial code attached to it. So while nothing can be gained by > >> putting it under the LGPL, a lot can be lost - for example the > >> contribution of companies that do not like to open source their > >> implementations. > >> > >> Furthermore you are plain wrong assuming you will be the copyright > >> holder to additions made by other people. > >> > >> Best regards, > >> Joachim > >> > >> > >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: > >> > >>> Hi All, > >>> Trent and I have been discussing the license issues of the > >>> JSR spec and code that we develop, as a community. > >>> Here is what we have come up with: > >>> > >>>> During the development, the new JSR spec that we derive > >>>> will be > >>>> covered under the LGPL license. Since it is > >>>> just interfaces, any contributions will come back to me, for > >>>> inclusion > >>>> into the specification. The goal is to provide a detailed set of > >>>> interfaces that > >>>> document the present state of our reference model. I am using > >>>> the RXTX as the reference model. If there is something missing > >>>> from > >>>> the reference model, or if the reference model has something that > >>>> should > >>>> not be there, we will need to discuss it. > >>>> > >>>> After Sun accepts the JSR, I, as the copyright holder, can issue > >>>> a version with a JSR compatible license. > >>>> > >>>> The goal is to migrate the interfaces into javax.comm. > >>> > >>> Does this sound like a reasonable plan to everyone? > >>> > >>> Thanks! > >>> - Doug > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From naranjo.manuel at gmail.com Wed Aug 2 09:03:02 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 12:03:02 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> References: <269e40090608020750u2420b907k955850672d060a2e@mail.gmail.com> Message-ID: <44D0BEA6.2040408@gmail.com> Or even better, you can use Apache v2, which allows both Open Source and Closed Source forms ;-) > You may want to consider making it available under two separate licenses. > > 1 - LGPL as it is today > > The LGPL can be used by anyone wanting to extend the current > functionality, as long as they provide code for anything they change. > > 2 - Sun Community Source License (SCSL) > http://jcp.org/aboutJava/communityprocess/SCSL3.0.rtf > > The SCSL will allow anyone who wants to do a closed source > implementation from the ground up to do so, if I'm reading it > correctly, as long as they don't use any of the code from the > Reference Implementation. This will satisfy any company that wants to > have a closed-source implementation, but not help them out very much. > > On 8/2/06, Joachim Buechse wrote: > >> Putting something in the public domain means, that it can be used by >> anyone for whatever (s)he thinks is appropriate. The authors define >> no restriction regarding it's use. That's how any specification >> should be. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: >> >> >>> Hi All, >>> I don't know anything about licensing issues. >>> The below sounds reasonable. If we make this public domain, >>> will that be compatible with Sun's JSR? >>> Thanks! >>> - DL >>> P.S. I really don't care what we do, as long as there is >>> some sort of collective agreement. >>> >>>> Good day, >>>> >>>> quite frankly I think that this is a very bad idea. This >>>> specification >>>> (!) should be in the public domain and nowhere else. >>>> >>>> Defining a spec under the (L)GPL makes absolutely no sense. After all >>>> it is a specification not an implementation. There is no or only >>>> trivial code attached to it. So while nothing can be gained by >>>> putting it under the LGPL, a lot can be lost - for example the >>>> contribution of companies that do not like to open source their >>>> implementations. >>>> >>>> Furthermore you are plain wrong assuming you will be the copyright >>>> holder to additions made by other people. >>>> >>>> Best regards, >>>> Joachim >>>> >>>> >>>> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >>>> >>>> >>>>> Hi All, >>>>> Trent and I have been discussing the license issues of the >>>>> JSR spec and code that we develop, as a community. >>>>> Here is what we have come up with: >>>>> >>>>> >>>>>> During the development, the new JSR spec that we derive >>>>>> will be >>>>>> covered under the LGPL license. Since it is >>>>>> just interfaces, any contributions will come back to me, for >>>>>> inclusion >>>>>> into the specification. The goal is to provide a detailed set of >>>>>> interfaces that >>>>>> document the present state of our reference model. I am using >>>>>> the RXTX as the reference model. If there is something missing >>>>>> from >>>>>> the reference model, or if the reference model has something that >>>>>> should >>>>>> not be there, we will need to discuss it. >>>>>> >>>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>>> a version with a JSR compatible license. >>>>>> >>>>>> The goal is to migrate the interfaces into javax.comm. >>>>>> >>>>> Does this sound like a reasonable plan to everyone? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From joachim at buechse.de Wed Aug 2 09:46:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Wed, 2 Aug 2006 17:46:25 +0200 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> I assume that javax.comm/RXTX is to be redefined using Interfaces. In this case we should separate 2 things: 1) The specification and it's incarnation in the form of java classes defining the interfaces. 2) The actual implementation of the functionality. It is possible that 1) may contain some trivial code in abstract or none abstract classes (ie PortFactory, PortRegistry, etc). Doug's original question was regarding 1) - unless I misunderstood. I personally think that 1) should be in the public domain. It should not be covered by any restrictions what-so-ever. Let it be free as in "totally free in any respect". I do not care under which license 2) is released. Why? Because it is in my very interest that all/almost all vendors include implementations with their distributions. Which will only happen if they do not need to respect open source licenses. (javax.comm is not nearly as important as the Apache web server or MySql, so nobody will take licensing risks). Best regards, Joachim On 02.08.2006, at 14:39, Dr. Douglas Lyon wrote: > Hi All, > I don't know anything about licensing issues. > The below sounds reasonable. If we make this public domain, > will that be compatible with Sun's JSR? > Thanks! > - DL > P.S. I really don't care what we do, as long as there is > some sort of collective agreement. >> Good day, >> >> quite frankly I think that this is a very bad idea. This >> specification >> (!) should be in the public domain and nowhere else. >> >> Defining a spec under the (L)GPL makes absolutely no sense. After all >> it is a specification not an implementation. There is no or only >> trivial code attached to it. So while nothing can be gained by >> putting it under the LGPL, a lot can be lost - for example the >> contribution of companies that do not like to open source their >> implementations. >> >> Furthermore you are plain wrong assuming you will be the copyright >> holder to additions made by other people. >> >> Best regards, >> Joachim >> >> >> On 02.08.2006, at 14:02, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for >>>> inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing >>>> from >>>> the reference model, or if the reference model has something that >>>> should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> >>> Does this sound like a reasonable plan to everyone? >>> >>> Thanks! >>> - Doug >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ssbello at gmail.com Wed Aug 2 10:28:30 2006 From: ssbello at gmail.com (Simone) Date: Wed, 2 Aug 2006 18:28:30 +0200 Subject: [Rxtx] pocketPC 2003 Message-ID: <39ed505d0608020928k6ceb01aen470c2e6a78c5a6b0@mail.gmail.com> Does anyone know if the Rxtx works on PocketPc 2003? If yes, could you, please, give me some suggestion. Thanks, Simone Bell? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/72e0fb87/attachment-0006.html From berkland at spamcop.net Wed Aug 2 13:00:10 2006 From: berkland at spamcop.net (Doug Berkland) Date: Wed, 2 Aug 2006 15:00:10 -0400 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> Message-ID: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> How about these for the "Business Terms" of the new JSR: > The specification will be released in accordance with standard terms > as specified by the JCP process. > > The reference implementation (RI) will be delivered in binary form > free of charge from http://rxtx.org. Licensing details are expected to > be under the Binary Code License (BCL). > > The source for the reference implementation is expected to be > delivered via the Limited GNU Public License (LGPL) and available free > of charge. > > The TCK will be made available free of charge to all J2SE and J2EE licensees. > > The TCK will be offered for license at no charge, without support or > any trademark license rights, to qualified not-for-profit entities > (including not-for-profit) academic institutions) and qualified > individuals engaged in efforts to create compatible implementations of > the Specification. From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 13:13:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 13:13:33 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E495@hqexchange3.dot.state.co.us> Trent, I didn't exactly get it. Again I am not a C guy, maybe its very simple for you but I don't see any checks for FD (as written in the patch for termios.c) in the initialise_event_info_struct, I see some checks in the interruptEventLoop call. Second as you explained I open three("/dev/cuf01","/dev/cuf01","/dev/cuf01") ports, I close the 2nd ("/dev/cuf02", the other 2 are still open) , I never try to open the third ("/dev/cuf03") port again if it is already open. Are you planning to have a fix for this in the next release 2.1.8. Its very important for me to have a fix for this, its causing some major headaches for our project. I know you have your regular job too, I will appreciate any help. Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, August 01, 2006 6:46 PM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing On Tue, 1 Aug 2006, Kharbanda, Pawan wrote: > Hi, > I am also experiencing occasional JVM crash thru the native > code. I am attaching the log from the crash. Any ideas what might be > causing it???? > > Regards > Pawan Kharbanda > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java > VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic > frame: > # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # > > --------------- T H R E A D --------------- > > Current thread (0x8d000480): JavaThread "Thread-119" > [_thread_in_native, id=111 > 51] > > siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba > > Registers: > EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a > ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 > EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 > > Top of Stack: (sp=0x8d3482b8) > 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 > 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 > 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 > 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 > 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 > 0x8d348308: 00000000 00000002 00000000 00000000 > 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd > 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 > > Instructions: (pc=0xb75e39b2) > 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 > 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0 00 00 00 > > Stack: [0x8d2c8000,0x8d349000), sp=0x8d3482b8, free space=512k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) C [librxtxSerial.so+0x69b2] > initialise_event_info_struct+0x66 C [librxtxSerial.so+0x6c00] > Java_gnu_io_RXTXPort_eventLoop+0x50 > j gnu.io.RXTXPort.eventLoop()V+0 > j gnu.io.RXTXPort$MonitorThread.run()V+12 > v ~StubRoutines::call_stub > V [libjvm.so+0x2607ec] > V [libjvm.so+0x423828] > V [libjvm.so+0x260045] > V [libjvm.so+0x2600de] > V [libjvm.so+0x2d7745] > V [libjvm.so+0x4c2ba3] > V [libjvm.so+0x424338] > C [libpthread.so.0+0x4dd8] > > 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 ) > =>0x8d000480 JavaThread "Thread-119" [_thread_in_native, id=11151] > 0x8df2e448 JavaThread "DestroyJavaVM" [_thread_blocked, id=11017] > 0x8df27630 JavaThread "Thread ::: /dev/cub01" [_thread_blocked, > id=11035] 0x8df26950 JavaThread "Thread ::: /dev/cuf04" > [_thread_in_native, id=11034] 0x8df25c10 JavaThread "Thread ::: > /dev/cuf03" [_thread_in_native, id=11033] 0x8df248d0 JavaThread > "Thread ::: /dev/cuf02" [_thread_blocked, id=11032] 0x8df24170 > JavaThread "Thread ::: /dev/cuf01" [_thread_blocked, id=11031] > 0x8df029d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=11029] 0x8df01620 JavaThread "CompilerThread1" daemon > [_thread_blocked, id=11028] 0x8df006d0 JavaThread "CompilerThread0" > daemon [_thread_blocked, id=11027] 0x0811d3e0 JavaThread > "AdapterThread" daemon [_thread_blocked, id=11026] > 0x0811c488 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=11025] 0x08112dd0 JavaThread "Finalizer" daemon [_thread_blocked, > id=11024] > 0x081117f8 JavaThread "Reference Handler" daemon [_thread_blocked, > id=11023] > My guess is that it is the same type of logic flaw we recently found in termios.c. You open and close many ports there can be a problem when you open three ports, close the second and then reopen a third. The attached patch should give you an idea of what to look for with event_info_struct->prev/next. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Wed Aug 2 13:14:20 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Wed, 02 Aug 2006 16:14:20 -0300 Subject: [Rxtx] jsr spec and license issues In-Reply-To: <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> References: <9EA7220D-796E-4265-88B3-F62E3411B31D@buechse.de> <269e40090608021159l28e38d3fsb007952470566594@mail.gmail.com> <269e40090608021200o3bbc4c68l77b65a5e4abb09e9@mail.gmail.com> Message-ID: <44D0F98C.1070600@gmail.com> +1 Agree > How about these for the "Business Terms" of the new JSR: > > >> The specification will be released in accordance with standard terms >> as specified by the JCP process. >> >> The reference implementation (RI) will be delivered in binary form >> free of charge from http://rxtx.org. Licensing details are expected to >> be under the Binary Code License (BCL). >> >> The source for the reference implementation is expected to be >> delivered via the Limited GNU Public License (LGPL) and available free >> of charge. >> >> The TCK will be made available free of charge to all J2SE and J2EE licensees. >> >> The TCK will be offered for license at no charge, without support or >> any trademark license rights, to qualified not-for-profit entities >> (including not-for-profit) academic institutions) and qualified >> individuals engaged in efforts to create compatible implementations of >> the Specification. >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From savagobr at yahoo.com Wed Aug 2 13:40:42 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:40:42 -0700 (PDT) Subject: [Rxtx] jsr spec and license issues Message-ID: <20060802194042.83599.qmail@web53807.mail.yahoo.com> Friends Apache seems ok... if I get it right, does it *almost* equals to BSD? Regarding public domain: I think that the good people that spent so much time on this library will like to keep some rights over its own work, don't you think? Best regards Savago --------------------------------- Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/79abdfd5/attachment-0006.html From savagobr at yahoo.com Wed Aug 2 13:58:04 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Wed, 2 Aug 2006 12:58:04 -0700 (PDT) Subject: [Rxtx] JVM Crashing Message-ID: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago --------------------------------- Groups are talking. We´re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/47d561ae/attachment-0006.html From Pawan.Kharbanda at dot.state.co.us Wed Aug 2 14:09:18 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 2 Aug 2006 14:09:18 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E4AD@hqexchange3.dot.state.co.us> Thank You :) ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adenilson Cavalcanti Sent: Wednesday, August 02, 2006 1:58 PM To: rxtx at qbang.org Subject: Re: [Rxtx] JVM Crashing Kharbanda I confirmed the crash using your sample app under Fedora Core 5. A detailed log of rxtx operations can be found at: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Trent Any more tips for people willing to help to fix this bug? Best regards Savago ________________________________ Groups are talking. We?re listening. Check out the handy changes to Yahoo! Groups. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060802/b4eb22cf/attachment-0006.html From tjarvi at qbang.org Wed Aug 2 20:23:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 20:23:42 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Trent and I have been discussing the license issues of the > JSR spec and code that we develop, as a community. > Here is what we have come up with: > >> During the development, the new JSR spec that we derive >> will be >> covered under the LGPL license. Since it is >> just interfaces, any contributions will come back to me, for inclusion >> into the specification. The goal is to provide a detailed set of >> interfaces that >> document the present state of our reference model. I am using >> the RXTX as the reference model. If there is something missing from >> the reference model, or if the reference model has something that should >> not be there, we will need to discuss it. >> >> After Sun accepts the JSR, I, as the copyright holder, can issue >> a version with a JSR compatible license. >> >> The goal is to migrate the interfaces into javax.comm. > > Does this sound like a reasonable plan to everyone? > Hi Doug As mentioned off the list, the important point in my mind is that everyone is on the same base more than what license is decided upon. These things are just best addressed early so there isn't confusion. The Apache license is fairly standard in the Open Source community vs several of the relatively unknown [and obviously redundat even by their descriptions] offerings by Sun. Perhaps one option here that would kill a few birds with one stone is to dual license the interface as Apache and LGPL. This would allow everyone to use the interfaces without needing to do wastefull work for internal license requirements. Projects could choose between the two the license that best suits their needs. If there is a software shop doing Java that isn't familiar with the Apache license, they must be doing some strange Java. I do think it is foolhearty to blindly travel in public domain but nobody is trying to undermine the spec files. The intent is to use the work for a JSR submission that everyone can use without confusion later on down the line. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 21:01:16 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 20:01:16 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: Message-ID: <44D166FC.9090005@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: > >> Hi All, >> Trent and I have been discussing the license issues of the >> JSR spec and code that we develop, as a community. >> Here is what we have come up with: >> >>> During the development, the new JSR spec that we derive >>> will be >>> covered under the LGPL license. Since it is >>> just interfaces, any contributions will come back to me, for inclusion >>> into the specification. The goal is to provide a detailed set of >>> interfaces that >>> document the present state of our reference model. I am using >>> the RXTX as the reference model. If there is something missing from >>> the reference model, or if the reference model has something that should >>> not be there, we will need to discuss it. >>> >>> After Sun accepts the JSR, I, as the copyright holder, can issue >>> a version with a JSR compatible license. >>> >>> The goal is to migrate the interfaces into javax.comm. >> Does this sound like a reasonable plan to everyone? >> > > Hi Doug > > As mentioned off the list, the important point in my mind is that everyone > is on the same base more than what license is decided upon. These things > are just best addressed early so there isn't confusion. > > The Apache license is fairly standard in the Open Source community vs > several of the relatively unknown [and obviously redundat even by > their descriptions] offerings by Sun. The JCP is a reasonable process for what the RxTx project intends to achieve by evolving the API. There isn't much to lose by going the JSR route. The community will benefit from a fair API like so many other that have undergone the process. Sun isn't going to own the API or manipulate it into anything weird anymore than anyone else is. I think your fears are rather vague and unfounded. Which isn't to say that I am a well-informed representative of the JCP, I've only sat through one JSR process and we ended up with javax.usb, and IBM got what it wanted out of the deal and the community got a very nice standard. Paul > > Perhaps one option here that would kill a few birds with one stone is to > dual license the interface as Apache and LGPL. This would allow everyone > to use the interfaces without needing to do wastefull work for internal > license requirements. Projects could choose between the two the license > that best suits their needs. If there is a software shop doing Java that > isn't familiar with the Apache license, they must be doing some strange > Java. > > I do think it is foolhearty to blindly travel in public domain but nobody > is trying to undermine the spec files. The intent is to use the work for > a JSR submission that everyone can use without confusion later on down the > line. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Wed Aug 2 22:10:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 2 Aug 2006 22:10:48 -0600 (MDT) Subject: [Rxtx] jsr spec and license issues In-Reply-To: <44D166FC.9090005@sun.com> References: <44D166FC.9090005@sun.com> Message-ID: On Wed, 2 Aug 2006, Paul Klissner wrote: > Trent Jarvi wrote: >> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Trent and I have been discussing the license issues of the >>> JSR spec and code that we develop, as a community. >>> Here is what we have come up with: >>> >>>> During the development, the new JSR spec that we derive >>>> will be >>>> covered under the LGPL license. Since it is >>>> just interfaces, any contributions will come back to me, for inclusion >>>> into the specification. The goal is to provide a detailed set of >>>> interfaces that >>>> document the present state of our reference model. I am using >>>> the RXTX as the reference model. If there is something missing from >>>> the reference model, or if the reference model has something that should >>>> not be there, we will need to discuss it. >>>> >>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>> a version with a JSR compatible license. >>>> >>>> The goal is to migrate the interfaces into javax.comm. >>> Does this sound like a reasonable plan to everyone? >>> >> >> Hi Doug >> >> As mentioned off the list, the important point in my mind is that everyone >> is on the same base more than what license is decided upon. These things >> are just best addressed early so there isn't confusion. >> >> The Apache license is fairly standard in the Open Source community vs >> several of the relatively unknown [and obviously redundat even by >> their descriptions] offerings by Sun. > > The JCP is a reasonable process for what the RxTx project intends > to achieve by evolving the API. > > There isn't much to lose by going the JSR route. The community will > benefit from a fair API like so many other that have undergone > the process. Sun isn't going to own the API or manipulate it > into anything weird anymore than anyone else is. I think your > fears are rather vague and unfounded. > > Which isn't to say that I am a well-informed representative > of the JCP, I've only sat through one JSR process and we ended > up with javax.usb, and IBM got what it wanted out of the deal > and the community got a very nice standard. > Hi Paul The JCP should work fine. As our intentions are in line, licensing so that everyone can use the interface code should not be a problem. Note that the current default right now is that the interfaces are copyrighted and no license for distribution is included. -- Trent Jarvi tjarvi at qbang.org From Paul.Klissner at Sun.COM Wed Aug 2 22:33:51 2006 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Wed, 02 Aug 2006 21:33:51 -0700 Subject: [Rxtx] jsr spec and license issues In-Reply-To: References: <44D166FC.9090005@sun.com> Message-ID: <44D17CAF.1090802@sun.com> Trent Jarvi wrote: > On Wed, 2 Aug 2006, Paul Klissner wrote: > >> Trent Jarvi wrote: >>> On Wed, 2 Aug 2006, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Trent and I have been discussing the license issues of the >>>> JSR spec and code that we develop, as a community. >>>> Here is what we have come up with: >>>> >>>>> During the development, the new JSR spec that we derive >>>>> will be >>>>> covered under the LGPL license. Since it is >>>>> just interfaces, any contributions will come back to me, for inclusion >>>>> into the specification. The goal is to provide a detailed set of >>>>> interfaces that >>>>> document the present state of our reference model. I am using >>>>> the RXTX as the reference model. If there is something missing from >>>>> the reference model, or if the reference model has something that should >>>>> not be there, we will need to discuss it. >>>>> >>>>> After Sun accepts the JSR, I, as the copyright holder, can issue >>>>> a version with a JSR compatible license. >>>>> >>>>> The goal is to migrate the interfaces into javax.comm. >>>> Does this sound like a reasonable plan to everyone? >>>> >>> Hi Doug >>> >>> As mentioned off the list, the important point in my mind is that everyone >>> is on the same base more than what license is decided upon. These things >>> are just best addressed early so there isn't confusion. >>> >>> The Apache license is fairly standard in the Open Source community vs >>> several of the relatively unknown [and obviously redundat even by >>> their descriptions] offerings by Sun. >> The JCP is a reasonable process for what the RxTx project intends >> to achieve by evolving the API. >> >> There isn't much to lose by going the JSR route. The community will >> benefit from a fair API like so many other that have undergone >> the process. Sun isn't going to own the API or manipulate it >> into anything weird anymore than anyone else is. I think your >> fears are rather vague and unfounded. >> >> Which isn't to say that I am a well-informed representative >> of the JCP, I've only sat through one JSR process and we ended >> up with javax.usb, and IBM got what it wanted out of the deal >> and the community got a very nice standard. >> > > Hi Paul > > The JCP should work fine. As our intentions are in line, licensing so > that everyone can use the interface code should not be a problem. Sorry, looks like my concerns were unfounded. I haven't been following the threads closely this week, as work got busy with an escalated issue and new project. Sorry about that. > > Note that the current default right now is that the interfaces are > copyrighted and no license for distribution is included. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Thu Aug 3 03:45:56 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 03 Aug 2006 05:45:56 -0400 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: Hi All, I have been waiting a day for things to cool down. Licensing appears to be a hot-button topic. I have no objection to dual license the interfaces as both Apache and LGPL. Some thoughts: Goal: developers wish to work together on a common piece of code that the team needs. It makes sense that the code base they work on should be Apache-licensed. That makes it possible for the team to use and develop common code, even if the end result is LGPL'd as a whole. If we combine licenses, we must follow the terms of both licenses when distributing the combined work. Thus, the dual license contains the super set of terms in the licenses of Apached and LGPL. This should address concern about using Apache-licensed code within LGPL projects due to the FSF's claim that they are incompatible. Here is a draft statement for RXSL: The RXTX Specification Library (RXSL) uses a dual license strategy for the source code. These licenses are the GNU Lesser General Public License (LGPL) and the Apache License. I strongly encourage users to use the LGPL license and participate fully in the free software community. Dual licensing of the RXSL source code provides open and free access to the technology both for the GPL community and for other developers or companies that cannot use the GPL. Dual license is common practice in open source projects like OpenOffice, Perl and Mozilla. Through the combined use of LGPL and Apache license, developers will have a high degree of freedom yet compatibility and interoperability will be preserved. You can freely modify, extend, and improve the RXSL source code. The only question is whether or not you must provide the source code and contribute modifications to the community. The GNU and Apache licenses allow different ranges of flexibility in this regard, but in the end, regardless of the license used, any and all incompatible changes must be published openly. Note that there is the RXTX Reference Model that uses the org.rxtx package, which itself is protected by the LGPL. This may be part of the distribution, however, it can not be redistributed using a different license. Is everybody OK with this? Thanks Trent, great idea! - Doug From joachim at buechse.de Thu Aug 3 04:15:44 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 3 Aug 2006 12:15:44 +0200 Subject: [Rxtx] JVM Crashing In-Reply-To: <20060802195804.70935.qmail@web53812.mail.yahoo.com> References: <20060802195804.70935.qmail@web53812.mail.yahoo.com> Message-ID: <6ABA2AB2-CECE-4C4B-A7D6-0CDF8B9C95A8@buechse.de> I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of > rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jvermillard at archean.fr Thu Aug 3 04:26:48 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Thu, 03 Aug 2006 12:26:48 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <1154600808.16732.18.camel@localhost.localdomain> Hi, I'm a developer of the Apache MINA framework. It's a network application framework which helps users develop high performance and high scalability network applications easily. http://directory.apache.org/subprojects/mina/index.html . I would like to integrate serial connection to the framework (actualy supporting TCP, UDP (broadcast) and in VM communications), but LGPL is an issue for me. An Apache License would be pretty usefull for me and integrate rxtx functionnalities easly. Thanks, Julien Le jeudi 03 ao?t 2006 ? 05:45 -0400, Dr. Douglas Lyon a ?crit : > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/755cca7f/smime-0006.bin From pascal at quies.net Thu Aug 3 04:32:35 2006 From: pascal at quies.net (Pascal S. de Kloe) Date: Thu, 3 Aug 2006 12:32:35 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: Message-ID: <200608031232.35838.pascal@quies.net> Hi Doug, The Apache license is unnessesary complex. It puts all kinds of limitations on the usage. Is there a particular reason why people chose this or was it just the familiar name? I agree with Joachim (again) that the specification and the interfaces should be public domain. However, if we realy need a license then have a look at the X11 license because that one is compatible with the GPL and suits our needs: http://www.fsf.org/licensing/licenses/index_html http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3 ---- start: implementation Copyright (C) 2006 Sun Microsystems, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Sun Microsystems shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Sun Microsystems. Java is a trademark of Sun Microsystems, Inc. ---- end Op donderdag 3 augustus 2006 11:45, schreef Dr. Douglas Lyon: > Hi All, > I have been waiting a day for things to cool down. > Licensing appears to be a hot-button topic. > > I have no objection to dual license the interfaces as both > Apache and LGPL. > > Some thoughts: > Goal: developers wish to work together on a > common piece of code that the team needs. > > It makes sense that the > code base they work on should be Apache-licensed. That makes it possible > for the team to use and develop common code, even if the end result > is LGPL'd as a whole. > > If we combine licenses, we must follow the terms of both > licenses when distributing the combined work. > > Thus, the dual license contains the super > set of terms in the licenses of Apached and LGPL. > > This should address concern about using Apache-licensed code within > LGPL projects due to the FSF's claim that they are incompatible. > > Here is a draft statement for RXSL: > > The RXTX Specification Library (RXSL) uses a dual license strategy > for the source code. > These licenses are the GNU Lesser General Public License (LGPL) and > the Apache License. > I strongly encourage users to use the LGPL license and participate > fully in the free software community. > > Dual licensing of the RXSL source code provides open and free access > to the technology both for the GPL community and for other developers > or companies that cannot use the GPL. > > Dual license is common practice in open source projects like > OpenOffice, Perl and Mozilla. > Through the combined use of LGPL and Apache license, developers will > have a high degree of freedom yet compatibility and interoperability > will be preserved. > > You can freely modify, extend, and improve the RXSL source code. The > only question is whether or not you must provide the source code and > contribute modifications to the community. The GNU and Apache > licenses allow different ranges of flexibility in this regard, but in > the end, regardless of the license used, any and all incompatible > changes must be published openly. > > Note that there is the RXTX Reference Model that uses the org.rxtx > package, which itself is protected by the LGPL. This may be part of > the distribution, however, it can not be redistributed using a > different license. > > Is everybody OK with this? > > Thanks Trent, great idea! > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Thu Aug 3 05:17:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 05:17:07 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154600808.16732.18.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: On Thu, 3 Aug 2006, Julien Vermillard wrote: > Hi, > > I'm a developer of the Apache MINA framework. It's a network application > framework which helps users develop high performance and high > scalability network applications easily. > http://directory.apache.org/subprojects/mina/index.html . I would like > to integrate serial connection to the framework (actualy supporting TCP, > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > An Apache License would be pretty usefull for me and integrate rxtx > functionnalities easly. > > Thanks, > > Julien > Hi Julien The rxtx license itself will not change. This is just the interface. You would be free to implement an rxtx replacement if the LGPL low level code is a problem for you. These licensing details would make it possible to take the interface code instead of needing to recode them for a new project. You are probably confusing the license problems with the GPL not the LGPL though you can share links to concerns off the list if you would like to go through them. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 11:59:48 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 11:59:48 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E516@hqexchange3.dot.state.co.us> Joachim, I think my both problems (JVM crashing & Port Locking) are being caused by the corruption of "Event Info Struct / EIS" I have noticed with in EIS my "FD" and "Closing" value being overwritten. The problem is definitely in SerialImp.c file. I am trying to understand what the code does and try to pin point the problem by trying few other options. I will keep everybody posted. Regards Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Joachim Buechse Sent: Thursday, August 03, 2006 4:16 AM To: RXTX Developers and Users Subject: Re: [Rxtx] JVM Crashing I tried to debug this a couple of days ago, but unfortunately right now I have other priorities. What I found is this: On Systems (I tested on OSX) that fall under the clause #if !defined(TIOCSERGETLSR) && !defined(WIN32) (ie which use a drain thread) the event_info_structure gets damaged. This happens in SerialImp.c procedure interruptEventLoop during index->eventloop_interrupted = 1; usleep(50 * 1000); more precisely the structure is OK before the sleep and damaged after. What I could see, is that the the closing flag is overwritten by some pointer value. Adding additional dummy fields and hence moving the in memory position of the closing flag within the structure preserves its value. The crash is probably due to the drain_tid beeing overwritten as well which leads to a call to pthread_cancel with an illegal tread pointer. I could not find the code that damages the structure and I had to abandon the search after some hours. This seems like a typical C "pointer arithmetic" programming error. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 02.08.2006, at 21:58, Adenilson Cavalcanti wrote: > Kharbanda > > I confirmed the crash using your sample app under Fedora Core 5. A > detailed log of rxtx operations can be found at: > http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 > > Trent > Any more tips for people willing to help to fix this bug? > > > Best regards > > > Savago > > > Groups are talking. We?re listening. Check out the handy changes to > Yahoo! Groups. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Thu Aug 3 13:50:07 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 14:50:07 -0500 Subject: [Rxtx] slow startup Message-ID: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete From brian at mbari.org Thu Aug 3 14:05:57 2006 From: brian at mbari.org (Brian Schlining) Date: Thu, 3 Aug 2006 13:05:57 -0700 Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> References: <84d4a6d50608031250v4c8b0078yd607d1794fbc241a@mail.gmail.com> Message-ID: Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B > Greetings, > I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/ > qbang.org). > > In testing things out, I ran the list ports example from the Wiki, > and it seems to take quite a while for the library to initialize? > Like on the order of 30+ seconds or so after startup (and the RXTX > banner prints), and before the application starts running. > > Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then > I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ > terminal server) and I'm wondering if they are not responding properly > and this is causing the slow startup? Or is this a known problem of > some kind, or maybe something on my system is screwy? > > Thanks, > Pete > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/6123f730/attachment-0006.html From Pawan.Kharbanda at dot.state.co.us Thu Aug 3 14:13:47 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Thu, 3 Aug 2006 14:13:47 -0600 Subject: [Rxtx] slow startup Message-ID: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Hi Pete, RXTX does open and close the ports in Windows. Try downloading utility like PORTMON(only for windows) and you can see that whenever you load RXTX it tries to register all the available COMM ports in the system. It is a little slow if you have virtual ports, we use digi as a terminal server, Its going to get worst of you have comm ports in 100's Thanks Pawan Kharbanda ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Brian Schlining Sent: Thursday, August 03, 2006 2:06 PM To: RXTX Developers and Users Subject: Re: [Rxtx] slow startup Hi Pete, I run into the same problem too, but I'm not running the 'virtual' COM ports. So the slow startup probably isn't related to them. I think someone had posted an explanation of why RXTX takes a while to initialize on UNIX systems, where RXTX is scanning for serial ports by opening and closing various devices in /dev. But I''m interested in hearing why this is occurring on Windows too. B Greetings, I'm using RXTX 2.1-7 on Windows XP (binaries from rxtx.org/qbang.org). In testing things out, I ran the list ports example from the Wiki, and it seems to take quite a while for the library to initialize? Like on the order of 30+ seconds or so after startup (and the RXTX banner prints), and before the application starts running. Now I've got the standard COM1/COM2/LPT1 (stock Dell PC), but then I've got 8 "virtual" COM ports (courtesy of an idiotic Quantech ThinQ terminal server) and I'm wondering if they are not responding properly and this is causing the slow startup? Or is this a known problem of some kind, or maybe something on my system is screwy? Thanks, Pete _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining MBARI Software Engineer brian at mbari.org (831)775-1855 http://www.mbari.org/staff/brian I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. ~ Henry Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060803/94fd105d/attachment-0006.html From pete.flugstad at gmail.com Thu Aug 3 14:32:04 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 3 Aug 2006 15:32:04 -0500 Subject: [Rxtx] slow startup In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> Message-ID: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> On 8/3/06, Kharbanda, Pawan wrote: > RXTX does open and close the ports in Windows. Try downloading utility > like PORTMON(only for windows) and you can see that whenever you load RXTX > it tries to register all the available COMM ports in the system. It is a > little slow if you have virtual ports, we use digi as a terminal server, Its > going to get worst of you have comm ports in 100's Okay, I can understand that, but from the PORTMON output, it looks like it's opening each port TWICE: 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS ... 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS Also, assuming instead of listing the ports I wanted to just open one, I'm still seeing the 30 second delay, so it's scanning at startup regardless of what the Java code is going to do. Probably necessary, but annoying. I know, I know, contribute patches... :-) Thanks, Pete From tjarvi at qbang.org Thu Aug 3 15:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 3 Aug 2006 15:04:42 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: On Thu, 3 Aug 2006, Pete Flugstad wrote: > On 8/3/06, Kharbanda, Pawan wrote: >> RXTX does open and close the ports in Windows. Try downloading utility >> like PORTMON(only for windows) and you can see that whenever you load RXTX >> it tries to register all the available COMM ports in the system. It is a >> little slow if you have virtual ports, we use digi as a terminal server, Its >> going to get worst of you have comm ports in 100's > > Okay, I can understand that, but from the PORTMON output, it looks > like it's opening each port TWICE: > > 15:28:52 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:52 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:52 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > ... > 15:28:56 javaw.exe IRP_MJ_CREATE QuatechEthernetSerial0 SUCCESS Options: Open > 15:28:59 javaw.exe IRP_MJ_CLEANUP QuatechEthernetSerial0 SUCCESS > 15:28:59 javaw.exe IRP_MJ_CLOSE QuatechEthernetSerial0 SUCCESS > > Also, assuming instead of listing the ports I wanted to just open one, > I'm still seeing the 30 second delay, so it's scanning at startup > regardless of what the Java code is going to do. Probably necessary, > but annoying. > > I know, I know, contribute patches... :-) > I think this problem is in RXTXCommDriver.java. I've just not tracked it down but it should be in the java code, not the native code so easy enough to track down. -- Trent Jarvi tjarvi at qbang.org From jvermillard at archean.fr Fri Aug 4 03:43:28 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:43:28 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: References: <1154600808.16732.18.camel@localhost.localdomain> Message-ID: <1154684608.6181.4.camel@localhost.localdomain> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > Hi, > > > > I'm a developer of the Apache MINA framework. It's a network application > > framework which helps users develop high performance and high > > scalability network applications easily. > > http://directory.apache.org/subprojects/mina/index.html . I would like > > to integrate serial connection to the framework (actualy supporting TCP, > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > An Apache License would be pretty usefull for me and integrate rxtx > > functionnalities easly. > > > > Thanks, > > > > Julien > > > > Hi Julien > > The rxtx license itself will not change. This is just the interface. > You would be free to implement an rxtx replacement if the LGPL low level > code is a problem for you. These licensing details would make it possible > to take the interface code instead of needing to recode them for a new > project. > > You are probably confusing the license problems with the GPL not the LGPL > though you can share links to concerns off the list if you would like to > go through them. > > -- > Trent Jarvi > tjarvi at qbang.org Hi, I'm not a license expert but some guys at ASF said me you can't call LGPLed libs from java. some peoples interprete that as static linking and not dynamic linking (no idea why). So ASF/BSD licensied interface willl solve the license probleme. If you got some questions about the ASL and the way you can dual license LGPL/ASL you can ask it on legal-discuss at apache.org Julien -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/8d46c0aa/smime-0006.bin From jvermillard at archean.fr Fri Aug 4 03:51:30 2006 From: jvermillard at archean.fr (Julien Vermillard) Date: Fri, 04 Aug 2006 11:51:30 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <1154685091.6181.6.camel@localhost.localdomain> erm from java -> from ASLed Java code Le vendredi 04 ao?t 2006 ? 11:43 +0200, Julien Vermillard a ?crit : > Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > Hi, > > I'm not a license expert but some guys at ASF said me you can't call > LGPLed libs from java. some peoples interprete that as static linking > and not dynamic linking (no idea why). So ASF/BSD licensied interface > willl solve the license probleme. > > If you got some questions about the ASL and the way you can dual license > LGPL/ASL you can ask it on legal-discuss at apache.org > > Julien > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3173 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dcc29d70/smime-0006.bin From guille at sms.nl Fri Aug 4 04:35:24 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Fri, 04 Aug 2006 12:35:24 +0200 Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <1154684608.6181.4.camel@localhost.localdomain> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> Message-ID: <7.0.1.0.0.20060804123322.036dc748@sms.nl> At 11:43 04/08/2006, Julien Vermillard wrote: >Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : > > On Thu, 3 Aug 2006, Julien Vermillard wrote: > > > > > Hi, > > > > > > I'm a developer of the Apache MINA framework. It's a network application > > > framework which helps users develop high performance and high > > > scalability network applications easily. > > > http://directory.apache.org/subprojects/mina/index.html . I would like > > > to integrate serial connection to the framework (actualy supporting TCP, > > > UDP (broadcast) and in VM communications), but LGPL is an issue for me. > > > > > > An Apache License would be pretty usefull for me and integrate rxtx > > > functionnalities easly. > > > > > > Thanks, > > > > > > Julien > > > > > > > Hi Julien > > > > The rxtx license itself will not change. This is just the interface. > > You would be free to implement an rxtx replacement if the LGPL low level > > code is a problem for you. These licensing details would make it possible > > to take the interface code instead of needing to recode them for a new > > project. > > > > You are probably confusing the license problems with the GPL not the LGPL > > though you can share links to concerns off the list if you would like to > > go through them. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > >Hi, > >I'm not a license expert but some guys at ASF said me you can't call >LGPLed libs from java. some peoples interprete that as static linking >and not dynamic linking (no idea why). This interpretation is wrong. See the official position of the FSF regarding the LGPL and Java: http://www.gnu.org/licenses/lgpl-java.html http://www.fsf.org/licensing/licenses/lgpl-java.html Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From hambyiii at hotmail.com Fri Aug 4 04:52:47 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 10:52:47 +0000 Subject: [Rxtx] error getting InputStream Message-ID: Hi, I have written a program in Java for Windows xp using RXTX (which is why I am using this mailing list :). However, I am getting a problem. I am connecting to a serial port, like so: private CommPortIdentifier portID; private boolean openPort(String selectedPort) { boolean portFound = false; Enumeration portList; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portID = (CommPortIdentifier) portList.nextElement(); if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portID.getName().equals(selectedPort)) { portFound = true; break; } } } return portFound; } and then I try and get the serial port input stream (leaving out the try and catch for the sake of space): SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); InputStream inputStream = serialPort.getInputStream(); but on the getInputStream() I get the following error message: Bad file descriptor in nativeavailable I cannot figure out where it is going wrong...anyone any ideas. A quick answer would be wonderful, as I am kinda under the hammer to get this fixed quickly Thanks in Advance Keith From tjarvi at qbang.org Fri Aug 4 05:13:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 05:13:19 -0600 (MDT) Subject: [Rxtx] Proposal 3.0; Apache and LGPL license for the RXSL In-Reply-To: <7.0.1.0.0.20060804123322.036dc748@sms.nl> References: <1154600808.16732.18.camel@localhost.localdomain> <1154684608.6181.4.camel@localhost.localdomain> <7.0.1.0.0.20060804123322.036dc748@sms.nl> Message-ID: On Fri, 4 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 11:43 04/08/2006, Julien Vermillard wrote: >> Le jeudi 03 ao?t 2006 ? 05:17 -0600, Trent Jarvi a ?crit : >>> On Thu, 3 Aug 2006, Julien Vermillard wrote: >>> >>>> Hi, >>>> >>>> I'm a developer of the Apache MINA framework. It's a network application >>>> framework which helps users develop high performance and high >>>> scalability network applications easily. >>>> http://directory.apache.org/subprojects/mina/index.html . I would like >>>> to integrate serial connection to the framework (actualy supporting TCP, >>>> UDP (broadcast) and in VM communications), but LGPL is an issue for me. >>>> >>>> An Apache License would be pretty usefull for me and integrate rxtx >>>> functionnalities easly. >>>> >>>> Thanks, >>>> >>>> Julien >>>> >>> >>> Hi Julien >>> >>> The rxtx license itself will not change. This is just the interface. >>> You would be free to implement an rxtx replacement if the LGPL low level >>> code is a problem for you. These licensing details would make it possible >>> to take the interface code instead of needing to recode them for a new >>> project. >>> >>> You are probably confusing the license problems with the GPL not the LGPL >>> though you can share links to concerns off the list if you would like to >>> go through them. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >> >> Hi, >> >> I'm not a license expert but some guys at ASF said me you can't call >> LGPLed libs from java. some peoples interprete that as static linking >> and not dynamic linking (no idea why). > > This interpretation is wrong. See the official position of the FSF regarding > the LGPL and Java: > > http://www.gnu.org/licenses/lgpl-java.html > > http://www.fsf.org/licensing/licenses/lgpl-java.html > What I do with legal groups that go down that rat hole is give them a copy of the rxtx 2.0 license. Since the confused legal folks are going in a direction that does not represent the intent of the license or authors at that point and are confused about basic things in our industry that most consider facts, the discussions are very short. The rxtx 2.0 license just adds the following and has for 6 years or so. Not because the lawyers are right. They get confused about intent and even facts. The following is added to make confused lawyers that cant understand intent go far away and never come back. period. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. From hambyiii at hotmail.com Fri Aug 4 05:42:21 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 11:42:21 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Okay, I made a little mistake in my last message. The error is not occuring where I thought it was. Instead it is occuring when I do the following: byte[] readBuffer = new byte[128]; try { int numBytes = 0; try { Thread.sleep(500); } catch (InterruptedException e) {} while (inputStream.available() > 0) { numBytes = inputStream.read(readBuffer); } processReceivedData(readBuffer, numBytes); } catch (IOException e) { System.out.println(e.getMessage()); } So I guess the error is happening on the inputStream.read(readBuffer) again, any help is appreciated and again, thanks in advance Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 10:52:47 +0000 > >Hi, > >I have written a program in Java for Windows xp using RXTX (which is why I >am using this mailing list :). However, I am getting a problem. I am >connecting to a serial port, like so: > private CommPortIdentifier portID; > > private boolean openPort(String selectedPort) > { > boolean portFound = false; > Enumeration portList; > > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) > { > portID = (CommPortIdentifier) portList.nextElement(); > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portID.getName().equals(selectedPort)) > { > portFound = true; > break; > } > } > } > > return portFound; > } > >and then I try and get the serial port input stream (leaving out the try >and >catch for the sake of space): > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >InputStream inputStream = serialPort.getInputStream(); > >but on the getInputStream() I get the following error message: > >Bad file descriptor in nativeavailable > >I cannot figure out where it is going wrong...anyone any ideas. A quick >answer would be wonderful, as I am kinda under the hammer to get this fixed >quickly > >Thanks in Advance >Keith > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From hambyiii at hotmail.com Fri Aug 4 07:08:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:08:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: Hi, I know I am replying to myself a lot at the moment, but more information has come to light (These errors are actually happening on a client machine, on software that has worked for the past month, and only now has started to fail, which is why I am a little slow finding things out) The errors I have already written about are only symptoms of an orignal error. The original error occurs the first time I try to WRITE thte OutputStream: OutputStream oStream = serialPort.getOutputStream(); serialPort.notifyOnOutputEmpty(true); byte[] bs = encodeMessage(configString.toString()); oStream.write(bs); oStream.flush(); The error occurs on oStream.write(bs); and is: Input/output error in writeArray Now writeArray is native code, so I have no idea what is going on there. Any help would be appreciated Thanks Keith >From: "Keith Thorne" >Reply-To: RXTX Developers and Users >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 04 Aug 2006 11:42:21 +0000 > >Okay, I made a little mistake in my last message. > >The error is not occuring where I thought it was. Instead it is occuring >when I do the following: > >byte[] readBuffer = new byte[128]; > >try { > > int numBytes = 0; > try { > Thread.sleep(500); > } > catch (InterruptedException e) > {} > > while (inputStream.available() > 0) > { > numBytes = inputStream.read(readBuffer); > } > > processReceivedData(readBuffer, numBytes); >} >catch (IOException e) >{ > System.out.println(e.getMessage()); >} > >So I guess the error is happening on the inputStream.read(readBuffer) > >again, any help is appreciated and again, thanks in advance >Keith > > >From: "Keith Thorne" > >Reply-To: RXTX Developers and Users > >To: rxtx at qbang.org > >Subject: [Rxtx] error getting InputStream > >Date: Fri, 04 Aug 2006 10:52:47 +0000 > > > >Hi, > > > >I have written a program in Java for Windows xp using RXTX (which is why >I > >am using this mailing list :). However, I am getting a problem. I am > >connecting to a serial port, like so: > > private CommPortIdentifier portID; > > > > private boolean openPort(String selectedPort) > > { > > boolean portFound = false; > > Enumeration portList; > > > > portList = CommPortIdentifier.getPortIdentifiers(); > > > > while (portList.hasMoreElements()) > > { > > portID = (CommPortIdentifier) portList.nextElement(); > > if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) > > { > > if (portID.getName().equals(selectedPort)) > > { > > portFound = true; > > break; > > } > > } > > } > > > > return portFound; > > } > > > >and then I try and get the serial port input stream (leaving out the try > >and > >catch for the sake of space): > > > >SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); > >InputStream inputStream = serialPort.getInputStream(); > > > >but on the getInputStream() I get the following error message: > > > >Bad file descriptor in nativeavailable > > > >I cannot figure out where it is going wrong...anyone any ideas. A quick > >answer would be wonderful, as I am kinda under the hammer to get this >fixed > >quickly > > > >Thanks in Advance > >Keith > > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Aug 4 07:26:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: Hi Keith Can you tell us more about the physical serial port? Might it be 'vanishing?' On Fri, 4 Aug 2006, Keith Thorne wrote: > Hi, > > I know I am replying to myself a lot at the moment, but more information has > come to light (These errors are actually happening on a client machine, on > software that has worked for the past month, and only now has started to > fail, which is why I am a little slow finding things out) > > The errors I have already written about are only symptoms of an orignal > error. The original error occurs the first time I try to WRITE thte > OutputStream: > > OutputStream oStream = serialPort.getOutputStream(); > serialPort.notifyOnOutputEmpty(true); > > byte[] bs = encodeMessage(configString.toString()); > > oStream.write(bs); > oStream.flush(); > > The error occurs on oStream.write(bs); and is: > > Input/output error in writeArray > > Now writeArray is native code, so I have no idea what is going on there. Any > help would be appreciated > Thanks > Keith > > >> From: "Keith Thorne" >> Reply-To: RXTX Developers and Users >> To: rxtx at qbang.org >> Subject: Re: [Rxtx] error getting InputStream >> Date: Fri, 04 Aug 2006 11:42:21 +0000 >> >> Okay, I made a little mistake in my last message. >> >> The error is not occuring where I thought it was. Instead it is occuring >> when I do the following: >> >> byte[] readBuffer = new byte[128]; >> >> try { >> >> int numBytes = 0; >> try { >> Thread.sleep(500); >> } >> catch (InterruptedException e) >> {} >> >> while (inputStream.available() > 0) >> { >> numBytes = inputStream.read(readBuffer); >> } >> >> processReceivedData(readBuffer, numBytes); >> } >> catch (IOException e) >> { >> System.out.println(e.getMessage()); >> } >> >> So I guess the error is happening on the inputStream.read(readBuffer) >> >> again, any help is appreciated and again, thanks in advance >> Keith >> >>> From: "Keith Thorne" >>> Reply-To: RXTX Developers and Users >>> To: rxtx at qbang.org >>> Subject: [Rxtx] error getting InputStream >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 >>> >>> Hi, >>> >>> I have written a program in Java for Windows xp using RXTX (which is why >> I >>> am using this mailing list :). However, I am getting a problem. I am >>> connecting to a serial port, like so: >>> private CommPortIdentifier portID; >>> >>> private boolean openPort(String selectedPort) >>> { >>> boolean portFound = false; >>> Enumeration portList; >>> >>> portList = CommPortIdentifier.getPortIdentifiers(); >>> >>> while (portList.hasMoreElements()) >>> { >>> portID = (CommPortIdentifier) portList.nextElement(); >>> if (portID.getPortType() == CommPortIdentifier.PORT_SERIAL) >>> { >>> if (portID.getName().equals(selectedPort)) >>> { >>> portFound = true; >>> break; >>> } >>> } >>> } >>> >>> return portFound; >>> } >>> >>> and then I try and get the serial port input stream (leaving out the try >>> and >>> catch for the sake of space): >>> >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", 2000); >>> InputStream inputStream = serialPort.getInputStream(); >>> >>> but on the getInputStream() I get the following error message: >>> >>> Bad file descriptor in nativeavailable >>> >>> I cannot figure out where it is going wrong...anyone any ideas. A quick >>> answer would be wonderful, as I am kinda under the hammer to get this >> fixed >>> quickly >>> >>> Thanks in Advance >>> Keith >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From hambyiii at hotmail.com Fri Aug 4 07:52:11 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Fri, 04 Aug 2006 13:52:11 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: Message-ID: The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more information >has > > come to light (These errors are actually happening on a client machine, >on > > software that has worked for the past month, and only now has started to > > fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an orignal > > error. The original error occurs the first time I try to WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); > >> } > >> catch (IOException e) > >> { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance > >> Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I am > >>> connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Fri Aug 4 08:21:07 2006 From: gergg at cox.net (Gregg Wonderly) Date: Fri, 04 Aug 2006 09:21:07 -0500 Subject: [Rxtx] error getting InputStream In-Reply-To: References: Message-ID: <44D357D3.40303@cox.net> Keith Thorne wrote: > Okay, I made a little mistake in my last message. > > The error is not occuring where I thought it was. Instead it is occuring > when I do the following: > > byte[] readBuffer = new byte[128]; > > try { > > } > catch (IOException e) > { > System.out.println(e.getMessage()); > } > > So I guess the error is happening on the inputStream.read(readBuffer) This is one of the most frustrating things to see over and over. The exception tells you exactly which line the error is occuring on, if you will use it to see where. In Java, these days, every class should do the following. import java.util.logging.*; public class MyClass { Logger log = Logger.getLogger( getClass().getName() ); ...in some method... { String data = ...; // any extra data like addresses or // ports which might be wrong and // cause an exception. try { ... } catch( SomeException ex ) { log.log( Level.SEVERE, ex.toString()+": "+data, ex ); } } } By default, you will see all of the appropriate details of any exception logged at the WARNING or SEVERE level. You can read the javadocs about logging to get more information too. Once you do this, people can then turn up logging and get more information, or otherwise manage it with a logging configuration file or other tools such as JMX or my http://logman.dev.java.net project. Gregg Wonderly From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 09:15:24 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 09:15:24 -0600 Subject: [Rxtx] error getting InputStream Message-ID: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Keith, Please send the full stack trace of the exception, may be I can help you. On Trent's question regarding physical 'Serial Port', do you mean you have a USB(Connected to Client Machine) to 9 Pin Serial cable(Connected to H/W device)? Also please mention which java version you are using? Thanks Pawan Kharbanda -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Keith Thorne Sent: Friday, August 04, 2006 7:52 AM To: rxtx at qbang.org Subject: Re: [Rxtx] error getting InputStream The physical serial port is actually a USB connection that is then changed to a "virtual serial port", so I can use the serial port protocols to connect to it. The other end of the connection is a hardware device that is constantly turned on. I am not sure about the port 'vanishing'...we have another piece of software that came with the hardware device, which we can test the device (and with it the virtual serial port) with. This has no problem connecting to the serial port or writing to/reading from the device. It is only when my software is run, that the error occurs. Like I have said, my software (using rxtx) is connecting to the serial port successfully, but it is when I try and write to the serial port that I get the error. Although to be truthful, I am not absolutely certain if the error is happening on the oStream.write() or the oStream.flush(). I only think it is the write(), because that is where the writeArray() function is called. thanks Keith >From: Trent Jarvi >Reply-To: RXTX Developers and Users >To: RXTX Developers and Users >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > >Hi Keith > >Can you tell us more about the physical serial port? Might it be >'vanishing?' > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > Hi, > > > > I know I am replying to myself a lot at the moment, but more > > information >has > > come to light (These errors are actually happening on a client > > machine, >on > > software that has worked for the past month, and only now has > > started to fail, which is why I am a little slow finding things out) > > > > The errors I have already written about are only symptoms of an > > orignal error. The original error occurs the first time I try to > > WRITE thte > > OutputStream: > > > > OutputStream oStream = serialPort.getOutputStream(); > > serialPort.notifyOnOutputEmpty(true); > > > > byte[] bs = encodeMessage(configString.toString()); > > > > oStream.write(bs); > > oStream.flush(); > > > > The error occurs on oStream.write(bs); and is: > > > > Input/output error in writeArray > > > > Now writeArray is native code, so I have no idea what is going on there. >Any > > help would be appreciated > > Thanks > > Keith > > > > > >> From: "Keith Thorne" > >> Reply-To: RXTX Developers and Users > >> To: rxtx at qbang.org > >> Subject: Re: [Rxtx] error getting InputStream > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > >> > >> Okay, I made a little mistake in my last message. > >> > >> The error is not occuring where I thought it was. Instead it is >occuring > >> when I do the following: > >> > >> byte[] readBuffer = new byte[128]; > >> > >> try { > >> > >> int numBytes = 0; > >> try { > >> Thread.sleep(500); > >> } > >> catch (InterruptedException e) > >> {} > >> > >> while (inputStream.available() > 0) > >> { > >> numBytes = inputStream.read(readBuffer); > >> } > >> > >> processReceivedData(readBuffer, numBytes); } catch (IOException > >> e) { > >> System.out.println(e.getMessage()); > >> } > >> > >> So I guess the error is happening on the > >> inputStream.read(readBuffer) > >> > >> again, any help is appreciated and again, thanks in advance Keith > >> > >>> From: "Keith Thorne" > >>> Reply-To: RXTX Developers and Users > >>> To: rxtx at qbang.org > >>> Subject: [Rxtx] error getting InputStream > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > >>> > >>> Hi, > >>> > >>> I have written a program in Java for Windows xp using RXTX (which > >>> is >why > >> I > >>> am using this mailing list :). However, I am getting a problem. I > >>> am connecting to a serial port, like so: > >>> private CommPortIdentifier portID; > >>> > >>> private boolean openPort(String selectedPort) > >>> { > >>> boolean portFound = false; > >>> Enumeration portList; > >>> > >>> portList = CommPortIdentifier.getPortIdentifiers(); > >>> > >>> while (portList.hasMoreElements()) > >>> { > >>> portID = (CommPortIdentifier) portList.nextElement(); > >>> if (portID.getPortType() == >CommPortIdentifier.PORT_SERIAL) > >>> { > >>> if (portID.getName().equals(selectedPort)) > >>> { > >>> portFound = true; > >>> break; > >>> } > >>> } > >>> } > >>> > >>> return portFound; > >>> } > >>> > >>> and then I try and get the serial port input stream (leaving out > >>> the >try > >>> and > >>> catch for the sake of space): > >>> > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", >2000); > >>> InputStream inputStream = serialPort.getInputStream(); > >>> > >>> but on the getInputStream() I get the following error message: > >>> > >>> Bad file descriptor in nativeavailable > >>> > >>> I cannot figure out where it is going wrong...anyone any ideas. A >quick > >>> answer would be wonderful, as I am kinda under the hammer to get > >>> this > >> fixed > >>> quickly > >>> > >>> Thanks in Advance > >>> Keith > >>> > >>> > >>> _______________________________________________ > >>> Rxtx mailing list > >>> Rxtx at qbang.org > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > >> > >> > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Pawan.Kharbanda at dot.state.co.us Fri Aug 4 14:36:16 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 4 Aug 2006 14:36:16 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Trent, As discussed over the phone yesterday, I am emailing you all the details of the bugs I have been experiencing. We do not use Serial Ports like most of the applications. Our application uses approx 80 -100 serial ports (attached thru Digi boxes) which are opened and closed every 20 sec to 1 minute depending upon the type of device. Some Serial ports are left opened all the time and receive event based serial calls while other devices uses polling (request and reply) to collect data. So the opening and closing of the Serial Ports is not really in a sequential order as you mentioned in our conversation yesterday. Also 2 same serial ports can never be opened at one time we have business locks to prevent that from happening. Our findings so far (of course with the help of RXTX user group): The real culprit is in the SerialImp.c file, somehow the other the Event Info Structure in the Linked List gets damaged and loses references to the original EIS structure. I believe both the problems are caused because of the corruption of EIS packet. I have noticed that the link list traversal of EIS in the following methods under SerialImp.c : 1)initialise_event_info_struct 2)finalize_event_info_struct 3)interruptEventLoop So culprit code might be in one of these methods. I am currently using JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and Fedora Core 5). I am also attaching a Test Class to replicate the problem. You need to modify the class and add your systems Serial ports into the code and execute. java TestOpenClosePort 100 It will open and close all the serial ports 100 times in there own thread. Please let me know, I will be available thru out this weekend and can help you as much as I can with testing. Regards Pawan Kharbanda CDOT-ITS 303-478-2991 (cell) 303-985-4350 (home) -------------- next part -------------- A non-text attachment was scrubbed... Name: TestOpenClosePort.java Type: application/octet-stream Size: 6139 bytes Desc: TestOpenClosePort.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060804/dd3754d9/TestOpenClosePort-0006.obj From tjarvi at qbang.org Fri Aug 4 15:43:09 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 4 Aug 2006 15:43:09 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: Thanks, I'll look at it tomorrow morning. I don't know when I'll find the solution but you may check email tomorrow afternoon to see if I think I found it. On Fri, 4 Aug 2006, Kharbanda, Pawan wrote: > Trent, > As discussed over the phone yesterday, I am emailing you all the > details of the bugs I have been experiencing. We do not use Serial Ports > like most of the applications. Our application uses approx 80 -100 > serial ports (attached thru Digi boxes) which are opened and closed > every 20 sec to 1 minute depending upon the type of device. Some Serial > ports are left opened all the time and receive event based serial calls > while other devices uses polling (request and reply) to collect data. So > the opening and closing of the Serial Ports is not really in a > sequential order as you mentioned in our conversation yesterday. Also 2 > same serial ports can never be opened at one time we have business locks > to prevent that from happening. > > Our findings so far (of course with the help of RXTX user group): > > The real culprit is in the SerialImp.c file, somehow the other the Event > Info Structure in the Linked List gets damaged and loses references to > the original EIS structure. I believe both the problems are caused > because of the corruption of EIS packet. I have noticed that the link > list traversal of EIS in the following methods under SerialImp.c : > > 1)initialise_event_info_struct > 2)finalize_event_info_struct > 3)interruptEventLoop > > So culprit code might be in one of these methods. I am currently using > JDK 1.5.06 on Red hat Linux (we found the same problem in Windows and > Fedora Core 5). > > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > > Regards > Pawan Kharbanda > CDOT-ITS > 303-478-2991 (cell) > 303-985-4350 (home) > > > > > > > > > > From tjarvi at qbang.org Sat Aug 5 12:32:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:32:40 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E61A@hqexchange3.dot.state.co.us> Message-ID: > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:34:27 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:34:27 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> You need to run it few times. More the number of ports, more frequently you can reproduce. With just 2 ports it will be hard to reproduce frequently. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:33 PM To: Kharbanda, Pawan Cc: tjarvi at qbang.org; RXTX Developers and Users Subject: Re: Port Locking / JVM Crashing > I am also attaching a Test Class to replicate the problem. You need to > modify the class and add your systems Serial ports into the code and > execute. > > java TestOpenClosePort 100 > > It will open and close all the serial ports 100 times in there own > thread. > > Please let me know, I will be available thru out this weekend and can > help you as much as I can with testing. > How reproducable is the problem with the above testcase? I'm running 100's of iterations without reproducing the problem. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Aug 5 12:52:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 12:52:26 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E657@hqexchange3.dot.state.co.us> Message-ID: Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more frequently > you can reproduce. With just 2 ports it will be hard to reproduce > frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 12:57:49 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 12:57:49 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Trent, I have 5 ports of Digi and I can reproduce almost every time. Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX version -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 12:52 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Whats a few times? I've got 4 ports here and have run it a few thousand iterations. Is that true for you if you run it with just four of your DIGI ports? On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > You need to run it few times. More the number of ports, more > frequently you can reproduce. With just 2 ports it will be hard to > reproduce frequently. > > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:33 PM > To: Kharbanda, Pawan > Cc: tjarvi at qbang.org; RXTX Developers and Users > Subject: Re: Port Locking / JVM Crashing > >> I am also attaching a Test Class to replicate the problem. You need >> to > >> modify the class and add your systems Serial ports into the code and >> execute. >> >> java TestOpenClosePort 100 >> >> It will open and close all the serial ports 100 times in there own >> thread. >> >> Please let me know, I will be available thru out this weekend and can >> help you as much as I can with testing. >> > > How reproducable is the problem with the above testcase? I'm running > 100's of iterations without reproducing the problem. > > -- > Trent Jarvi > tjarvi at qbang.org > From tjarvi at qbang.org Sat Aug 5 13:06:07 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:06:07 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E658@hqexchange3.dot.state.co.us> Message-ID: You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few thousand > iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:07:33 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:07:33 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E659@hqexchange3.dot.state.co.us> We use our own locks but I haven't turned off the RXTX locks. I am still using the RXTX locks that might be the difference. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:13:22 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:13:22 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Trent, How can you turn off the lock files? I can try using that. I never tried that, I thought you can't turn off the file locking. ~pk -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:06 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing You may try 4 ports instead of 5 to make sure thats not the issue. SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) I'm using rxtx 2.1-7 (final) with default configuration except lockfiles are disabled. I gathered that you are doing your own resource locking. ... Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Port /dev/ttyS0 is Closed Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent ... On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, I have 5 ports of Digi and I can reproduce almost every time. > Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX > version > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 12:52 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Whats a few times? I've got 4 ports here and have run it a few > thousand iterations. > > Is that true for you if you run it with just four of your DIGI ports? > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> You need to run it few times. More the number of ports, more >> frequently you can reproduce. With just 2 ports it will be hard to >> reproduce frequently. >> >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:33 PM >> To: Kharbanda, Pawan >> Cc: tjarvi at qbang.org; RXTX Developers and Users >> Subject: Re: Port Locking / JVM Crashing >> >>> I am also attaching a Test Class to replicate the problem. You need >>> to >> >>> modify the class and add your systems Serial ports into the code and >>> execute. >>> >>> java TestOpenClosePort 100 >>> >>> It will open and close all the serial ports 100 times in there own >>> thread. >>> >>> Please let me know, I will be available thru out this weekend and >>> can > >>> help you as much as I can with testing. >>> >> >> How reproducable is the problem with the above testcase? I'm running >> 100's of iterations without reproducing the problem. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > From tjarvi at qbang.org Sat Aug 5 13:18:53 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 13:18:53 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65A@hqexchange3.dot.state.co.us> Message-ID: Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux java > -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except lockfiles > are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From Pawan.Kharbanda at dot.state.co.us Sat Aug 5 13:31:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Sat, 5 Aug 2006 13:31:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Trent, I am able to constantly replicate almost everytime even when I have locks disabled. Don't know the reason why you are not able to on your environment. Any suggestions??????? Cycle No (Thread ::: /dev/cuf04) ::::::: 7 Cycle No (Thread ::: /dev/cuf01) ::::::: 7 Cycle No (Thread ::: /dev/cuf02) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) Exiting Thread ::: /dev/cuf03 Cycle No (Thread ::: /dev/cuf03) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 7 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent Port /dev/cuf01 is Opened 0x01 Sent Port /dev/cub01 is Opened 0x01 Sent Port /dev/cuf01 is Closed Port /dev/cuf02 is Closed Port /dev/cuf03 is Closed Port /dev/cuf04 is Closed Port /dev/cub01 is Closed Exiting Thread ::: /dev/cuf03 Exiting Thread ::: /dev/cuf02 Cycle No (Thread ::: /dev/cuf03) ::::::: 8 Cycle No (Thread ::: /dev/cuf02) ::::::: 8 Exiting Thread ::: /dev/cuf04 Exiting Thread ::: /dev/cuf01 Cycle No (Thread ::: /dev/cuf01) ::::::: 8 Cycle No (Thread ::: /dev/cuf04) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cuf01,1) RXTXCommDriver:getCommPort(/dev/cuf04,1) RXTXCommDriver:getCommPort(/dev/cuf02,1) RXTXCommDriver:getCommPort(/dev/cuf03,1) Exiting Thread ::: /dev/cub01 Cycle No (Thread ::: /dev/cub01) ::::::: 8 RXTXCommDriver:getCommPort(/dev/cub01,1) Port /dev/cuf02 is Opened 0x01 Sent Port /dev/cuf04 is Opened 0x01 Sent Port /dev/cuf01 is Opened Port /dev/cuf03 is Opened 0x01 Sent 0x01 Sent # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 # # An error report file with more information is saved as hs_err_pid21386.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Saturday, August 05, 2006 1:19 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Lockfiles are a compile time option. I've turned them on now, corrected a mistake resulting in only 3 ports being used and now have it going through a few hundred iterations again without a crash. To disable lockfiles.. ./configure --disable-lockfiles && make install Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed Port /dev/ttyS5 is Closed Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port /dev/ttyS1 is Opened 0x01 Sent Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS0 is Opened 0x01 Sent Port /dev/ttyS1 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS5 is Opened 0x01 Sent Port /dev/ttyS0 is Closed On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, How can you turn off the lock files? I can try using that. I > never tried that, I thought you can't turn off the file locking. > ~pk > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:06 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > You may try 4 ports instead of 5 to make sure thats not the issue. > > SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) > 2.6.11.4-20a-smp > #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux > java -version java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) > > I'm using rxtx 2.1-7 (final) with default configuration except > lockfiles are disabled. I gathered that you are doing your own resource locking. > > ... > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS4 is Closed > Port /dev/ttyS1 is Closed > Port /dev/ttyS0 is Closed > Exiting Thread ::: /dev/ttyS4 > Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: > /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting > Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port > /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > ... > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, I have 5 ports of Digi and I can reproduce almost every time. >> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >> version >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 12:52 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Whats a few times? I've got 4 ports here and have run it a few >> thousand iterations. >> >> Is that true for you if you run it with just four of your DIGI ports? >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> You need to run it few times. More the number of ports, more >>> frequently you can reproduce. With just 2 ports it will be hard to >>> reproduce frequently. >>> >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:33 PM >>> To: Kharbanda, Pawan >>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>> Subject: Re: Port Locking / JVM Crashing >>> >>>> I am also attaching a Test Class to replicate the problem. You need >>>> to >>> >>>> modify the class and add your systems Serial ports into the code >>>> and > >>>> execute. >>>> >>>> java TestOpenClosePort 100 >>>> >>>> It will open and close all the serial ports 100 times in there own >>>> thread. >>>> >>>> Please let me know, I will be available thru out this weekend and >>>> can >> >>>> help you as much as I can with testing. >>>> >>> >>> How reproducable is the problem with the above testcase? I'm >>> running > >>> 100's of iterations without reproducing the problem. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> > From tjarvi at qbang.org Sat Aug 5 14:14:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 5 Aug 2006 14:14:49 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: I'd stick a couple $15 dual port serial boards in the machine to see if its kernel driver specific. I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more problematic. They do not get the same number of eyes looking for problems. You could try putting #undef TIOCSERGETLSR #undef TIOCGICOUNT in the very top of SerialImp.h or one or the other to flip bits of code off and on. The kernel here is 2.6.11.4-20a-smp from Suse. glibc is 2.3.4-23.4 from Suse the jre is 1.5.0_06-b05 from Sun. The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC ram. You should be able to reproduce what I'm seeing then go from there. I don't think I'm going to see this problem without having the same cornercase hardware you have. Maybe we can work that out off the list but I doubt I'm going to find it in rxtx at this point. I have seen problems in the past were kernel structs don't match user space struct and bad things happen but I was including a kernel struct to get functionality that had not made its way into user space at the time. The only thing I may be missing is that when I write 0x01 out the port, nothing comes back. That was not specified but you could easily disconnect anything connected to the ports to see if that changes anything. rxtx is far from bug free but I do not see anything yet. On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I am able to constantly replicate almost everytime even when I have > locks disabled. Don't know the reason why you are not able to on your > environment. Any suggestions??????? > > > Cycle No (Thread ::: /dev/cuf04) ::::::: 7 > Cycle No (Thread ::: /dev/cuf01) ::::::: 7 > Cycle No (Thread ::: /dev/cuf02) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > Exiting Thread ::: /dev/cuf03 > Cycle No (Thread ::: /dev/cuf03) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 7 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > Port /dev/cuf01 is Opened > 0x01 Sent > Port /dev/cub01 is Opened > 0x01 Sent > Port /dev/cuf01 is Closed > Port /dev/cuf02 is Closed > Port /dev/cuf03 is Closed > Port /dev/cuf04 is Closed > Port /dev/cub01 is Closed > Exiting Thread ::: /dev/cuf03 > Exiting Thread ::: /dev/cuf02 > Cycle No (Thread ::: /dev/cuf03) ::::::: 8 > Cycle No (Thread ::: /dev/cuf02) ::::::: 8 > Exiting Thread ::: /dev/cuf04 > Exiting Thread ::: /dev/cuf01 > Cycle No (Thread ::: /dev/cuf01) ::::::: 8 > Cycle No (Thread ::: /dev/cuf04) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cuf01,1) > RXTXCommDriver:getCommPort(/dev/cuf04,1) > RXTXCommDriver:getCommPort(/dev/cuf02,1) > RXTXCommDriver:getCommPort(/dev/cuf03,1) > Exiting Thread ::: /dev/cub01 > Cycle No (Thread ::: /dev/cub01) ::::::: 8 > RXTXCommDriver:getCommPort(/dev/cub01,1) > Port /dev/cuf02 is Opened > 0x01 Sent > Port /dev/cuf04 is Opened > 0x01 Sent > Port /dev/cuf01 is Opened > Port /dev/cuf03 is Opened > 0x01 Sent > 0x01 Sent > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 > # > # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) > # Problematic frame: > # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 > # > # An error report file with more information is saved as > hs_err_pid21386.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > Aborted > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Saturday, August 05, 2006 1:19 PM > To: Kharbanda, Pawan > Cc: Trent Jarvi; RXTX Developers and Users > Subject: RE: Port Locking / JVM Crashing > > > Lockfiles are a compile time option. I've turned them on now, corrected > a mistake resulting in only 3 ports being used and now have it going > through a few hundred iterations again without a crash. > > To disable lockfiles.. > > ./configure --disable-lockfiles && make install > > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > Port /dev/ttyS5 is Closed > Exiting Thread ::: /dev/ttyS1 > Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: > /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread > ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting > Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port > /dev/ttyS1 is Opened > 0x01 Sent > Port /dev/ttyS4 is Opened > 0x01 Sent > Port /dev/ttyS0 is Opened > 0x01 Sent > Port /dev/ttyS1 is Closed > Port /dev/ttyS4 is Closed > Port /dev/ttyS5 is Opened > 0x01 Sent > Port /dev/ttyS0 is Closed > > > > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, How can you turn off the lock files? I can try using that. I >> never tried that, I thought you can't turn off the file locking. >> ~pk >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:06 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> You may try 4 ports instead of 5 to make sure thats not the issue. >> >> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >> 2.6.11.4-20a-smp >> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >> java -version java version "1.5.0_06" >> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >> >> I'm using rxtx 2.1-7 (final) with default configuration except >> lockfiles are disabled. I gathered that you are doing your own > resource locking. >> >> ... >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS0 is Closed >> Exiting Thread ::: /dev/ttyS4 >> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >> Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >> /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> ... >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>> version >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 12:52 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> Whats a few times? I've got 4 ports here and have run it a few >>> thousand iterations. >>> >>> Is that true for you if you run it with just four of your DIGI ports? >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> You need to run it few times. More the number of ports, more >>>> frequently you can reproduce. With just 2 ports it will be hard to >>>> reproduce frequently. >>>> >>>> ~pk >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:33 PM >>>> To: Kharbanda, Pawan >>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>> Subject: Re: Port Locking / JVM Crashing >>>> >>>>> I am also attaching a Test Class to replicate the problem. You need > >>>>> to >>>> >>>>> modify the class and add your systems Serial ports into the code >>>>> and >> >>>>> execute. >>>>> >>>>> java TestOpenClosePort 100 >>>>> >>>>> It will open and close all the serial ports 100 times in there own >>>>> thread. >>>>> >>>>> Please let me know, I will be available thru out this weekend and >>>>> can >>> >>>>> help you as much as I can with testing. >>>>> >>>> >>>> How reproducable is the problem with the above testcase? I'm >>>> running >> >>>> 100's of iterations without reproducing the problem. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> >>> >> > From rtlane01 at comcast.net Tue Aug 1 19:22:03 2006 From: rtlane01 at comcast.net (Randall T. Lane) Date: Tue, 01 Aug 2006 21:22:03 -0400 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] Message-ID: <44CFFE3B.90001@comcast.net> Rxtx Community: Please see my e-mail to Trent. Does anyone have any experience using rxtx to successfully communicate with hardware via USB? Thanks. Randy Lane -------------- next part -------------- An embedded message was scrubbed... From: Trent Jarvi Subject: Re: Help with RxTx for USB Communication Date: Tue, 1 Aug 2006 18:49:13 -0600 (MDT) Size: 3300 Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060801/9bbbc255/HelpwithRxTxforUSBCommunication-0006.mht From naranjo.manuel at gmail.com Sun Aug 6 16:59:28 2006 From: naranjo.manuel at gmail.com (Manuel Francisco Naranjo) Date: Sun, 06 Aug 2006 19:59:28 -0300 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44CFFE3B.90001@comcast.net> References: <44CFFE3B.90001@comcast.net> Message-ID: <44D67450.8010100@gmail.com> Randy: I have been able to communicate to AIRcable USB Bluetooth Dongle, with success. I'm not sure which are the options that you have to send to RXTX library, but you can indeed. Check that you do not have the port avaible for much long. I have heard of a problem with WinXP that it simply turn off virtual ports when they are too much long with out activity. If you want I can send you my code, because it is avaible under GPL, the new release is not avaible at AIRcable web site, but it should in short time. Regards, Manu > Rxtx Community: > > Please see my e-mail to Trent. Does anyone have any experience using > rxtx to successfully communicate with hardware via USB? > > Thanks. > > Randy Lane > > ------------------------------------------------------------------------ > > Asunto: > Re: Help with RxTx for USB Communication > De: > Trent Jarvi > Fecha: > Tue, 1 Aug 2006 18:49:13 -0600 (MDT) > Para: > "Randall T. Lane" > > Para: > "Randall T. Lane" > CC: > taj at www.linux.org.uk > > > On Tue, 1 Aug 2006, Randall T. Lane wrote: > >> Trent, >> >> I am working on a project written in Java (1.5) and need to >> communicate to an external device via a USB port. >> >> I have downloaded rxtx-2.1-7-bins-r2.zip from www.rxtx.org and setup >> a Java test project to learn how to use rxtx. I am able to list the >> serial ports available, however rxtx does not recognize my USB port. >> I am running on Windows XP. Here is some output from my test project >> ... >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> COM1 - Serial >> COM3 - Serial >> LPT1 - Parallel >> >> I would appreciate any help you could provide in getting rxtx to >> allow me to communicate via my USB port. >> >> Here is my code, if that would help. >> >> public static void main(String[] args) { >> listPorts(); >> // The listPorts() and getPortTypeName() methods are used for >> port identification. >> static void listPorts() >> { >> Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); >> while ( portEnum.hasMoreElements() ) >> { >> CommPortIdentifier portIdentifier = (CommPortIdentifier) >> portEnum.nextElement(); >> System.out.println(portIdentifier.getName() + " - " + >> getPortTypeName(portIdentifier.getPortType()) ); >> } } >> static String getPortTypeName ( int portType ) >> { >> switch ( portType ) >> { >> case CommPortIdentifier.PORT_I2C: >> return "I2C"; >> case CommPortIdentifier.PORT_PARALLEL: >> return "Parallel"; >> case CommPortIdentifier.PORT_RAW: >> return "Raw"; >> case CommPortIdentifier.PORT_RS485: >> return "RS485"; >> case CommPortIdentifier.PORT_SERIAL: >> return "Serial"; >> default: >> return "unknown type"; >> } >> } >> >> Thanks. >> >> Randy Lane >> > > Hi Randy > > The rxtx mail list is a better place to ask as there are more eyes. > I'm swamped with work. > > Be sure to look to see that your serial port dongle shows up as a > serial port in device manager and no other applications have it open. > USB serial dongles do work with rxtx. Some are less complete than > others. > > -- > Trent Jarvi > tjarvi at qbang.org > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From eddythejekyll at gmail.com Sun Aug 6 23:31:45 2006 From: eddythejekyll at gmail.com (Ed) Date: Sun, 6 Aug 2006 23:31:45 -0600 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? Message-ID: I have written a simple client server (RMI) application without using RxTx where the server controls a parallel port simply by addressing the port and banging the bits in order to drive a relay. It also reads the port's. I am doing this by making Runtime.exec calls to a binary that actually does the parallel port bit banging and reading. However, I'd like to use RxTx so it is a pure Java application, and I've so far installed and figured out how to discover the ports, but I'm having trouble finding good examples or some howto type documentation for this. I did find the two examples on the Wiki: one for serial IO and the other to discover the ports on a system. As I said, I have so far installed RxTx and gotten it to compile and run and I can identify the ports. When I run the server I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Found Ports! Found port COM1 Found port COM3 Found port LPT1 LPT1 Not Currently owned EASSwitch Server starting. EASSwitch is bound. Server Ready. So it looks like thing are installed and working, but I feel all dressed up and no idea how to proceed. Basically, I just want to be able to toggle the data lines on the parallel port and read them. Very simple. No parallel printer type usage. Are there any examples I can work off of? If so, please advise. Thank you. -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060806/c7e39898/attachment-0006.html From hambyiii at hotmail.com Sun Aug 6 23:53:54 2006 From: hambyiii at hotmail.com (Keith Thorne) Date: Mon, 07 Aug 2006 05:53:54 +0000 Subject: [Rxtx] error getting InputStream In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E5AF@hqexchange3.dot.state.co.us> Message-ID: Hi, sorry I took the weekend to reply, but I was away for the last couple of days. Unfortunately I cannot send the full stack trace yet. The problem is not, unfortunately, happening on my computer, but on a clients computer, which I will go and visit today. I will hopefully be able to get a stack trace then. As to the physical connection, tt is indeed a USB from the computer, connected to a 9 pin serial device that connects to the hard-ware. My java version is 1.5.06 >From: "Kharbanda, Pawan" >Reply-To: RXTX Developers and Users >To: "RXTX Developers and Users" >Subject: Re: [Rxtx] error getting InputStream >Date: Fri, 4 Aug 2006 09:15:24 -0600 > >Keith, > Please send the full stack trace of the exception, may be I can help >you. On Trent's question regarding physical 'Serial Port', do you mean >you have a USB(Connected to Client Machine) to 9 Pin Serial >cable(Connected to H/W device)? > >Also please mention which java version you are using? > >Thanks >Pawan Kharbanda > > >-----Original Message----- >From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >Of Keith Thorne >Sent: Friday, August 04, 2006 7:52 AM >To: rxtx at qbang.org >Subject: Re: [Rxtx] error getting InputStream > >The physical serial port is actually a USB connection that is then >changed to a "virtual serial port", so I can use the serial port >protocols to connect to it. The other end of the connection is a >hardware device that is constantly turned on. I am not sure about the >port 'vanishing'...we have another piece of software that came with the >hardware device, which we can test the device (and with it the virtual >serial port) with. This has no problem connecting to the serial port or >writing to/reading from the device. >It is only when my software is run, that the error occurs. Like I have >said, my software (using rxtx) is connecting to the serial port >successfully, but it is when I try and write to the serial port that I >get the error. > >Although to be truthful, I am not absolutely certain if the error is >happening on the oStream.write() or the oStream.flush(). I only think it >is the write(), because that is where the writeArray() function is >called. > >thanks >Keith > > > >From: Trent Jarvi > >Reply-To: RXTX Developers and Users > >To: RXTX Developers and Users > >Subject: Re: [Rxtx] error getting InputStream > >Date: Fri, 4 Aug 2006 07:26:10 -0600 (MDT) > > > > > >Hi Keith > > > >Can you tell us more about the physical serial port? Might it be > >'vanishing?' > > > >On Fri, 4 Aug 2006, Keith Thorne wrote: > > > > > Hi, > > > > > > I know I am replying to myself a lot at the moment, but more > > > information > >has > > > come to light (These errors are actually happening on a client > > > machine, > >on > > > software that has worked for the past month, and only now has > > > started to fail, which is why I am a little slow finding things out) > > > > > > The errors I have already written about are only symptoms of an > > > orignal error. The original error occurs the first time I try to > > > WRITE thte > > > OutputStream: > > > > > > OutputStream oStream = serialPort.getOutputStream(); > > > serialPort.notifyOnOutputEmpty(true); > > > > > > byte[] bs = encodeMessage(configString.toString()); > > > > > > oStream.write(bs); > > > oStream.flush(); > > > > > > The error occurs on oStream.write(bs); and is: > > > > > > Input/output error in writeArray > > > > > > Now writeArray is native code, so I have no idea what is going on >there. > >Any > > > help would be appreciated > > > Thanks > > > Keith > > > > > > > > >> From: "Keith Thorne" > > >> Reply-To: RXTX Developers and Users > > >> To: rxtx at qbang.org > > >> Subject: Re: [Rxtx] error getting InputStream > > >> Date: Fri, 04 Aug 2006 11:42:21 +0000 > > >> > > >> Okay, I made a little mistake in my last message. > > >> > > >> The error is not occuring where I thought it was. Instead it is > >occuring > > >> when I do the following: > > >> > > >> byte[] readBuffer = new byte[128]; > > >> > > >> try { > > >> > > >> int numBytes = 0; > > >> try { > > >> Thread.sleep(500); > > >> } > > >> catch (InterruptedException e) > > >> {} > > >> > > >> while (inputStream.available() > 0) > > >> { > > >> numBytes = inputStream.read(readBuffer); > > >> } > > >> > > >> processReceivedData(readBuffer, numBytes); } catch (IOException > > >> e) { > > >> System.out.println(e.getMessage()); > > >> } > > >> > > >> So I guess the error is happening on the > > >> inputStream.read(readBuffer) > > >> > > >> again, any help is appreciated and again, thanks in advance Keith > > >> > > >>> From: "Keith Thorne" > > >>> Reply-To: RXTX Developers and Users > > >>> To: rxtx at qbang.org > > >>> Subject: [Rxtx] error getting InputStream > > >>> Date: Fri, 04 Aug 2006 10:52:47 +0000 > > >>> > > >>> Hi, > > >>> > > >>> I have written a program in Java for Windows xp using RXTX (which > > >>> is > >why > > >> I > > >>> am using this mailing list :). However, I am getting a problem. I > > >>> am connecting to a serial port, like so: > > >>> private CommPortIdentifier portID; > > >>> > > >>> private boolean openPort(String selectedPort) > > >>> { > > >>> boolean portFound = false; > > >>> Enumeration portList; > > >>> > > >>> portList = CommPortIdentifier.getPortIdentifiers(); > > >>> > > >>> while (portList.hasMoreElements()) > > >>> { > > >>> portID = (CommPortIdentifier) portList.nextElement(); > > >>> if (portID.getPortType() == > >CommPortIdentifier.PORT_SERIAL) > > >>> { > > >>> if (portID.getName().equals(selectedPort)) > > >>> { > > >>> portFound = true; > > >>> break; > > >>> } > > >>> } > > >>> } > > >>> > > >>> return portFound; > > >>> } > > >>> > > >>> and then I try and get the serial port input stream (leaving out > > >>> the > >try > > >>> and > > >>> catch for the sake of space): > > >>> > > >>> SerialPort serialPort = (SerialPort) portID.open("RFIDReaderComm", > >2000); > > >>> InputStream inputStream = serialPort.getInputStream(); > > >>> > > >>> but on the getInputStream() I get the following error message: > > >>> > > >>> Bad file descriptor in nativeavailable > > >>> > > >>> I cannot figure out where it is going wrong...anyone any ideas. A > >quick > > >>> answer would be wonderful, as I am kinda under the hammer to get > > >>> this > > >> fixed > > >>> quickly > > >>> > > >>> Thanks in Advance > > >>> Keith > > >>> > > >>> > > >>> _______________________________________________ > > >>> Rxtx mailing list > > >>> Rxtx at qbang.org > > >>> http://mailman.qbang.org/mailman/listinfo/rxtx > > >> > > >> > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Aug 7 06:22:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:22:03 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E65B@hqexchange3.dot.state.co.us> Message-ID: Hmm.. I left the test running went I went home Saturday. It looks like something did show up after ~30k iterations. I'll look at it more in my free time. Port /dev/ttyS4 is Opened 0x01 Sent Port /dev/ttyS5 is Closed Port /dev/ttyS4 is Closed Port /dev/ttyS1 is Closed Exiting Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 29417 Exiting Thread ::: /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 29417 Exiting Thread ::: /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 29417 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00002aab14c2ec63, pid=20573, tid=1095125344 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x6c63] initialise_event_info_struct+0x63 # [thread 1087756640 also had an error] Port /dev/ttyS5 is Opened 0x01 Sent [thread 1089861984 also had an error] Port /dev/ttyS4 is Opened 0x01 Sent [thread 1090914656 also had an error] # An error report file with more information is saved as [thread 1090914656 also had an error] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # Aborted On Sat, 5 Aug 2006, Trent Jarvi wrote: > > I'd stick a couple $15 dual port serial boards in the machine to see if its > kernel driver specific. > > I'm at 7000 iterations now. Multiport 'board' kernel drivers can be more > problematic. They do not get the same number of eyes looking for problems. > > You could try putting > > #undef TIOCSERGETLSR > #undef TIOCGICOUNT > > in the very top of SerialImp.h or one or the other to flip bits of code off > and on. > > The kernel here is 2.6.11.4-20a-smp from Suse. > glibc is 2.3.4-23.4 from Suse > the jre is 1.5.0_06-b05 from Sun. > > The machine is an Tyan Thunder S2885 Dual opteron with 248 CPUs 1GB 400ECC > ram. > > You should be able to reproduce what I'm seeing then go from there. I don't > think I'm going to see this problem without having the same cornercase > hardware you have. Maybe we can work that out off the list but I doubt I'm > going to find it in rxtx at this point. > > I have seen problems in the past were kernel structs don't match user space > struct and bad things happen but I was including a kernel struct to get > functionality that had not made its way into user space at the time. > > The only thing I may be missing is that when I write 0x01 out the port, > nothing comes back. That was not specified but you could easily disconnect > anything connected to the ports to see if that changes anything. > > rxtx is far from bug free but I do not see anything yet. > > On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: > >> Trent, >> I am able to constantly replicate almost everytime even when I have >> locks disabled. Don't know the reason why you are not able to on your >> environment. Any suggestions??????? >> >> >> Cycle No (Thread ::: /dev/cuf04) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 7 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> Exiting Thread ::: /dev/cuf03 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 7 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> Port /dev/cuf01 is Opened >> 0x01 Sent >> Port /dev/cub01 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Closed >> Port /dev/cuf02 is Closed >> Port /dev/cuf03 is Closed >> Port /dev/cuf04 is Closed >> Port /dev/cub01 is Closed >> Exiting Thread ::: /dev/cuf03 >> Exiting Thread ::: /dev/cuf02 >> Cycle No (Thread ::: /dev/cuf03) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf02) ::::::: 8 >> Exiting Thread ::: /dev/cuf04 >> Exiting Thread ::: /dev/cuf01 >> Cycle No (Thread ::: /dev/cuf01) ::::::: 8 >> Cycle No (Thread ::: /dev/cuf04) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cuf01,1) >> RXTXCommDriver:getCommPort(/dev/cuf04,1) >> RXTXCommDriver:getCommPort(/dev/cuf02,1) >> RXTXCommDriver:getCommPort(/dev/cuf03,1) >> Exiting Thread ::: /dev/cub01 >> Cycle No (Thread ::: /dev/cub01) ::::::: 8 >> RXTXCommDriver:getCommPort(/dev/cub01,1) >> Port /dev/cuf02 is Opened >> 0x01 Sent >> Port /dev/cuf04 is Opened >> 0x01 Sent >> Port /dev/cuf01 is Opened >> Port /dev/cuf03 is Opened >> 0x01 Sent >> 0x01 Sent >> # >> # An unexpected error has been detected by HotSpot Virtual Machine: >> # >> # SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120 >> # >> # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) >> # Problematic frame: >> # C [librxtxSerial.so+0x6962] initialise_event_info_struct+0x66 >> # >> # An error report file with more information is saved as >> hs_err_pid21386.log >> # >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >> Aborted >> >> -----Original Message----- >> From: Trent Jarvi [mailto:tjarvi at qbang.org] >> Sent: Saturday, August 05, 2006 1:19 PM >> To: Kharbanda, Pawan >> Cc: Trent Jarvi; RXTX Developers and Users >> Subject: RE: Port Locking / JVM Crashing >> >> >> Lockfiles are a compile time option. I've turned them on now, corrected >> a mistake resulting in only 3 ports being used and now have it going >> through a few hundred iterations again without a crash. >> >> To disable lockfiles.. >> >> ./configure --disable-lockfiles && make install >> >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> Port /dev/ttyS5 is Closed >> Exiting Thread ::: /dev/ttyS1 >> Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread ::: >> /dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread >> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting >> Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port >> /dev/ttyS1 is Opened >> 0x01 Sent >> Port /dev/ttyS4 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Opened >> 0x01 Sent >> Port /dev/ttyS1 is Closed >> Port /dev/ttyS4 is Closed >> Port /dev/ttyS5 is Opened >> 0x01 Sent >> Port /dev/ttyS0 is Closed >> >> >> >> >> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >> >>> Trent, How can you turn off the lock files? I can try using that. I >>> never tried that, I thought you can't turn off the file locking. >>> ~pk >>> >>> -----Original Message----- >>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>> Sent: Saturday, August 05, 2006 1:06 PM >>> To: Kharbanda, Pawan >>> Cc: Trent Jarvi; RXTX Developers and Users >>> Subject: RE: Port Locking / JVM Crashing >>> >>> >>> You may try 4 ports instead of 5 to make sure thats not the issue. >>> >>> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) >>> 2.6.11.4-20a-smp >>> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux >>> java -version java version "1.5.0_06" >>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) >>> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode) >>> >>> I'm using rxtx 2.1-7 (final) with default configuration except >>> lockfiles are disabled. I gathered that you are doing your own >> resource locking. >>> >>> ... >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> Port /dev/ttyS4 is Closed >>> Port /dev/ttyS1 is Closed >>> Port /dev/ttyS0 is Closed >>> Exiting Thread ::: /dev/ttyS4 >>> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread ::: >>> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting >>> Thread >>> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port >>> /dev/ttyS4 is Opened >>> 0x01 Sent >>> Port /dev/ttyS1 is Opened >>> 0x01 Sent >>> Port /dev/ttyS0 is Opened >>> 0x01 Sent >>> ... >>> >>> >>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>> >>>> Trent, I have 5 ports of Digi and I can reproduce almost every time. >>>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX >>>> version >>>> >>>> -----Original Message----- >>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>> Sent: Saturday, August 05, 2006 12:52 PM >>>> To: Kharbanda, Pawan >>>> Cc: Trent Jarvi; RXTX Developers and Users >>>> Subject: RE: Port Locking / JVM Crashing >>>> >>>> >>>> Whats a few times? I've got 4 ports here and have run it a few >>>> thousand iterations. >>>> >>>> Is that true for you if you run it with just four of your DIGI ports? >>>> >>>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote: >>>> >>>>> You need to run it few times. More the number of ports, more >>>>> frequently you can reproduce. With just 2 ports it will be hard to >>>>> reproduce frequently. >>>>> >>>>> ~pk >>>>> >>>>> -----Original Message----- >>>>> From: Trent Jarvi [mailto:tjarvi at qbang.org] >>>>> Sent: Saturday, August 05, 2006 12:33 PM >>>>> To: Kharbanda, Pawan >>>>> Cc: tjarvi at qbang.org; RXTX Developers and Users >>>>> Subject: Re: Port Locking / JVM Crashing >>>>> >>>>>> I am also attaching a Test Class to replicate the problem. You need >> >>>>>> to >>>>> >>>>>> modify the class and add your systems Serial ports into the code >>>>>> and >>> >>>>>> execute. >>>>>> >>>>>> java TestOpenClosePort 100 >>>>>> >>>>>> It will open and close all the serial ports 100 times in there own >>>>>> thread. >>>>>> >>>>>> Please let me know, I will be available thru out this weekend and >>>>>> can >>>> >>>>>> help you as much as I can with testing. >>>>>> >>>>> >>>>> How reproducable is the problem with the above testcase? I'm >>>>> running >>> >>>>> 100's of iterations without reproducing the problem. >>>>> >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> >>>> >>> >> > From iinjlv01 at gmail.com Mon Aug 7 06:22:07 2006 From: iinjlv01 at gmail.com (J LV) Date: Mon, 7 Aug 2006 14:22:07 +0200 Subject: [Rxtx] Data lost or Slow sampling Message-ID: Hello I am using RXTX to comm with a motion controller using Serial Port and i can write the commands using SerialPort or RXTXPort without problems, but when i try write and read at high sampling rate, for example to know the position and speed at every moment of a trajectory, i obtain a very irregular response times. I am using the most simple algorimth: 1-Write the command "is trajectory finished?" and wait for SerialPortEvent.DATA_AVAILABLE 2-Read the InputStreamReader of serial port while not empty 3-If trajectory finished then stop program, else, continue 4-Read actual time using System.currentTimeMillis() (t0) 5-Write the command "give me position" and wait for SerialPortEvent.DATA_AVAILABLE 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) 7-Read the InputStreamReader of serial port while not empty 8-Save position in Vector or ArrayList and repeat from 1 I don't know if the problem is the RXTX, my program or the motion controller hardware but i have response times from 16 millis to 78 millis at 19200 bauds!. I am using SwingWorked to threading SerialPort reading/writing process. Any idea or similar data leak problem? Thanks for RXTX project and sorry for my badde english! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/909a4cb3/attachment-0006.html From tjarvi at qbang.org Mon Aug 7 06:50:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 06:50:10 -0600 (MDT) Subject: [Rxtx] Data lost or Slow sampling In-Reply-To: References: Message-ID: On Mon, 7 Aug 2006, J LV wrote: > Hello > > I am using RXTX to comm with a motion controller using Serial Port and i can > write the commands using SerialPort or RXTXPort without problems, but when i > try write and read at high sampling rate, for example to know the position > and speed at every moment of a trajectory, i obtain a very irregular > response times. I am using the most simple algorimth: > 1-Write the command "is trajectory finished?" and wait for > SerialPortEvent.DATA_AVAILABLE > 2-Read the InputStreamReader of serial port while not empty > 3-If trajectory finished then stop program, else, continue > 4-Read actual time using System.currentTimeMillis() (t0) > 5-Write the command "give me position" and wait for > SerialPortEvent.DATA_AVAILABLE > 6-Read time from 4 to 5 (System.currentTimeMillis()- t0) > 7-Read the InputStreamReader of serial port while not empty > 8-Save position in Vector or ArrayList and repeat from 1 > > > I don't know if the problem is the RXTX, my program or the motion controller > hardware but i have response times from 16 millis to 78 millis at 19200 > bauds!. I am using SwingWorked to threading SerialPort reading/writing > process. > > Any idea or similar data leak problem? > > Thanks for RXTX project and sorry for my badde english! > This can be platform dependant. What you may do for a starting point is use a loopback connection and time the same thing at 19200. Write the date, wait for data available, read the data. I would expect from write to data available to take around 10 ms from past experiences. You can experiment with turning on and off buffering in the port settings of the OS, if the OS supports more realtime like interrupts, that could help. You have a java schedual and the kernel schedual. Serial interrupts traditionally have very high priority but modern OSs tend to realize thats not good for GUIs, ... and delay responding to the interrupts. You should be able to have usec response times in a realtime OS. Windows and Linux are not typically setup as realtime OSs. For comparison, the last time I looked which was about 5 years ago, windows NT4 came back with data available in 8 ms and Linux came back in 10 ms. I would be interested in seeing what you get today. -- Trent Jarvi tjarvi at qbang.org From gergg at cox.net Mon Aug 7 09:21:56 2006 From: gergg at cox.net (Gregg Wonderly) Date: Mon, 07 Aug 2006 10:21:56 -0500 Subject: [Rxtx] Is RxTx right for Simple Parallel Port Project? In-Reply-To: References: Message-ID: <44D75A94.9030205@cox.net> Ed wrote: > Are there any examples I can work off of? If so, please advise. Just read the javax.comm javadocs. You need to take the parallel port and write values to it based on which bits of which lines you want on and off. Gregg Wonderly From pete.flugstad at gmail.com Mon Aug 7 09:36:19 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 7 Aug 2006 10:36:19 -0500 Subject: [Rxtx] [Fwd: Re: Help with RxTx for USB Communication] In-Reply-To: <44D67450.8010100@gmail.com> References: <44CFFE3B.90001@comcast.net> <44D67450.8010100@gmail.com> Message-ID: <84d4a6d50608070836v97e9a29q96e98441ea903ac7@mail.gmail.com> FYI, I'm talking to a USB<->Serial dongle just fine under Windows XP Pro. I did have to install a driver for the thing - Windows XP by default, did not recognize it. Once installed, it just showed up as another COM port, and I've been pushing data over it with no problems. Pete From savagobr at yahoo.com Mon Aug 7 10:13:06 2006 From: savagobr at yahoo.com (Adenilson Cavalcanti) Date: Mon, 7 Aug 2006 09:13:06 -0700 (PDT) Subject: [Rxtx] Port Locking / JVM Crashing: 2 ports (Serial + usb) Message-ID: <20060807161306.9648.qmail@web53803.mail.yahoo.com> Trent This is curious, since I did reproduced the aformentioned bug using only 2 ports: /dev/ttyS0 and /dev/ttyUSB0. It only need to run for 500 times: $ java -cp . TestOpenClosePort 500 500 Port /dev/ttyS0 is Closed Excpetion ::: Thread ::: /dev/ttyUSB0null Exiting Thread ::: /dev/ttyUSB0 Cycle No (Thread ::: /dev/ttyUSB0) ::::::: 227 Exiting Thread ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 184 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x203d2044, pid=32368, tid=2986859424 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing) # Problematic frame: # C 0x203d2044 # # An error report file with more information is saved as /tmp/hs_err_pid32368.log # # If you would like to submit a bug report, please visit: http://am.esalq.usp.br/trash/rxtx_bug.tar.bz2 Best regards Savago ps: Test environment $ uname -a Linux localhost.localdomain 2.6.15-1.2054_FC5 #1 Tue Mar 14 15:48:33 EST 2006 i686 i686 i386 GNU/Linux $ java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) $gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.1 20060525 (Red Hat 4.1.1-1) --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060807/c6ca8094/attachment-0006.html From Pawan.Kharbanda at dot.state.co.us Mon Aug 7 17:23:25 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Mon, 7 Aug 2006 17:23:25 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Trent, I think I got the problem fixed after some code changes in the C (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the staging environment (with 10 devices) with real time data and haven't seen a JVM lock/ Port locking since last night. I am going to do further stress testing and will send all my code changes and my findings in next few days. I believe the problem was causing due to the digi drivers and how the Linux kernel talked to it, so after making some code changes and synchronization fixes, I got it to work. I am keeping my fingers crossed :) Thanks for all your help. You have been a great help. Will keep you posted. Cheers ~pk PS : We are going to test my new RXTX changes with the 2.6 Red Hat kernel (currently using 2.4.21-37.ELsmp) too. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 5:08 PM To: Kharbanda, Pawan Subject: RE: Port Locking / JVM Crashing Hi Pawan As mentioned I did reproduce the error but after several hours of cycles. I'm looking at RXTXPort.java and thinking about what may be happening. The error is in the C layer but it may be preventable in the java code. lets say two closes are overlapping or an operation is trying to happen while another port is closing. The structure may be out of sync by the time the code using the structure in another thread gets to the event info struct. So I'm wondering if synchronization in RXTXPort() and close() may help you. A second thing that may help is you can put printf("got here\n"); in each of the lines in initialize event info struct to verify that the problem is in walking the linked list. Thats my suspicion. So a properly timed close() while calling the constructor may be catching rxtx off guard. You can synchronize to test that and it may do away with the problem. From tjarvi at qbang.org Mon Aug 7 18:01:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 7 Aug 2006 18:01:54 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E72C@hqexchange3.dot.state.co.us> Message-ID: Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do further > stress testing and will send all my code changes and my findings in next > few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to happen > while another port is closing. The structure may be out of sync by the > time the code using the structure in another thread gets to the event > info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may do > away with the problem. > From Pawan.Kharbanda at dot.state.co.us Tue Aug 8 13:49:14 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 8 Aug 2006 13:49:14 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Trent, I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and have absolutely no problem with JVM crashing or Port Locking even after 10000 operations (now I am trying 100,000 :). This is all with the original RXTX 2.1.7 (final) api's without any of my fixes that I have been trying for last 2-3 weeks. I will suggest that we update the INSTALL or Readme file accompnying the RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: 82000685_G 02/02/2006). This should helped everybody using the RXTX API's with RedHat Linux atleast. Regards Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Monday, August 07, 2006 6:02 PM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing Thanks Pawan I thought for sure it was a kernel driver problem. When I looked at digi.com and saw it was probably not in the kernel, I started to think even moreso. The kernel authors like to make things hard for external drivers. But when I saw the error this morning, I thought it was a synchronization issue. The other thing I was thinking about was the undef's I mentioned. rxtx behaves differently for some kernel drivers that do not support everything. We have to do that to get the data we need. I was trying to figure out what it may be but not having hardware makes it interesting. On Mon, 7 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I think I got the problem fixed after some code changes in the C > (SerialImp.c) and Java(RXTXPort.java) code. I am now testing on the > staging environment (with 10 devices) with real time data and haven't > seen a JVM lock/ Port locking since last night. I am going to do > further stress testing and will send all my code changes and my > findings in next few days. > > I believe the problem was causing due to the digi drivers and how the > Linux kernel talked to it, so after making some code changes and > synchronization fixes, I got it to work. I am keeping my fingers > crossed > :) > > Thanks for all your help. You have been a great help. > > Will keep you posted. > > Cheers > ~pk > > PS : We are going to test my new RXTX changes with the 2.6 Red Hat > kernel (currently using 2.4.21-37.ELsmp) too. > > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: Monday, August 07, 2006 5:08 PM > To: Kharbanda, Pawan > Subject: RE: Port Locking / JVM Crashing > > > > Hi Pawan > > As mentioned I did reproduce the error but after several hours of > cycles. > > I'm looking at RXTXPort.java and thinking about what may be happening. > The error is in the C layer but it may be preventable in the java code. > > lets say two closes are overlapping or an operation is trying to > happen while another port is closing. The structure may be out of > sync by the time the code using the structure in another thread gets > to the event info struct. > > So I'm wondering if synchronization in RXTXPort() and close() may help > you. > > A second thing that may help is you can put printf("got here\n"); in > each of the lines in initialize event info struct to verify that the > problem is in walking the linked list. Thats my suspicion. > > So a properly timed close() while calling the constructor may be > catching rxtx off guard. You can synchronize to test that and it may > do away with the problem. > From jimo at earthlink.net Wed Aug 9 21:21:00 2006 From: jimo at earthlink.net (Jim Owen) Date: Wed, 9 Aug 2006 20:21:00 -0700 Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat Message-ID: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Hi All, I've run into some difficulties with rxtx that have me baffled and need some help. I have an application that has used earlier versions of rxtx successfully and on a variety of platforms. We recently needed to deploy this application into an environment where we could not utilize lock files. I pulled down the 2.0.7 pre1 source distribution and executed configure with --disable-lockfiles. I then executed make and make install. When I execute the program, as root, I get the following error: ************************************************************************ Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) # Problematic frame: # C 0x00001004 # # An error report file with more information is saved as hs_err_pid20151.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # **************************************************************************** If I execute as a normal user, I get no errors, but no ports listed: (Using an earlier version, I get a serial and parallel port listed.) **************************************************************************** [jim at linuxDev ingenicoApp]$ java VerifyCommBuild Verifying Comm Build Environment Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 Some ports appear to have been found, let's try to enumerate them. Complete. **************************************************************************** When I built rxtx, there was a warning given of the following: **************************************************************************** conftest.c: In function 'main': conftest.c:6: warning: incompatible implicit declaration of built-in function 'printf' conftest.c:7: warning: incompatible implicit declaration of built-in function 'exit' WARNING: Kernel include files do not match the current kernel **************************************************************************** uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux JAVA_HOME=/usr/java/j2sdk1.4.2_11 javax.comm.properties: Driver=gnu.io.RXTXCommDriver Here's the code for VerifyCommBuild.java that I'm using to test: **************************************************************************** import javax.comm.*; import java.util.Enumeration; /** * A quick app to check that the javax.comm (Serial) Communications extension has been properly * installed and configured on this machine. * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. */ public class VerifyCommBuild { public static void main(String args[]) { Enumeration ports; System.out.println("Verifying Comm Build Environment"); try { ports = CommPortIdentifier.getPortIdentifiers(); if (ports == null) { System.out.println("No comm ports found!"); return; } System.out.println("Some ports appear to have been found, let's try to enumerate them."); while (ports.hasMoreElements()) { System.out.println("Here is a port [" + ((CommPortIdentifier)ports.nextElement()).getName() + "]"); } } catch (Exception e) { System.out.println("Failed to enumerate ports [" + e.getMessage() + "]"); e.printStackTrace(); } System.out.println("Complete."); } } **************************************************************************** Any suggestions as to what I'm missing? Thanks, Jim Owen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060809/92503a81/attachment-0006.html From tjarvi at qbang.org Thu Aug 10 05:39:36 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 05:39:36 -0600 (MDT) Subject: [Rxtx] Port Locking / JVM Crashing In-Reply-To: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> References: <939A619A756047469C41EE9BA51890FB0429E7D8@hqexchange3.dot.state.co.us> Message-ID: On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even after > 10000 operations (now I am trying 100,000 :). This is all with the > original RXTX 2.1.7 (final) api's without any of my fixes that I have > been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying the > RXTX saying the suggested kernel for Redhat Linux is 2.6.9-34.0.2.Elsmp > and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From oliver.archner at bayceer.uni-bayreuth.de Wed Aug 9 06:13:36 2006 From: oliver.archner at bayceer.uni-bayreuth.de (Oliver Archner) Date: Wed, 09 Aug 2006 14:13:36 +0200 Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() Message-ID: <44D9D170.5020806@bayceer.uni-bayreuth.de> Dear Users, i would like to send a byte to a parallel device. The following piece of code works well but throws an IOException in LPRPort$ParallelOutputStream.write() saying that everything is ok ?! Oliver import java.io.*; import gnu.io.*; public class Test { public static void main(String[] args) { RXTXCommDriver TxPort = new RXTXCommDriver(); ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", CommPortIdentifier.PORT_PARALLEL); OutputStream oStream = null; try { oStream = pPort.getOutputStream(); oStream.write((byte)0x51); } catch (IOException e) { e.printStackTrace(); } finally { try { if (oStream != null) oStream.close(); } catch (IOException e) { e.printStackTrace(); } } } } Output: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Der Vorgang wurde erfolgreich beendet. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at Test.main(Test.java:12) From tjarvi at qbang.org Thu Aug 10 18:12:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 10 Aug 2006 18:12:27 -0600 (MDT) Subject: [Rxtx] IOExcpetion in ParallelOutputStream.write() In-Reply-To: <44D9D170.5020806@bayceer.uni-bayreuth.de> References: <44D9D170.5020806@bayceer.uni-bayreuth.de> Message-ID: On Wed, 9 Aug 2006, Oliver Archner wrote: > Dear Users, > > i would like to send a byte to a parallel device. > The following piece of code works well but throws an IOException in > LPRPort$ParallelOutputStream.write() saying that everything is ok ?! > > Oliver > > > import java.io.*; > import gnu.io.*; > > public class Test { > > public static void main(String[] args) { > RXTXCommDriver TxPort = new RXTXCommDriver(); > ParallelPort pPort = (ParallelPort) TxPort.getCommPort("LPT1", > CommPortIdentifier.PORT_PARALLEL); > OutputStream oStream = null; > try { > oStream = pPort.getOutputStream(); > oStream.write((byte)0x51); > } catch (IOException e) { > e.printStackTrace(); > } finally { > try { > if (oStream != null) oStream.close(); > } catch (IOException e) { > e.printStackTrace(); > > } > } > > } > } > > Output: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Der Vorgang wurde erfolgreich beendet. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at Test.main(Test.java:12) WriteFile is returning a negative value or 0. I do not know what that exception is saying but it should be an IO Exception. The native code in question is line 405 in ParallelImp.c. If you find the documentation pointing out how the code is wrong, we can fix it. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 08:12:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 09:12:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question Message-ID: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Hello, I'm trying to send data over a serial port using the RXTX libraries. I've got the binaries for Windows XP from qbang.org. On the receiving side, I'm using event notification (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial Ports InputStream. Similarly on the transmist side, I use SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. First question: does this make sense? The code was largely adopted from an existing Windows C++ program and that's more or less how it operated (overlapped io using ReadFile, WriteFile, GetOverlappedResult, Events, etc). Second question: in a small standalone test program I wrote, everything seems to work just fine - whenever SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good chunk of data available (I explicitly set the in/out buffers to 1024 bytes) to read. However, when I pull my "library" into a much larger environment (OSGI framework based, but same JVM/OS/etc), whenever SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a byte or two available. Needless to say, this really kills performance. Everything appears to still operate properly, just really, really slowly. So, has anyone seen this problem before? I haven't dived into the details of RXTX library, and I'm wondering what the mechanism is here? How does the RXTX thread determine when to issue the SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to tweak in RXTX or the JVM to get this to operate more like the small test program? Seems like I want RXTX to call me back _less_ often. Thanks, Pete From tjarvi at qbang.org Fri Aug 11 09:55:23 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 09:55:23 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Hello, > > I'm trying to send data over a serial port using the RXTX > libraries. I've got the binaries for Windows XP from qbang.org. > > On the receiving side, I'm using event notification > (SerialPortEvent.DATA_AVAILABLE) to know when to read from the Serial > Ports InputStream. Similarly on the transmist side, I use > SerialPortEvent.OUTPUT_BUFFER_EMPTY to know when I can send more data. > > First question: does this make sense? The code was largely adopted > from an existing Windows C++ program and that's more or less how it > operated (overlapped io using ReadFile, WriteFile, > GetOverlappedResult, Events, etc). > > Second question: in a small standalone test program I wrote, > everything seems to work just fine - whenever > SerialPortEvent.DATA_AVAILABLE is signaled there's generally a good > chunk of data available (I explicitly set the in/out buffers to 1024 > bytes) to read. > > However, when I pull my "library" into a much larger environment > (OSGI framework based, but same JVM/OS/etc), whenever > SerialPortEvent.DATA_AVAILABLE is signaled, there's generally only a > byte or two available. Needless to say, this really kills > performance. Everything appears to still operate properly, just > really, really slowly. > > So, has anyone seen this problem before? I haven't dived into the > details of RXTX library, and I'm wondering what the mechanism is here? > How does the RXTX thread determine when to issue the > SerialPortEvent.DATA_AVAILABLE callback? Is there something I can to > tweak in RXTX or the JVM to get this to operate more like the small > test program? > Seems like I want RXTX to call me back _less_ often. > Hi Pete RXTX is doing overlapped IO in termios.c. In this file we map the windows functionality to termios (mostly POSIX). From there, we just talk termios to all platforms. What I guess is happening is the eventloop is waiting a specified amount of time. As you application uses more cpu cycles, you observe the difference in behavior. You could go into the C code and change this after looking at the eventLoop() code in serialImp.c and following that to the serial_ioctl() and serial_select() in termios.c Another option is to go into RXTXPort.java and put a sleep in the sendEvent() code. This way you would not have to recompile the native code (not very easy at this point). -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Fri Aug 11 13:27:36 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:27:36 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> Message-ID: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > Another option is to go into RXTXPort.java and put a sleep in the > sendEvent() code. This way you would not have to recompile the native > code (not very easy at this point). Are the instructions in the INSTALL file still valid? If so, it wasn't very hard to build it (I already had MinGW installed). Everything seemed to build just fine. Haven't tried to install/use it yet, but it wasn't a big deal (assuming those instructions were correct. Thanks, Pete From pete.flugstad at gmail.com Fri Aug 11 13:42:15 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Fri, 11 Aug 2006 14:42:15 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, but there doesn't appear to be a way to select that via RXTX (which appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control is selected). Is there a way I'm not seeing? Thanks, Pete From eddythejekyll at gmail.com Fri Aug 11 15:20:44 2006 From: eddythejekyll at gmail.com (Ed) Date: Fri, 11 Aug 2006 15:20:44 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion Message-ID: I'm trying to read and write a parallel port on a standard (Dell) pc running RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. I'm having problems getting rxtx to return a port enumeration from getPortIdentifiers. I'm using a file PortChooser.java as a test file to get things going. This is from the Java CookBook 2nd edition (Chapter 12). The call // get list of ports available on this particular computer, // by calling static method in CommPortIdentifier. Enumeration pList = CommPortIdentifier.getPortIdentifiers(); returns a null pList; I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and compile without --disable-lockfiles I get: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL ... When I compile with --disable-lockfiles the call to getPortIdentifiers simply returns a null Enumeration. I've read the documention and threads about this issue and I feel like I've tried everything, so at the moment I'm stumped. I can supply any further info that may help. Thanks in advance. Ed -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060811/80c4eeec/attachment-0006.html From tjarvi at qbang.org Fri Aug 11 18:29:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:29:48 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > On 8/11/06, Trent Jarvi wrote: >> Another option is to go into RXTXPort.java and put a sleep in the >> sendEvent() code. This way you would not have to recompile the native >> code (not very easy at this point). > > Are the instructions in the INSTALL file still valid? If so, it > wasn't very hard to build it > (I already had MinGW installed). Everything seemed to build just > fine. Haven't tried to install/use it yet, but it wasn't a big deal > (assuming those instructions were correct. > Hi Pete The instructions are correct. You will want to make sure that the exports worked. If the library does not work properly, then the exports failed. The exports are currently generated with nm, sed and grep in the Makefile which is often commented out. If the def file is old, it will cause problems. You should be good to go then. Look at the serial_select and eventLoop code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:33:32 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:33:32 -0600 (MDT) Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: On Fri, 11 Aug 2006, Pete Flugstad wrote: > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > but there doesn't appear to be a way to select that via RXTX (which > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > is selected). > > Is there a way I'm not seeing? > Hi Pete I'm guessing I didn't know the difference. At the time, I really didn't have windows API documentation. I just had some pages I found with altivista/google. Later microsoft made their documentation available on msdn or I learned about it. For rxtx, the calls need to be platform neutral. So if you see how to do each in termios, then we can get it going. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:45:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:45:24 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Fri, 11 Aug 2006, Ed wrote: > I'm trying to read and write a parallel port on a standard (Dell) pc running > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the gates. > > I'm having problems getting rxtx to return a port enumeration from > getPortIdentifiers. I'm using a file > PortChooser.java as a test file to get things going. This is from the Java > CookBook 2nd edition (Chapter 12). The call > > // get list of ports available on this particular computer, > // by calling static method in CommPortIdentifier. > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > returns a null pList; > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure and > compile without --disable-lockfiles I get: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > check_group_uucp(): error testing lock file creation Error > details:Permission deniedcheck_lock_status: No permission to create lock > file. > please see: How can I use Lock Files with rxtx? in INSTALL > ... > > When I compile with --disable-lockfiles the call to getPortIdentifiers > simply returns a null Enumeration. > > I've read the documention and threads about this issue and I feel like I've > tried everything, so at the moment I'm stumped. > > I can supply any further info that may help. > > Thanks in advance. > > Ed > Hi Ed You may want to check the permissions of /dev/lp*. Also make sure lp or your kernel support for lp is loaded. It should show up in dmesg and lsmod. For my laptop with no printer port enabled in BIOS is see: lp: driver loaded but no devices found in desg |grep lp [] $ ls -l /dev/lp* crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 here root and group lp can read and write. Normal users cannot. Try a simple read as a user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: Permission denied Fix as root [] chmod 666 /dev/lp* [] $ ls -l /dev/lp* crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 Now as user: [jarvi at lappy src]$ cat /dev/lp0 cat: /dev/lp0: No such device or address So this is saying there is no lp0 on my laptop. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Aug 11 18:58:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 11 Aug 2006 18:58:31 -0600 (MDT) Subject: [Rxtx] Difficulty with --disable-lockfiles and RedHat In-Reply-To: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> References: <002c01c6bc2c$00ea0f00$6401a8c0@jimsrv> Message-ID: On Wed, 9 Aug 2006, Jim Owen wrote: > Hi All, > > I've run into some difficulties with rxtx that have me baffled and need > some help. > > I have an application that has used earlier versions of rxtx > successfully and on a variety of platforms. We recently needed to deploy > this application into an environment where we could not utilize lock files. > > I pulled down the 2.0.7 pre1 source distribution and executed configure > with --disable-lockfiles. I then executed make and make install. > > When I execute the program, as root, I get the following error: > > ************************************************************************ > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGSEGV (0xb) at pc=0x00001004, pid=20151, tid=3086030528 > # > # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) > # Problematic frame: > # C 0x00001004 > # > # An error report file with more information is saved as hs_err_pid20151.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > **************************************************************************** > > If I execute as a normal user, I get no errors, but no ports listed: > (Using an earlier version, I get a serial and parallel port listed.) > > **************************************************************************** > [jim at linuxDev ingenicoApp]$ java VerifyCommBuild > Verifying Comm Build Environment > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre1 > Java lib Version = RXTX-2.0-7pre1 > Some ports appear to have been found, let's try to enumerate them. > Complete. > **************************************************************************** > > When I built rxtx, there was a warning given of the following: > > **************************************************************************** > conftest.c: In function 'main': > conftest.c:6: warning: incompatible implicit declaration of built-in > function 'printf' > conftest.c:7: warning: incompatible implicit declaration of built-in > function 'exit' > > WARNING: Kernel include files do not match the current kernel > **************************************************************************** > > > uname -a from my development system: Linux linuxDev 2.6.11-1.1369_FC4 #1 > Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux > > JAVA_HOME=/usr/java/j2sdk1.4.2_11 > > javax.comm.properties: Driver=gnu.io.RXTXCommDriver > > Here's the code for VerifyCommBuild.java that I'm using to test: > > > **************************************************************************** > import javax.comm.*; > import java.util.Enumeration; > /** > * A quick app to check that the javax.comm (Serial) Communications > extension has been properly > * installed and configured on this machine. > * Based on a sample app on IBM developerworks; modified by bsuter 5/2003. > */ > public class VerifyCommBuild > { > public static void main(String args[]) > { > Enumeration ports; > System.out.println("Verifying Comm Build Environment"); > try > { > ports = CommPortIdentifier.getPortIdentifiers(); > if (ports == null) > { > System.out.println("No comm ports found!"); > return; > } > System.out.println("Some ports appear to have been found, let's > try to enumerate them."); > while (ports.hasMoreElements()) > { > System.out.println("Here is a port [" + > ((CommPortIdentifier)ports.nextElement()).getName() > + "]"); > } > } catch (Exception e) > { > System.out.println("Failed to enumerate ports [" + > e.getMessage() + "]"); > e.printStackTrace(); > } > System.out.println("Complete."); > } > } > Hi Jim This is a new one to me. Have you tried it on another system. Maybe something isnt sane in your toolchain. -- Trent Jarvi tarvi at qbang.org From eddythejekyll at gmail.com Sat Aug 12 11:45:39 2006 From: eddythejekyll at gmail.com (Ed) Date: Sat, 12 Aug 2006 11:45:39 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Trent, Right after I sent the results indicated below I re-ran the app and it apparently found the parallel port. The difference was that I set the permissions to : /dev: wildcard lp* crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 I'm still not sure how to interpret the dmesg and lsmod before. However I'm thinking that since the user now has permission to access the lp* port, a request to access it loaded the lp and parport modules automatically and allowed me access. Here's the output of lsmod now: ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp lp 5540 0 (autoclean) parport 21608 1 (autoclean) [parport_pc lp] and dmesg: ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp On node 0 totalpages: 161776 lp0: using parport0 (polling). So I think I'm good, and ready to move on the next steps. Thanks Trent! Ed On 8/12/06, Ed wrote: > > Thanks for the reply Trent. > > I'm on a different system today but am trying your suggestons. This is a > debian 3.1r2 system and I'm running jdk 1.5.0_04. > > Take a look below, but I think I have no parallel port support on this > kernel, however I never get the "No such device or address" return from the > cat call as you did so I'm not sure how to interpret the results. > > When I run the test program (PortChooser.java), the getPortIdentifiers > call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is > more than I found on the RedHat system. Incidently --disable-lockfiles has > no effect. > > It looks as though there is no parallel support in this kernel: > falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > On node 0 totalpages: 161776 > falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > > I'm a little confused by the results when I cat to the lp0 device. It > seems from the dmesg output that I don't have parallel printer support, but > when I cat to the lp0 device, I get permission denied if I'm non-root user > and input/output error if I'm root. Apparently this means I have the device, > but no support in the kernel? > > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > ed at falcon:~/src/workspace/EASServer/src$ su > Password: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > > Here's my lp* device permissions. > /dev: > wildcard lp* > crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > If I change it to > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I get: > falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > cat: /dev/lp0: Input/output error > falcon:/home/ed/src/workspace/EASServer/src# exit > ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > cat: /dev/lp0: Input/output error > ed at falcon:~/src/workspace/EASServer/src$ > > What do you think? Should I recompile the kernel or is it something else? > > By the way, I added the user ed to the lp and uucp groups on this system. > > Thanks again, > > Ed > > On 8/11/06, Trent Jarvi wrote: > > > > On Fri, 11 Aug 2006, Ed wrote: > > > > > I'm trying to read and write a parallel port on a standard (Dell) pc > > running > > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > > gates. > > > > > > I'm having problems getting rxtx to return a port enumeration from > > > getPortIdentifiers. I'm using a file > > > PortChooser.java as a test file to get things going. This is from the > > Java > > > CookBook 2nd edition (Chapter 12). The call > > > > > > // get list of ports available on this particular computer, > > > // by calling static method in CommPortIdentifier. > > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > > > > > > returns a null pList; > > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure > > and > > > compile without --disable-lockfiles I get: > > > > > > Stable Library > > > ========================================= > > > Native lib Version = RXTX-2.1-7 > > > Java lib Version = RXTX-2.1-7 > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > check_group_uucp(): error testing lock file creation Error > > > details:Permission deniedcheck_lock_status: No permission to create > > lock > > > file. > > > please see: How can I use Lock Files with rxtx? in INSTALL > > > ... > > > > > > When I compile with --disable-lockfiles the call to getPortIdentifiers > > > > > simply returns a null Enumeration. > > > > > > I've read the documention and threads about this issue and I feel like > > I've > > > tried everything, so at the moment I'm stumped. > > > > > > I can supply any further info that may help. > > > > > > Thanks in advance. > > > > > > Ed > > > > > > > Hi Ed > > > > You may want to check the permissions of /dev/lp*. Also make sure lp or > > your kernel support for lp is loaded. It should show up in dmesg and > > lsmod. > > > > For my laptop with no printer port enabled in BIOS is see: > > > > lp: driver loaded but no devices found > > > > in desg |grep lp > > > > [] $ ls -l /dev/lp* > > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > here root and group lp can read and write. Normal users cannot. > > > > Try a simple read as a user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: Permission denied > > > > Fix as root > > > > [] chmod 666 /dev/lp* > > [] $ ls -l /dev/lp* > > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > > > > Now as user: > > > > [jarvi at lappy src]$ cat /dev/lp0 > > cat: /dev/lp0: No such device or address > > > > So this is saying there is no lp0 on my laptop. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > > > -- > > Ed > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060812/c2afe1f8/attachment-0006.html From tjarvi at qbang.org Sat Aug 12 14:01:52 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 12 Aug 2006 14:01:52 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Remember that the lp code expects a printer - or something like it. There is a line that specifies the printer is online. If you are doing hobby work, you will need to raise that line or loop it back to something that is raised. If you just try reading a port with no device connected and online, there will be an error while trying to read. This should be addressed in the mail-list archives. On Sat, 12 Aug 2006, Ed wrote: > Trent, > Right after I sent the results indicated below I re-ran the app and it > apparently found the parallel port. The difference was that I set the > permissions to : > /dev: > wildcard lp* > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > I'm still not sure how to interpret the dmesg and lsmod before. However I'm > thinking that since the user now has permission to access the lp* port, a > request to access it loaded the lp and parport modules automatically and > allowed me access. Here's the output of lsmod now: > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > lp 5540 0 (autoclean) > parport 21608 1 (autoclean) [parport_pc lp] > > and dmesg: > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > On node 0 totalpages: 161776 > lp0: using parport0 (polling). > > So I think I'm good, and ready to move on the next steps. > > Thanks Trent! > > Ed > > > On 8/12/06, Ed wrote: >> >> Thanks for the reply Trent. >> >> I'm on a different system today but am trying your suggestons. This is a >> debian 3.1r2 system and I'm running jdk 1.5.0_04. >> >> Take a look below, but I think I have no parallel port support on this >> kernel, however I never get the "No such device or address" return from the >> cat call as you did so I'm not sure how to interpret the results. >> >> When I run the test program (PortChooser.java), the getPortIdentifiers >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this is >> more than I found on the RedHat system. Incidently --disable-lockfiles has >> no effect. >> >> It looks as though there is no parallel support in this kernel: >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp >> On node 0 totalpages: 161776 >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp >> >> I'm a little confused by the results when I cat to the lp0 device. It >> seems from the dmesg output that I don't have parallel printer support, but >> when I cat to the lp0 device, I get permission denied if I'm non-root user >> and input/output error if I'm root. Apparently this means I have the >> device, >> but no support in the kernel? >> >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> >> cat: /dev/lp0: Permission denied >> ed at falcon:~/src/workspace/EASServer/src$ su >> Password: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> >> Here's my lp* device permissions. >> /dev: >> wildcard lp* >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> If I change it to >> /dev: >> wildcard lp* >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 >> >> I get: >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> falcon:/home/ed/src/workspace/EASServer/src# exit >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 >> cat: /dev/lp0: Input/output error >> ed at falcon:~/src/workspace/EASServer/src$ >> >> What do you think? Should I recompile the kernel or is it something else? >> >> By the way, I added the user ed to the lp and uucp groups on this system. >> >> Thanks again, >> >> Ed >> >> On 8/11/06, Trent Jarvi wrote: >> > >> > On Fri, 11 Aug 2006, Ed wrote: >> > >> > > I'm trying to read and write a parallel port on a standard (Dell) pc >> > running >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the >> > gates. >> > > >> > > I'm having problems getting rxtx to return a port enumeration from >> > > getPortIdentifiers. I'm using a file >> > > PortChooser.java as a test file to get things going. This is from the >> > Java >> > > CookBook 2nd edition (Chapter 12). The call >> > > >> > > // get list of ports available on this particular computer, >> > > // by calling static method in CommPortIdentifier. >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); >> > > >> > > returns a null pList; >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I configure >> > and >> > > compile without --disable-lockfiles I get: >> > > >> > > Stable Library >> > > ========================================= >> > > Native lib Version = RXTX-2.1-7 >> > > Java lib Version = RXTX-2.1-7 >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > check_group_uucp(): error testing lock file creation Error >> > > details:Permission deniedcheck_lock_status: No permission to create >> > lock >> > > file. >> > > please see: How can I use Lock Files with rxtx? in INSTALL >> > > ... >> > > >> > > When I compile with --disable-lockfiles the call to getPortIdentifiers >> > >> > > simply returns a null Enumeration. >> > > >> > > I've read the documention and threads about this issue and I feel like >> > I've >> > > tried everything, so at the moment I'm stumped. >> > > >> > > I can supply any further info that may help. >> > > >> > > Thanks in advance. >> > > >> > > Ed >> > > >> > >> > Hi Ed >> > >> > You may want to check the permissions of /dev/lp*. Also make sure lp or >> > your kernel support for lp is loaded. It should show up in dmesg and >> > lsmod. >> > >> > For my laptop with no printer port enabled in BIOS is see: >> > >> > lp: driver loaded but no devices found >> > >> > in desg |grep lp >> > >> > [] $ ls -l /dev/lp* >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > here root and group lp can read and write. Normal users cannot. >> > >> > Try a simple read as a user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: Permission denied >> > >> > Fix as root >> > >> > [] chmod 666 /dev/lp* >> > [] $ ls -l /dev/lp* >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 >> > >> > Now as user: >> > >> > [jarvi at lappy src]$ cat /dev/lp0 >> > cat: /dev/lp0: No such device or address >> > >> > So this is saying there is no lp0 on my laptop. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > >> >> >> >> -- >> >> Ed >> > > > > From pete.flugstad at gmail.com Mon Aug 14 07:51:41 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 08:51:41 -0500 Subject: [Rxtx] DATA_AVAILABLE callback question In-Reply-To: References: <84d4a6d50608110712s445ace18x2fba64918dbf0de8@mail.gmail.com> <84d4a6d50608111227o37679b78v7023d8c3ecc83196@mail.gmail.com> <84d4a6d50608111242m550a2d87w5089daa48feed948@mail.gmail.com> Message-ID: <84d4a6d50608140651h3cb2266ap90c47780abace00@mail.gmail.com> On 8/11/06, Trent Jarvi wrote: > On Fri, 11 Aug 2006, Pete Flugstad wrote: > > Also, the C++ program I'm porting this from uses RTS_CONTROL_TOGGLE, > > but there doesn't appear to be a way to select that via RXTX (which > > appears to use uses RTS_CONTROL_HANDSHAKE when hardware flow control > > is selected). > > I'm guessing I didn't know the difference. At the time, I really didn't > have windows API documentation. I just had some pages I found with > altivista/google. Later microsoft made their documentation available on > msdn or I learned about it. > > For rxtx, the calls need to be platform neutral. So if you see how to do > each in termios, then we can get it going. so, RTSCTS_IN/OUT at the COMM API is mapped to HARDWARE_FLOW_CONTROL in the POSIX layer. Which termios.c maps to RTS_CONTROL_HANDSHAKE and fOutxCtsFlow = true. Since termios.c is Windows only anway... Would it work to change the mapping in termios.c to map hardware flow control to RTS_CONTROL_TOGGLE? I just wondering (I'm going to go look, but there's a lot of code in there) if the code does anything special playing with flow control signals? Thanks, Pete From pete.flugstad at gmail.com Mon Aug 14 09:42:48 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 10:42:48 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> Message-ID: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> On 8/3/06, Trent Jarvi wrote: > On Thu, 3 Aug 2006, Pete Flugstad wrote: > > Okay, I can understand that, but from the PORTMON output, it looks > > like it's opening each port TWICE: > > I think this problem is in RXTXCommDriver.java. I've just not tracked it > down but it should be in the java code, not the native code so easy > enough to track down. Okay, I'm trying to track this down... Looks like the CommPortIdentifier static initializer loads RXTXCommDriver, and then calls RXTXDriver.initialize. But then CommPortIdentifier.getPortIdentifiers does the exact same thing. So that's where the two scans are coming from. I would guess that one or the other can be removed? Probably the one in the CommPortIdentifier.getPortIdentifiers? Doing so removes the 2nd scan. Pete PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) val = System.getProperty("gnu.io.SerialPorts"); Shouldn't the comparison be != null? getProperty returns null if the variable is NOT found, and you only want to assign to val if it IS found, right? Same thing for the parallel port case. End result is the same I guess, since you check for null later, but probably should be fixed. From eddythejekyll at gmail.com Mon Aug 14 11:55:17 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 11:55:17 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: When I try to get the mode with int mode = pPort.getMode(); it returns 0 which isn't any of the valid modes. I tried setting it explicitely with pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced the requested mode in nativeSetSerialPortParams at gnu.io.LPRPort.setLPRMode(Native Method) at gnu.io.LPRPort.setMode(LPRPort.java:87) Except for LPT_MODE_ANY, but the getMode call still failed out with an invalid state. I'm wondering if it's because I don't have the line pulled high like you said. This isn't a printer connected. It's a relay board with pins 2-9 tied to data, and 18-25 to gnd. The rest are open. I looked at a DB25 pinout diagram and I'm not sure which pin I need to tie high, and I looked through the archives, but didn't find a reference to something definitive. Can someone help me with which pin is the "online" pin as Trent mentioned? DB25 spec has ( I hope this formats correctly in this email) BUSY (11), SEL (13) or INIT (16) are candidates, but I'm guessing. Any clues? *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Thanks, Ed On 8/12/06, Trent Jarvi wrote: > > > Remember that the lp code expects a printer - or something like it. There > is a line that specifies the printer is online. If you are doing hobby > work, you will need to raise that line or loop it back to something that > is raised. > > If you just try reading a port with no device connected and online, there > will be an error while trying to read. This should be addressed in the > mail-list archives. > > On Sat, 12 Aug 2006, Ed wrote: > > > Trent, > > Right after I sent the results indicated below I re-ran the app and it > > apparently found the parallel port. The difference was that I set the > > permissions to : > > /dev: > > wildcard lp* > > crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > > crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > > crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > > > > I'm still not sure how to interpret the dmesg and lsmod before. However > I'm > > thinking that since the user now has permission to access the lp* port, > a > > request to access it loaded the lp and parport modules automatically and > > allowed me access. Here's the output of lsmod now: > > ed at falcon:~/src/workspace/EASServer/src$ lsmod | grep lp > > lp 5540 0 (autoclean) > > parport 21608 1 (autoclean) [parport_pc lp] > > > > and dmesg: > > ed at falcon:~/src/workspace/EASServer/src$ dmesg | grep lp > > On node 0 totalpages: 161776 > > lp0: using parport0 (polling). > > > > So I think I'm good, and ready to move on the next steps. > > > > Thanks Trent! > > > > Ed > > > > > > On 8/12/06, Ed wrote: > >> > >> Thanks for the reply Trent. > >> > >> I'm on a different system today but am trying your suggestons. This is > a > >> debian 3.1r2 system and I'm running jdk 1.5.0_04. > >> > >> Take a look below, but I think I have no parallel port support on this > >> kernel, however I never get the "No such device or address" return from > the > >> cat call as you did so I'm not sure how to interpret the results. > >> > >> When I run the test program (PortChooser.java), the getPortIdentifiers > >> call finds only a PORT_SERIAL, and not the PORT_PARALLEL however this > is > >> more than I found on the RedHat system. Incidently --disable-lockfiles > has > >> no effect. > >> > >> It looks as though there is no parallel support in this kernel: > >> falcon:/home/ed/src/workspace/EASServer/src# dmesg | grep lp > >> On node 0 totalpages: 161776 > >> falcon:/home/ed/src/workspace/EASServer/src# lsmod | grep lp > >> > >> I'm a little confused by the results when I cat to the lp0 device. It > >> seems from the dmesg output that I don't have parallel printer support, > but > >> when I cat to the lp0 device, I get permission denied if I'm non-root > user > >> and input/output error if I'm root. Apparently this means I have the > >> device, > >> but no support in the kernel? > >> > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> > >> cat: /dev/lp0: Permission denied > >> ed at falcon:~/src/workspace/EASServer/src$ su > >> Password: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> > >> Here's my lp* device permissions. > >> /dev: > >> wildcard lp* > >> crw-rw---- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw---- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw---- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> If I change it to > >> /dev: > >> wildcard lp* > >> crw-rw-rw- 1 root lp 6, 0 2005-02-25 23:43 lp0 > >> crw-rw-rw- 1 root lp 6, 1 2005-02-25 23:43 lp1 > >> crw-rw-rw- 1 root lp 6, 2 2005-02-25 23:43 lp2 > >> > >> I get: > >> falcon:/home/ed/src/workspace/EASServer/src# cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> falcon:/home/ed/src/workspace/EASServer/src# exit > >> ed at falcon:~/src/workspace/EASServer/src$ cat /dev/lp0 > >> cat: /dev/lp0: Input/output error > >> ed at falcon:~/src/workspace/EASServer/src$ > >> > >> What do you think? Should I recompile the kernel or is it something > else? > >> > >> By the way, I added the user ed to the lp and uucp groups on this > system. > >> > >> Thanks again, > >> > >> Ed > >> > >> On 8/11/06, Trent Jarvi wrote: > >> > > >> > On Fri, 11 Aug 2006, Ed wrote: > >> > > >> > > I'm trying to read and write a parallel port on a standard (Dell) > pc > >> > running > >> > > RHES 4.0 and Jdk1.5.0_07, but I'm having trouble getting out of the > >> > gates. > >> > > > >> > > I'm having problems getting rxtx to return a port enumeration from > >> > > getPortIdentifiers. I'm using a file > >> > > PortChooser.java as a test file to get things going. This is from > the > >> > Java > >> > > CookBook 2nd edition (Chapter 12). The call > >> > > > >> > > // get list of ports available on this particular computer, > >> > > // by calling static method in CommPortIdentifier. > >> > > Enumeration pList = CommPortIdentifier.getPortIdentifiers(); > >> > > > >> > > returns a null pList; > >> > > I have compiled rxtx-2.1-7r2 with --disable-lockfiles. If I > configure > >> > and > >> > > compile without --disable-lockfiles I get: > >> > > > >> > > Stable Library > >> > > ========================================= > >> > > Native lib Version = RXTX-2.1-7 > >> > > Java lib Version = RXTX-2.1-7 > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > check_group_uucp(): error testing lock file creation Error > >> > > details:Permission deniedcheck_lock_status: No permission to create > >> > lock > >> > > file. > >> > > please see: How can I use Lock Files with rxtx? in INSTALL > >> > > ... > >> > > > >> > > When I compile with --disable-lockfiles the call to > getPortIdentifiers > >> > > >> > > simply returns a null Enumeration. > >> > > > >> > > I've read the documention and threads about this issue and I feel > like > >> > I've > >> > > tried everything, so at the moment I'm stumped. > >> > > > >> > > I can supply any further info that may help. > >> > > > >> > > Thanks in advance. > >> > > > >> > > Ed > >> > > > >> > > >> > Hi Ed > >> > > >> > You may want to check the permissions of /dev/lp*. Also make sure lp > or > >> > your kernel support for lp is loaded. It should show up in dmesg and > >> > lsmod. > >> > > >> > For my laptop with no printer port enabled in BIOS is see: > >> > > >> > lp: driver loaded but no devices found > >> > > >> > in desg |grep lp > >> > > >> > [] $ ls -l /dev/lp* > >> > crw-rw---- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw---- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw---- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw---- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > here root and group lp can read and write. Normal users cannot. > >> > > >> > Try a simple read as a user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: Permission denied > >> > > >> > Fix as root > >> > > >> > [] chmod 666 /dev/lp* > >> > [] $ ls -l /dev/lp* > >> > crw-rw-rw- 1 root lp 6, 0 Aug 11 00:10 /dev/lp0 > >> > crw-rw-rw- 1 root lp 6, 1 Aug 11 00:10 /dev/lp1 > >> > crw-rw-rw- 1 root lp 6, 2 Aug 11 00:10 /dev/lp2 > >> > crw-rw-rw- 1 root lp 6, 3 Aug 11 00:10 /dev/lp3 > >> > > >> > Now as user: > >> > > >> > [jarvi at lappy src]$ cat /dev/lp0 > >> > cat: /dev/lp0: No such device or address > >> > > >> > So this is saying there is no lp0 on my laptop. > >> > > >> > -- > >> > Trent Jarvi > >> > tjarvi at qbang.org > >> > > >> > >> > >> > >> -- > >> > >> Ed > >> > > > > > > > > > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/59164078/attachment-0006.html From eddythejekyll at gmail.com Mon Aug 14 14:19:58 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 14:19:58 -0600 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? Message-ID: I'm using the ParallelPort class to drive a relay board. According to Mr. Jarvi, since this board isn't a printer, there will be a read error unless I hold the "printer online" line high in order to make the API think I'm talking to a printer. The problem is, I can't figure out which line is the "printer online". My DB25 spec lists the following: *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground Anyone know which one I should tie high? I tried the busy line and it still errored out on the read. Thanks in advance, -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/66cf3c3e/attachment-0006.html From tjarvi at qbang.org Mon Aug 14 18:06:29 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:06:29 -0600 (MDT) Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: On Mon, 14 Aug 2006, Ed wrote: > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > which isn't any of the valid modes. I tried setting it explicitely with > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced > the requested mode in nativeSetSerialPortParams > at gnu.io.LPRPort.setLPRMode(Native Method) > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > invalid state. This is because rxtx only supports the basics. JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } One could program in more support. When I did that I just had a daisy wheel printer to test with and doing any more would have been blind. So that behavior is expected. I'll look to see if the Parallel Complete book mentions which pins you need to raise. If you look in the source code [ParallelImp.c] you can see this code isn't well tested. It has worked for hobby use in the past as I'd guess you are trying to do. But my experience with the code is as is mentioned in the top of the source: /* fear he who enter here. It appears that things have changed. An attempt has been made to put things the way the should be. It compiles and ParallelBlackBox runs. No further guarantees. Well... One.. it will print "Hello World!" on an epson DX 10 printer. you know.. the 10 character per second daisy wheel printer ;) - Trent Jarvi */ That comment is from 1997 or so. Since then some windows support was contributed but it is still very green code. We get about four requests for parallel support a year so its just not a well traveled area. It would be nice to have some documentation for the people trying to hook parallel ports to electronic projects. That appears to be the exclusive use of the Parallel support. The wiki pages are intended to let people share information like this to help each other in their projects as they figure out the details. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Aug 14 18:40:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 14 Aug 2006 18:40:40 -0600 (MDT) Subject: [Rxtx] slow startup In-Reply-To: <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: > PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): > > if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) > val = System.getProperty("gnu.io.SerialPorts"); > > Shouldn't the comparison be != null? getProperty returns null if the > variable is NOT found, and you only want to assign to val if it IS > found, right? Same thing for the > parallel port case. End result is the same I guess, since you check > for null later, > but probably should be fixed. I think this is just a fallback to the second property. gnu.io.SerialPorts isn't documented but perhaps it is used. It should behave properly as documented in INSTALL. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 14 18:56:55 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 14 Aug 2006 19:56:55 -0500 Subject: [Rxtx] slow startup In-Reply-To: References: <939A619A756047469C41EE9BA51890FB0429E54C@hqexchange3.dot.state.co.us> <84d4a6d50608031332w57007b3br2f3937f6f1723f9c@mail.gmail.com> <84d4a6d50608140842j7425b882i118185c66c68350a@mail.gmail.com> Message-ID: <44E11BD7.5030102@gmail.com> Trent Jarvi wrote: >> PS: I noticed on line 383 in RXTXCommDriver.java (registerSpecifiedPorts): >> >> if ((val = System.getProperty("gnu.io.rxtx.SerialPorts")) == null) >> val = System.getProperty("gnu.io.SerialPorts"); >> > > I think this is just a fallback to the second property. > gnu.io.SerialPorts isn't documented but perhaps it is used. It should > behave properly as documented in INSTALL. Doh - yup, I missed the fact that the property names were different... Pete From berkland at spamcop.net Mon Aug 14 19:58:21 2006 From: berkland at spamcop.net (Doug Berkland) Date: Mon, 14 Aug 2006 21:58:21 -0400 Subject: [Rxtx] Which line specifies printer online? SEL,BUSY? In-Reply-To: References: Message-ID: <269e40090608141858g698c2579v8d962deca3f4df53@mail.gmail.com> Based on memory and this page as confirmation, I would say pin 13 is the "Online" pin for SPP (standard parallel port). http://www.quatech.com/support/comm-over-parallel.php On 8/14/06, Ed wrote: > > I'm using the ParallelPort class to drive a relay board. According to Mr. > Jarvi, since this board isn't a printer, there will be a read error unless I > hold the "printer online" line high in order to make the API think I'm > talking to a printer. The problem is, I can't figure out which line is the > "printer online". My DB25 spec lists the following: > > *25 Pin D-Sub Connector PinOut* Pin # Pin Name Pin Description and > Function 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data > Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 > D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select > 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select > In 18 GND Strobe Ground 19 GND Data bit 1 and 2 Ground 20 GND Data bit > 3 and 4 Ground 21 GND Data bit 5 and 6 Ground 22 GND Data bit 7 and 8 > Ground 23 GND Busy and Fault Ground 24 GND Paper out, Select, and > Acknowledge Ground 25 GND AutoFeed, Select input and Initialize Ground > > Anyone know which one I should tie high? I tried the busy line and it > still errored out on the read. > > Thanks in advance, > > -- > Ed > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/842bb770/attachment-0006.html From eddythejekyll at gmail.com Mon Aug 14 20:25:42 2006 From: eddythejekyll at gmail.com (Ed) Date: Mon, 14 Aug 2006 20:25:42 -0600 Subject: [Rxtx] getPortIdentifiers(); returning null enumertion In-Reply-To: References: Message-ID: Ah, I see. I've seen the caveats about limited Parallel support, but I thought it was mainly about the javax.comm package. The gnu.io is derived from javax.comm package right? That is, is the parallel support in rxtx is a superset of what's in javax.comm? I'm using this not for hobby usage, but for some simple instrumenation and control. If the project mandates it, I'll gladly work on extending the support. In the meantime, I need to get some sanity checks working, and repair my relay board (I smoked the ULN2803 chip, apparently by tying the BUSY (pin 11) to vcc). I guess I'll try the SEL pin next (and a supply of 2803s) with a ~1K pullup. The caveat in the comment block isn't very encouraging (!), but I borrowed an old Epson Stylus Color 600 printer to see what I can do. If I can write out characters to it I'll be happy. Parallel printers aren't easy to find these days. I haven't yet looked at the native source, yet, but I've just imported it into eclipse and I'll surf around a bit. Ed On 8/14/06, Trent Jarvi wrote: > > On Mon, 14 Aug 2006, Ed wrote: > > > When I try to get the mode with int mode = pPort.getMode(); it returns 0 > > which isn't any of the valid modes. I tried setting it explicitely with > > pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with > > > > gnu.io.UnsupportedCommOperationException: setLPRMode was unable to > proced > > the requested mode in nativeSetSerialPortParams > > at gnu.io.LPRPort.setLPRMode(Native Method) > > at gnu.io.LPRPort.setMode(LPRPort.java:87) > > > > Except for LPT_MODE_ANY, but the getMode call still failed out with an > > invalid state. > > This is because rxtx only supports the basics. > > JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > jclass jclazz, jint mode) > { > switch(mode) > { > case LPT_MODE_ANY: > break; > case LPT_MODE_SPP: > case LPT_MODE_PS2: > case LPT_MODE_EPP: > case LPT_MODE_ECP: > case LPT_MODE_NIBBLE: > default: > throw_java_exception( env, > UNSUPPORTED_COMM_OPERATION, > "nativeSetSerialPortParams", > "setLPRMode was unable to proced the > requested \ > mode" > ); > } > return(JNI_TRUE); > } > > One could program in more support. When I did that I just had a daisy > wheel printer to test with and doing any more would have been blind. > > So that behavior is expected. I'll look to see if the Parallel Complete > book mentions which pins you need to raise. If you look in the source > code [ParallelImp.c] you can see this code isn't well tested. It has > worked for hobby use in the past as I'd guess you are trying to do. But > my experience with the code is as is mentioned in the top of the source: > > /* > fear he who enter here. It appears that things have changed. An > attempt > has been made to put things the way the should be. > > It compiles and ParallelBlackBox runs. No further guarantees. > > Well... One.. it will print "Hello World!" on an epson DX 10 > printer. > you know.. the 10 character per second daisy wheel printer ;) > > - Trent Jarvi > */ > > That comment is from 1997 or so. > > Since then some windows support was contributed but it is still very green > code. We get about four requests for parallel support a year so its just > not a well traveled area. > > It would be nice to have some documentation for the people trying to hook > parallel ports to electronic projects. That appears to be the exclusive > use of the Parallel support. The wiki pages are intended to let people > share information like this to help each other in their projects as they > figure out the details. > > -- > Trent Jarvi > tjarvi at qbang.org > -- Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060814/fbb5ddb4/attachment-0006.html From lyon at docjava.com Tue Aug 15 06:06:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 15 Aug 2006 08:06:27 -0400 Subject: [Rxtx] smoking is bad for your health In-Reply-To: References: Message-ID: Hi All, If you are connecting to the parallel port and smoking chips, it is time for extra stuff to buffer the parallel port. You may be want more current, in which case driver transistors are needed, or, if you are using the port as an output only device, you may like to add your own bus transceiver (e.g., 74245), set for output. Do be careful to design this properly; http://www.beyondlogic.org/spp/parallel.htm Some people like to use Octal D-type F.F's with OC outputs, like a 74374, http://upgrade.cntc.ac.kr/data/ttl/74374.html I like this one, as it has the D FF's and can latch the outputs for presentation to slower electronics (like relays). But careful! A relay that needs more current than the family of the device you have selected will look like a short to ground, and you will smoke your bug! And MOBO's do NOT come with the ability to drive any load you like. Check the power specs on your relay and be sure to protect the chip against back EMF with a diode. It is best to smoke test this on a bread board BEFORE hooking it to the computer. And be sure you smoke test the corner points in the ckt for a while, lest it fail in the field. - Doug >Ah, I see. I've seen the caveats about limited >Parallel support, but I thought it was mainly >about the javax.comm package. The >gnu.io is derived from javax.comm >package right? That is, is the parallel support >in rxtx is a superset of what's in javax.comm? > >I'm using this not for hobby usage, but for some >simple instrumenation and control. If the >project mandates it, I'll gladly work on >extending the support. In the meantime, I need >to get some sanity checks working, and repair my >relay board (I smoked the ULN2803 chip, >apparently by tying the BUSY (pin 11) to vcc). I >guess I'll try the SEL pin next (and a supply of >2803s) with a ~1K pullup. > >The caveat in the comment block isn't very >encouraging (!), ?but?I borrowed an old Epson >Stylus Color 600 printer to see what I can do. >?If I can write out characters to it I'll be >happy. Parallel printers aren't easy to find >these days. > > I haven't yet looked at the native source, yet, >but I've just imported it into eclipse and I'll >surf around a bit. > >Ed > >On 8/14/06, Trent Jarvi <tjarvi at qbang.org> wrote: > >On Mon, 14 Aug 2006, Ed wrote: > >> When I try to get the mode with int mode = pPort.getMode(); it returns 0 >> which isn't any of the valid modes. I tried setting it explicitely with >> pPort.setMode(ParallelPort.LPT_MODE_XXX );and all failed with >> >> gnu.io.UnsupportedCommOperationException: setLPRMode was unable to proced >> the requested mode in nativeSetSerialPortParams >> at gnu.io.LPRPort.setLPRMode(Native Method) >> at gnu.io.LPRPort.setMode(LPRPort.java:87) >> >> Except for LPT_MODE_ANY, but the getMode call still failed out with an >> invalid state. > >This is because rxtx only supports the basics. > >JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, > ???????jclass jclazz, jint mode) >{ > ???????switch(mode) > ???????{ > ???????????????case LPT_MODE_ANY: > ???????????????????????break; > ???????????????case LPT_MODE_SPP: > ???????????????case LPT_MODE_PS2: > ???????????????case LPT_MODE_EPP: > ???????????????case LPT_MODE_ECP: > ???????????????case LPT_MODE_NIBBLE: > ???????????????default: > ???????????????????????throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, > ???????????????????????????????"nativeSetSerialPortParams", > ???????????????????????????????"setLPRMode was >unable to proced the requested \ > ???????????????????????????????mode" > ???????????????????????); > ???????} > ???????return(JNI_TRUE); >} > >One could program in more support.??When I did that I just had a daisy >wheel printer to test with and doing any more would have been blind. > >So that behavior is expected.??I'll look to see if the Parallel Complete >book mentions which pins you need to raise.??If you look in the source >code [ParallelImp.c] you can see this code isn't well tested.??It has >worked for hobby use in the past as I'd guess you are trying to do.??But >my experience with the code is as is mentioned in the top of the source: > >/* > fear he who enter here.??It appears that things have changed.??An attempt > has been made to put things the way the should be. > > ???????It compiles and ParallelBlackBox runs.??No further guarantees. > > ???????Well... One.. it will print "Hello World!" on an epson DX 10 printer. > ???????you know.. the 10 character per second daisy wheel printer ;) > > ???????- Trent Jarvi >*/ > >That comment is from 1997 or so. > >Since then some windows support was contributed but it is still very green >code.??We get about four requests for parallel support a year so its just >not a well traveled area. > >It would be nice to have some documentation for the people trying to hook >parallel ports to electronic projects.??That appears to be the exclusive >use of the Parallel support.??The wiki pages are intended to let people >share information like this to help each other in their projects as they >figure out the details. > >-- >Trent Jarvi >tjarvi at qbang.org > > > > >-- >Ed > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 15 13:26:16 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 15 Aug 2006 14:26:16 -0500 Subject: [Rxtx] crash with too much memory Message-ID: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded from qbang.org. I'm exercising the RXTX COMM serial interface, both in a small standalone test and with the same code pulled into a large OSGI framework setup. If I use the stock .jar/.dll's, then everything works correctly in both situations. I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 (mingw-special)). If I use my locally built version, then my small test case works just fine, both when run inside Eclipse and when run standalone on the command line. However, when I try and use my locally built .jar/.dll's in the large framework environment, then I get a JVM crash with the attached log. Normally this would lead me to think that I was running out of memory or something in the large environment, and when I try and play with the JVM memory args, some interesting things show up. In our large environment, we have -Xms32M/-Xmx1024M - this appears to be the problem. If I set max to something like 64M, then things work. The cross over point from working to failing seems to be around 32M/110M (works) and 32M/111M (fails). But 128M/128M works while 128M/129M fails. So it seems to have to do with how much memory is actually available, or something like that. The thing that occurs to me is if my GCC is somehow generating something like "near" calls. But when the JVM has a lot of RAM available, it puts the DLL up somehwere in the address space and then the near calls fail - far calls are needed. So, I'm thinking this is probably a difference in the MinGW GCC I'm using and the one that was used to build the stock binaries from qbang, or maybe some command line args were changed? So, I'm hoping someone will have an idea of what's going on here... Thanks, Pete From tjarvi at qbang.org Tue Aug 15 18:54:04 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 15 Aug 2006 18:54:04 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: On Tue, 15 Aug 2006, Pete Flugstad wrote: > I'm using RXTX, 2.1-7, source and bin's (Window XP SP2) downloaded > from qbang.org. > > I'm exercising the RXTX COMM serial interface, both in a small > standalone test and with the same code pulled into a large OSGI > framework setup. > > If I use the stock .jar/.dll's, then everything works correctly in > both situations. > > I also have a set of .jar/.dll's built locally with MinGW (gcc 3.4.2 > (mingw-special)). > > If I use my locally built version, then my small test case works just > fine, both when run inside Eclipse and when run standalone on the > command line. However, when I try and use my locally built > .jar/.dll's in the large framework environment, then I get a JVM crash > with the attached log. > > Normally this would lead me to think that I was running out of memory > or something in the large environment, and when I try and play with > the JVM memory args, some interesting things show up. > > In our large environment, we have -Xms32M/-Xmx1024M - this appears to > be the problem. If I set max to something like 64M, then things work. > The cross over point from working to failing seems to be around > 32M/110M (works) and 32M/111M (fails). > But 128M/128M works while 128M/129M fails. So it seems to have to do > with how much memory is actually available, or something like that. > > The thing that occurs to me is if my GCC is somehow generating > something like "near" calls. But when the JVM has a lot of RAM > available, it puts the DLL up somehwere in the address space and then > the near calls fail - far calls are needed. > > So, I'm thinking this is probably a difference in the MinGW GCC I'm > using and the one that was used to build the stock binaries from > qbang, or maybe some command line args were changed? > > So, I'm hoping someone will have an idea of what's going on here... > Hi Pete The binaries are from the src. They should be reproducable. I did extensive testing of rxtx several years ago using mingw as the compiler. The version was 2.95. I have not changed versions since. There are way too many variables as it is. I have a linux->mingw cross compiler rpm I use for all windows use. If you want a copy of it you can have it. It isn't anything 'special' :) -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Thu Aug 17 11:49:24 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Thu, 17 Aug 2006 12:49:24 -0500 Subject: [Rxtx] crash with too much memory In-Reply-To: References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> Message-ID: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> On 8/15/06, Trent Jarvi wrote: > I did extensive testing of rxtx several years ago using mingw as the > compiler. The version was 2.95. I have not changed versions since. > There are way too many variables as it is. FYI, I believe I've solved this problem by changing how the dll's were built. The original mingw makefile was generating Serial.def, then performing various operations with dlltool and ld. I modified the makefile to create the dll using this page: as a guide. With that, there's no longer any need to deal with Serial.def and the makefile becomes _much_ simpler. This appears to have addressed my problems with crashing. FWIW, GCC 2.95 is _really_ old - you should consider investigating upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is supposed to generate a native binary (i.e. just like MinGW). Thanks, Pete From claretlc at yahoo.com Thu Aug 17 12:34:48 2006 From: claretlc at yahoo.com (Clare Cooley) Date: Thu, 17 Aug 2006 11:34:48 -0700 (PDT) Subject: [Rxtx] parallel port communication Message-ID: <20060817183448.76911.qmail@web53908.mail.yahoo.com> Hi, I'm trying to write a 1 to a bit 15 on a parallel port cable that isn't attached to a printer.(It's a control box for eye-tracking equipment.)I need to do this in Java. I looked at the javax.comm documentation, and it said, "Application programs should not directly create ParallelPortEvent objects." So is there a way to do this with your package? If not, do you have any suggestions of where to look? It really needs to be done in Java. Thanks, Clare Cooley __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From pat at xvalheru.org Thu Aug 17 13:13:52 2006 From: pat at xvalheru.org (pat) Date: Thu, 17 Aug 2006 21:13:52 +0200 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060817190751.M5586@xvalheru.org> Hi there, I've question(s) for you. I need to communicate with scale, I've used the Sun's direver. Now I've switched to Rxtx and the speed of the communication is perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, but the difference between the crash time is 5 second ... . My question is: Is there a stable driver ??? Or what I have to do to have stable enough serial port driver ??? OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. Thanks to all for the help. Pat From tjarvi at qbang.org Fri Aug 18 05:13:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 05:13:42 -0600 (MDT) Subject: [Rxtx] crash with too much memory In-Reply-To: <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> References: <84d4a6d50608151226t6678a967t7d98b15ff16f93d1@mail.gmail.com> <84d4a6d50608171049j4d194d0ay8e66f7bf39533fe3@mail.gmail.com> Message-ID: On Thu, 17 Aug 2006, Pete Flugstad wrote: > On 8/15/06, Trent Jarvi wrote: >> I did extensive testing of rxtx several years ago using mingw as the >> compiler. The version was 2.95. I have not changed versions since. >> There are way too many variables as it is. > > FWIW, GCC 2.95 is _really_ old - you should consider investigating > upgrading. Modern Cygwin GCC installs support -mno-cygwin, which is > supposed to generate a native binary (i.e. just like MinGW). > It is really old but also well known like C itself. I have considered upgrading. The ToyBox builds should be gcc 3* cross-compiled. I'm not going to be validating gcc 3* w32 binaries though. It's looking like we will need to focus support on MSFT's toolchain for 64 bit windows support until it is possible for gcc to support w64. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Fri Aug 18 05:32:10 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 07:32:10 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: Hi All, Does anyone know how to produce mac intel binaries on a Fedora Linux box? Thanks! - Doug From tjarvi at qbang.org Fri Aug 18 06:42:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 06:42:05 -0600 (MDT) Subject: [Rxtx] cross compilation for the mac In-Reply-To: References: Message-ID: On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > Hi All, > Does anyone know how to produce > mac intel binaries on a Fedora Linux > box? > > Thanks! > - Doug Hi Doug You need to build the cross toolchain which means copying the Darwin/Mac binaries over to fedora. It would be nontrivial but possible. Do the Darwin libraries work with Mac in general? I'm not aware of the licensing issues associated with grabbing Mac binaries. Same with OpenSolaris/Solaris. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Aug 18 08:15:26 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 10:15:26 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> In theory building against Darwin would be sufficient to getting things working on MacOS X. You need to remember that Darwin is the low-level OS, while MacOS X adds the everything else on top. IOKit, which is the I/O API, is available as part of Darwin. The only thing you will need extra are the Java libraries. One thing is that I would recommend that when producing binaries for the Mac, is to ensure they are Universal binaries (PPC+Intel). Andre > > From: Trent Jarvi > Date: 2006/08/18 Fri AM 08:42:05 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] cross compilation for the mac > > On Fri, 18 Aug 2006, Dr. Douglas Lyon wrote: > > > Hi All, > > Does anyone know how to produce > > mac intel binaries on a Fedora Linux > > box? > > > > Thanks! > > - Doug > > Hi Doug > > You need to build the cross toolchain which means copying the Darwin/Mac > binaries over to fedora. It would be nontrivial but possible. > > Do the Darwin libraries work with Mac in general? I'm not aware of the > licensing issues associated with grabbing Mac binaries. > > Same with OpenSolaris/Solaris. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Aug 18 13:43:16 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 18 Aug 2006 15:43:16 -0400 Subject: [Rxtx] cross compilation for the mac In-Reply-To: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20060818141526.XSKO18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: >In theory building against Darwin would be sufficient to getting >things working on MacOS X. You need to remember that Darwin is the >low-level OS, while MacOS X adds the everything else on top. IOKit, >which is the I/O API, is available as part of Darwin. The only thing >you will need extra are the Java libraries. > >One thing is that I would recommend that when producing binaries for >the Mac, is to ensure they are Universal binaries (PPC+Intel). > >Andre I find the xcode ide for generating a mix of universal binaries and java very difficult to make work. Is there a way to do this with make files? Thanks! - Doug From ajmas at sympatico.ca Fri Aug 18 13:54:55 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 18 Aug 2006 15:54:55 -0400 Subject: [Rxtx] cross compilation for the mac Message-ID: <20060818195455.PGAP29052.tomts13-srv.bellnexxia.net@smtp1.sympatico.ca> It should be doable. XCode hands off the compilation process to gcc et al, for the compilation of C/C++ code and to javac et al. for the Java side. While ant is the favoured tool for 'automated' Java compilation, make can easily be used. All is needed is someone to volounteer to do the work. Andre "Dr. Douglas Lyon" wrote > > >In theory building against Darwin would be sufficient to getting > >things working on MacOS X. You need to remember that Darwin is the > >low-level OS, while MacOS X adds the everything else on top. IOKit, > >which is the I/O API, is available as part of Darwin. The only thing > >you will need extra are the Java libraries. > > > >One thing is that I would recommend that when producing binaries for > >the Mac, is to ensure they are Universal binaries (PPC+Intel). > > > >Andre > > I find the xcode ide for generating a mix of universal binaries > and java very difficult to make work. Is there a way to do this > with make files? > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Fri Aug 18 16:34:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 18 Aug 2006 16:34:46 -0600 (MDT) Subject: [Rxtx] serial driver newbe question and problem In-Reply-To: <20060817190751.M5586@xvalheru.org> References: <20060817190751.M5586@xvalheru.org> Message-ID: On Thu, 17 Aug 2006, pat wrote: > Hi there, > > I've question(s) for you. I need to communicate with scale, I've used the > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > but the difference between the crash time is 5 second ... . > > My question is: Is there a stable driver ??? Or what I have to do to have > stable enough serial port driver ??? > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > Thanks to all for the help. > > Pat > Could you describe the hardware you have, the version of rxtx and provide the log of the crash? Did you download binaries? I've not been seeing a jvm crash with rxtx -- Trent Jarvi tjarvi at qbang.org From lunareclipse03 at web.de Sat Aug 19 12:11:48 2006 From: lunareclipse03 at web.de (lunareclipse03@web.de) Date: Sat, 19 Aug 2006 20:11:48 +0200 Subject: [Rxtx] Problem solved! Message-ID: <920065539@web.de> Hi everybody, I posted some months ago and asked about some help on my very special problem concerning my win32 port of a communications library. Now I just want to inform you that no further "mindstorming" is needed because I solved the problem by completely rewriting the win32 port of the library. Now everything works fine. Thank you all for your time and patience. --Sven Ahlemann __________________________________________________________________________ Erweitern Sie FreeMail zu einem noch leistungsst?rkeren E-Mail-Postfach! Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131 From ajmas at sympatico.ca Mon Aug 21 09:58:23 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 21 Aug 2006 11:58:23 -0400 Subject: [Rxtx] serial driver newbe question and problem Message-ID: <20060821155823.TLSM18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> Next time that happens, including a copy of the crash log, produced by Windows could probably help too. Andre Trent Jarvi wrote: > > On Thu, 17 Aug 2006, pat wrote: > > > Hi there, > > > > I've question(s) for you. I need to communicate with scale, I've used the > > Sun's direver. Now I've switched to Rxtx and the speed of the communication is > > perfect, but after cca 30 seconds the JVM crashed :-\ I've tested 3 drivers, > > but the difference between the crash time is 5 second ... . > > > > My question is: Is there a stable driver ??? Or what I have to do to have > > stable enough serial port driver ??? > > > > OS is WinXP, JDK 1.4.2_xx or 1.5.0_xx. > > > > Thanks to all for the help. > > > > Pat > > > > Could you describe the hardware you have, the version of rxtx and > provide the log of the crash? Did you download binaries? > > I've not been seeing a jvm crash with rxtx > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From adrian.l.parker at gmail.com Thu Aug 24 09:10:39 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Thu, 24 Aug 2006 11:10:39 -0400 Subject: [Rxtx] Portability issues Message-ID: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use RXTX 2.0? Does it provide system librairies that javax.comm does not? I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, or 2000, or server 2003). Can this be done with a single implementation of RXTX? I don't want to have different versions of Java code that have different package names. References: <7da71e910608240810h49b2cd38na8558a56e84d767f@mail.gmail.com> Message-ID: On Thu, 24 Aug 2006, Adrian Parker wrote: > Does RXTX 2.0 depend upon Sun's javax.comm package? If so, why would we use > RXTX 2.0? Does it provide system librairies that javax.comm does not? > > I need to run a javax.comm-using application on Linux (libc 2.3.x), Sco's > OpenServer Release 5.0.7, and a Windows machine (I don't know yet if its XP, > or 2000, or server 2003). Can this be done with a single implementation of > RXTX? I don't want to have different versions of Java code that have > different package names. > Hi Adrian. The native code can support all of the platforms you mention. I've never compiled for unixware or openunix but the patches are in the code. So you would need to compile for that target. >From there you would probably be best off going with rxtx 2.1 so you have all the classes in one package. You can opt to use rxtx 2.0 with Sun's commapi for Solaris v 2. The main differences are rxtx 2.1 comes with all the source/classes and is in package gnu.io while Sun's requires rxtx for some platforms but is in package javax.comm. The low level code is the same in either case as far as rxtx is concerned. -- Trent Jarvi tarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 04:12:52 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 06:12:52 -0400 Subject: [Rxtx] Serial.addEventListener bug? Message-ID: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on OpenServer 5.0.7). Its what Sun packages. I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an exception. It seems to throw the exception if no listener was previously declared (although I've not had chance to verify). Is this desireable behaviour? Sun's original API doesn't mention anything about an exception on this function, http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) Of course this is an old version of RXTX, so perhaps this has been changed. -- Adrian Parker Simulation Software Developer DLCSPM 4-4-3 (c) Building A31, CFB Kingston Tel: (613) 541-5010 x3020 CSN: 271-3020 Email: parker at lsec.dnd.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/22e2ea57/attachment-0006.html From tjarvi at qbang.org Fri Aug 25 05:15:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 25 Aug 2006 05:15:44 -0600 (MDT) Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: On Fri, 25 Aug 2006, Adrian Parker wrote: > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > OpenServer 5.0.7). Its what Sun packages. > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > exception. It seems to throw the exception if no listener was previously > declared (although I've not had chance to verify). > > Is this desireable behaviour? Sun's original API doesn't mention anything > about an exception on this function, > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > Of course this is an old version of RXTX, so perhaps this has been changed. > > > What exception was thrown? You can replace 1.4-8 with 2.0 for testing purposes. They are the same package. I doubt Sun shipped or packaged that. I think Caldera/SCOx/... did at one point. There may still be updates on their pages. I recall them sending patches here which are in current rxtx. -- Trent Jarvi tjarvi at qbang.org From adrian.l.parker at gmail.com Fri Aug 25 05:28:32 2006 From: adrian.l.parker at gmail.com (Adrian Parker) Date: Fri, 25 Aug 2006 07:28:32 -0400 Subject: [Rxtx] Serial.addEventListener bug? In-Reply-To: References: <7da71e910608250312s14bcb702sd68a0c9de41d7288@mail.gmail.com> Message-ID: <7da71e910608250428q32b86632g9a67b1b4efe69830@mail.gmail.com> On 8/25/06, Trent Jarvi wrote: > > On Fri, 25 Aug 2006, Adrian Parker wrote: > > > I'm using an old version of RXTX. Its 1.4-8 (packaged by Sun for use on > > OpenServer 5.0.7). Its what Sun packages. > > > > I have noticed that SerialPort.notifyOnDataAvailable(boolean) throws an > > exception. It seems to throw the exception if no listener was > previously > > declared (although I've not had chance to verify). > > > > Is this desireable behaviour? Sun's original API doesn't mention > anything > > about an exception on this function, > > > http://java.sun.com/products/javacomm/reference/api/javax/comm/SerialPort.html#notifyOnDataAvailable(boolean) > > > > Of course this is an old version of RXTX, so perhaps this has been > changed. > > > > > > > > What exception was thrown? Its weird. I catch an Exception. But when on that exception I call getClass().getName() I end up with a NullPointerException. You can replace 1.4-8 with 2.0 for testing > purposes. They are the same package. > > I doubt Sun shipped or packaged that. Doh! I meant to say SCO sorry. I was surfing Sun's site when I wrote that :) Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060825/e43aed3a/attachment-0006.html From sjudd at seas.upenn.edu Sat Aug 26 16:42:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Sat, 26 Aug 2006 18:42:09 -0400 Subject: [Rxtx] Mac commapi Message-ID: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? If so, where do I get it? Sun has various versions at http://www.sun.com/download/products.xml?id=43208d3d but they are for SolarisSparc, SolarisX86, Linux, and Generic. Do I use the Generic one? If so, read on; otherwise redirect me. While using the Generic version, my attempt to run the BlackBox sample program elicits a message saying it "can't find javax.comm.properties". I found a note in the rxtx.org HowTo (for Linux) saying to create this thing in /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties but where should it go on the Mac? After reading many versions of documentation around, and updates and revisions and re-authorings, I have worked my way into a state of confusion and high uncertainty. Please release me. sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060826/02d6b163/attachment-0006.html From tod at todbot.com Sat Aug 26 17:08:33 2006 From: tod at todbot.com (Tod E. Kurt) Date: Sat, 26 Aug 2006 16:08:33 -0700 Subject: [Rxtx] Mac commapi In-Reply-To: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> Message-ID: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> You don't need Sun's CommAPI. You just need RXTX. Once you download RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and the native library is ("librxtxSerial.jnilib" on Mac OS X) via the standard methods. For instance, if you've placed those two files in a directory called 'rxtxlib' and you want to run a Java class called HelloWorld in the current directory, do the following: % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar HelloWorld On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? > If so, where do I get it? Sun has various versions at > http://www.sun.com/download/products.xml?id=43208d3d > but they are for SolarisSparc, SolarisX86, Linux, and Generic. > Do I use the Generic one? > If so, read on; otherwise redirect me. > > While using the Generic version, my attempt to run the BlackBox > sample program > elicits a message saying it "can't find javax.comm.properties". > I found a note in the rxtx.org HowTo (for Linux) saying to create > this thing in > /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties > but where should it go on the Mac? > > After reading many versions of documentation around, and updates > and revisions > and re-authorings, I have worked my way into a state of confusion > and high > uncertainty. Please release me. > > sj > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From sjudd at seas.upenn.edu Sun Aug 27 22:55:09 2006 From: sjudd at seas.upenn.edu (Dr. Stephen Judd) Date: Mon, 28 Aug 2006 00:55:09 -0400 Subject: [Rxtx] Mac commapi In-Reply-To: <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> References: <4E7DFCC2-7EBE-4FBC-B726-BDA6BA5CC1C3@seas.upenn.edu> <183A92AA-2E22-48B2-85F1-ED4A237EF596@todbot.com> Message-ID: This was immensely helpful. Thank you, Tod. I wish it had been explicit somewhere in the documentation; it would have saved me 2 days of grief. One hugely valuable thing like this little set of instructions is that it implicitly lists all the hundreds of things you DON"T have to do. I know it seems obvious to those in the know, but every little bit of help on an arcane topic like this opens up the product to an exponentially wider group of dilettantes. I managed to get the SerialDemo program (from Sun) to work too. Hurrah! However, it required changing all the javax.comm references to gnu.io which I had heard of due to all my rambling readings. Is there not a demo program on rxtx.org already available that would not have needed this? BTW, the link on the Projects page for jPIC[Source] sends a *.hex file to a PIC 16F877 or similar chip... takes me to nowhere useful. I do not understand what the name "Toybox" is meant to imply. Thanks, sj On 2006 Aug 26, at 7:08 PM, Tod E. Kurt wrote: > You don't need Sun's CommAPI. You just need RXTX. Once you download > RXTX, you need to tell 'java' where the RXTX jar ("RXTXcomm.jar" and > the native library is ("librxtxSerial.jnilib" on Mac OS X) via the > standard methods. > > For instance, if you've placed those two files in a directory called > 'rxtxlib' and you want to run a Java class called HelloWorld in the > current directory, do the following: > > % java -Djava.library.path=rxtxlib -classpath .:rxtxlib/RXTXcomm.jar > HelloWorld > > > On Aug 26, 2006, at 3:42 PM, Dr. Stephen Judd wrote: > >> Do I need to install javax.comm to use rxtx 2.1 on Mac OSX? >> If so, where do I get it? Sun has various versions at >> http://www.sun.com/download/products.xml?id=43208d3d >> but they are for SolarisSparc, SolarisX86, Linux, and Generic. >> Do I use the Generic one? >> If so, read on; otherwise redirect me. >> >> While using the Generic version, my attempt to run the BlackBox >> sample program >> elicits a message saying it "can't find javax.comm.properties". >> I found a note in the rxtx.org HowTo (for Linux) saying to create >> this thing in >> /usr/java/j2sdk1.4.0/jre/lib/javax.comm.properties >> but where should it go on the Mac? >> >> After reading many versions of documentation around, and updates >> and revisions and re-authorings, I have worked my way into a state >> of confusion and high uncertainty. Please release me. >> >> sj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060827/b80d6389/attachment-0006.html From pete.flugstad at gmail.com Mon Aug 28 12:38:27 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 13:38:27 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE Message-ID: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Okay, my understanding is that originally, RTS meant "Request to Send" - the DTE (the PC) would assert this and the DCE (modem) would assert "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send data. This really only provided uni-directional flow control, from the PC to the modem. Now, as I understand it, the more modern usage of RTS is that it is used for the DTE to assert flow control back to the DCE - basically it means "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) raises this, then the DCE(modem) is free to send data to the DTE - this allows the DTE(PC) to exert flow control back towards the DCE(modem). This discussion is based on the Serial HOWTO from: and lots of other reading... Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which is defined as: > Enables RTS flow-control handshaking. The driver raises the RTS line, > enabling the DCE to send, when the input buffer has enough room to > receive data. The driver lowers the RTS line, preventing the DCE to > send, when the input buffer does not have enough room to receive > data. If this value is used, it is an error for the application to adjust > the line with EscapeCommFunction. which clearly reflects the newer usage style - it keeps the RTS line high as long as there is space to _receive_ data. And takes it low when the receive/input buffer is getting full to stop the modem from sending it data. Does this jive with other peoples understanding of RTS usage? Unfortunately, the hardware I'm trying to talk to wants to use the OLD style of RTS line usage. An existing Windows C++ program uses RTS_CONTROL_TOGGLE, which documentation states: > Specifies that the RTS line will be high if bytes are available for transmission. > After all buffered bytes have been sent, the RTS line will be low. If this value is > set, it would be an error for an application to adjust the line with > EscapeCommFunction. This value is ignored in Windows 95; it causes the > driver to act as if RTS_CONTROL_ENABLE were specified. This seems to be the OLD RTS behavior, right? So, what I seem to need is to be able to control the RTS line, either using TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS when getting ready to TX and clear it when the output buffer is empty). Does this make sense, or am I off in the weeds? Thanks, Pete From tjarvi at qbang.org Mon Aug 28 18:21:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 28 Aug 2006 18:21:10 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: On Mon, 28 Aug 2006, Pete Flugstad wrote: > Okay, my understanding is that originally, RTS meant "Request to Send" > - the DTE (the PC) would assert this and the DCE (modem) would assert > "CTS" (Clear to Send) when it was ready for the DTE(PC) to actually send > data. This really only provided uni-directional flow control, from the PC to > the modem. > > Now, as I understand it, the more modern usage of RTS is that it is used > for the DTE to assert flow control back to the DCE - basically it means > "Request To Send (to me)". It's essentially the opposite - if the DTE(PC) > raises this, then the DCE(modem) is free to send data to the DTE - this > allows the DTE(PC) to exert flow control back towards the DCE(modem). > > This discussion is based on the Serial HOWTO from: > > > > and lots of other reading... > > Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > is defined as: > >> Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > > which clearly reflects the newer usage style - it keeps the RTS line high > as long as there is space to _receive_ data. And takes it low when the > receive/input buffer is getting full to stop the modem from sending it data. > > Does this jive with other peoples understanding of RTS usage? > > Unfortunately, the hardware I'm trying to talk to wants to use the OLD > style of RTS line usage. An existing Windows C++ program uses > RTS_CONTROL_TOGGLE, which documentation states: > >> Specifies that the RTS line will be high if bytes are available for transmission. >> After all buffered bytes have been sent, the RTS line will be low. If this value is >> set, it would be an error for an application to adjust the line with >> EscapeCommFunction. This value is ignored in Windows 95; it causes the >> driver to act as if RTS_CONTROL_ENABLE were specified. > > This seems to be the OLD RTS behavior, right? > > So, what I seem to need is to be able to control the RTS line, either using > TOGGLE or manually (i.e. use RTS_CONTROL_ENABLE and use setRTS > when getting ready to TX and clear it when the output buffer is empty). > > Does this make sense, or am I off in the weeds? > Hi Pete OK. That sounds right. I do not know how you would communicate the difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through CommAPI as it stands. I take it you did not find anything either? Perhaps the best thing to do for your code is to toggle the RTS yourself. This could be a feature in the future JSR API perhaps. -- Trent Jarvi tjarvi at qbang.org From pete.flugstad at gmail.com Mon Aug 28 20:54:34 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Mon, 28 Aug 2006 21:54:34 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <44F3AC6A.10908@gmail.com> Trent Jarvi wrote: > OK. That sounds right. I do not know how you would communicate the > difference between RTS_CONTROL_ENABLE and RTS_CONTROL_TOGGLE through > CommAPI as it stands. I take it you did not find anything either? > > Perhaps the best thing to do for your code is to toggle the > RTS yourself. This could be a feature in the future JSR API perhaps. Yeah, this is what I ended up doing. I had to modify the dll in order to be able to set hardware flow control (which I do want), but leave the RTS flow control at RS_CONTROL_ENABLE. After that I just toggle setRTS(true) when I'm ready to send and setRTS(false) when I get a OUTPUT_BUFFER_EMPTY notification. Haven't tested with real hardware yet, but it seems to work OK. Thanks for the feedback! Pete From Bob_Jacobsen at lbl.gov Tue Aug 29 08:49:02 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 29 Aug 2006 07:49:02 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >is defined as: > > > Enables RTS flow-control handshaking. The driver raises the RTS line, >> enabling the DCE to send, when the input buffer has enough room to >> receive data. The driver lowers the RTS line, preventing the DCE to >> send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. > >which clearly reflects the newer usage style - it keeps the RTS line high >as long as there is space to _receive_ data. And takes it low when the >receive/input buffer is getting full to stop the modem from sending it data. > >Does this jive with other peoples understanding of RTS usage? Can you point to any devices that actually implement this "new" understanding? I think the person who wrote that documentation paragraph is just confused. The original "RTS/CTS" handshaking was extended to input (from DCE to DTE) handshaking via the DTR (Data Terminal Ready) line. I think the person who wrote the double-quoted paragraph above was just confused between the directions, and mixed them up. If you change "RTS" to "DTR" in that paragraph, you get: > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > enabling the DCE to send, when the input buffer has enough room to > > receive data. The driver lowers the DTR line, preventing the DCE to > > send, when the input buffer does not have enough room to receive >> data. If this value is used, it is an error for the application to adjust >> the line with EscapeCommFunction. which describes how dozens of devices actually work for controlling flow into the DTE (computer). This then leaves RTS/CTS (with RTS usually just stuck high) for controlling flow into the DCE (peripheral). Again, lots of hardware devices actually do this. I don't work on Windows, so can't be sure of what happens. But on the MacOS X version of RXTX, CTS low stops transmission, exactly as the "old" style would expect. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From mschned at basis.com Tue Aug 29 12:57:45 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 12:57:45 -0600 Subject: [Rxtx] Porting to AIX Message-ID: <01f201c6cb9d$034d4f20$341416ac@basis.com> Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar From mschned at basis.com Tue Aug 29 13:58:05 2006 From: mschned at basis.com (Mark E. Schnedar) Date: Tue, 29 Aug 2006 13:58:05 -0600 Subject: [Rxtx] Porting to AIX References: <01f201c6cb9d$034d4f20$341416ac@basis.com> Message-ID: <024901c6cba5$714c3560$341416ac@basis.com> After looking through the build messages closer, there is an error building SerialImp.c: gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type Looks like B57600 is not defined and there are no definitions for DEVICEDIR and LOCKDIR on AIX. Can I just a the following to SerialImp.h? #if defined(__aix__) # define DEVICEDIR "/dev/" # define LOCKDIR "/var/lock" # define LOCKFILEPREFIX "LCK.." # define FHS #endif /* __aix__ */ Mark Schnedar ----- Original Message ----- From: "Mark E. Schnedar" To: Sent: Tuesday, August 29, 2006 12:57 PM Subject: [Rxtx] Porting to AIX Hi, I'm new to rxtx. Currently my company has an interpreter product that uses rxtx on Windows and Linux. I am trying to get rxtx to build on AIX. I downloaded rxtx, ran ./configure and make. When I run make I get the following error: libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 Do you have any suggestions on how to fix this problem? I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error on both systems). I did have our system administrator load automake, autoconf, make (gnu), and gcc. Here are the versions: AIX 4.3.3 AIX 5.3.0 rxtx: 2.1-7r2 2.1-7r2 autoconf: 2.53 2.59 automake: 1.5 1.8.5 make: 3.79.1 3.80 gcc: (used native cc) 4.0.0 Any help would be appreciated. Mark Schnedar _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From pete.flugstad at gmail.com Tue Aug 29 15:25:35 2006 From: pete.flugstad at gmail.com (Pete Flugstad) Date: Tue, 29 Aug 2006 16:25:35 -0500 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <84d4a6d50608291425i1fb819d3i615cf9b85b1e9617@mail.gmail.com> On 8/29/06, Bob Jacobsen wrote: > Can you point to any devices that actually implement this "new" understanding? > > I think the person who wrote that documentation paragraph is just confused. The paragraph is from the Windows documentation of its DCB structure which is used to configure the Serial Device. This is what RXTX uses internally. My version is from MSDN, and Google finds the same text here: (search for fRtsControl). I have not seen any mention anywhere of it being incorrect (and yes, I did look, because I thought the same thing). My discussion is based on trying to use RXTX to talk to a device that used the old style of one-way flow control (RTS is raised to SEND data from the PC to the device). An existing VC++ app use the old-style RTS_CONTROL_TOGGLE. RXTX did not - it used the newer style RTS_CONTROL_HANDSHAKE, so things didn't work - the device was seeing RTS HIGH all the time, so it was thinking that the PC was ready to TX all the time. When I switch RXTX to using RTS_CONTROL_ENABLED and manually control RTS, then things work correctly. The behavior is consistent with this understanding if I hook two serial ports on Windows XP in lookback (via null modem). I'd be very surprised if this had not been corrected by M$ by this time. The same structure has been around since WinNT (mid 1990's) - their documentation is typically pretty good. > > > Enables DTR flow-control handshaking. The driver raises the DTR line, > > > enabling the DCE to send, when the input buffer has enough room to > > > receive data. The driver lowers the DTR line, preventing the DCE to > > > send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. There is a seperate field, fDtrControl, which you can set to DTR_CONTROL_HANDSHAKE, that appears to do exactly this. > This then leaves RTS/CTS (with RTS usually just stuck high) for > controlling flow into the DCE (peripheral). Again, lots of hardware > devices actually do this. > > I don't work on Windows, so can't be sure of what happens. But on > the MacOS X version of RXTX, CTS low stops transmission, exactly as > the "old" style would expect. Well, the Linux Serial HOWTO is where I got most of my information. And yes, I thought it was wrong as well, but it's apparently how things are implemented: Donno - but it works for me... Pete From tjarvi at qbang.org Tue Aug 29 19:11:40 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 29 Aug 2006 19:11:40 -0600 (MDT) Subject: [Rxtx] Porting to AIX In-Reply-To: <024901c6cba5$714c3560$341416ac@basis.com> References: <01f201c6cb9d$034d4f20$341416ac@basis.com> <024901c6cba5$714c3560$341416ac@basis.com> Message-ID: Hi Mark That should do it. You can put ifdef around the B57600 as we did with higher baudrates. You may want to use tip, minicom, kermit or some other serial application on the AIX to confirm that the lockfiles created are correct. Neat stuff. On Tue, 29 Aug 2006, Mark E. Schnedar wrote: > After looking through the build messages closer, > there is an error building SerialImp.c: > > gcc -I/home/mschned/rxtx-2.1-7r2 -Ipowerpc-ibm-aix5.3.0.0 -I. -I/usr/local/java/include -I/usr/local/java/include/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c -DPIC -o > /home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/.libs/SerialImp.o > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'get_java_baudrate': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: (Each undeclared identifier is reported only once > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:443: error: for each function it appears in.) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'translate_speed': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:931: error: 'B57600' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_isPortPrefixValid': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4579: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'Java_gnu_io_RXTXCommDriver_getDeviceDirectory': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:4634: error: 'DEVICEDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5205: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_lock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5285: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_lock_status': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5340: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'fhs_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5385: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'uucp_unlock': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5422: error: parse error before string constant > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'check_group_uucp': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5519: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c: In function 'is_device_locked': > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5665: error: 'LOCKDIR' undeclared (first use in this function) > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5676: warning: passing argument 1 of 'stat' from incompatible pointer type > /home/mschned/rxtx-2.1-7r2/./src/SerialImp.c:5690: warning: passing argument 2 of 'strncmp' from incompatible pointer type > > Looks like B57600 is not defined and there are no > definitions for DEVICEDIR and LOCKDIR on AIX. > > Can I just a the following to SerialImp.h? > > #if defined(__aix__) > # define DEVICEDIR "/dev/" > # define LOCKDIR "/var/lock" > # define LOCKFILEPREFIX "LCK.." > # define FHS > #endif /* __aix__ */ > > Mark Schnedar > > > ----- Original Message ----- > From: "Mark E. Schnedar" > To: > Sent: Tuesday, August 29, 2006 12:57 PM > Subject: [Rxtx] Porting to AIX > > > Hi, > > I'm new to rxtx. Currently my company has an interpreter product > that uses rxtx on Windows and Linux. I am trying to get rxtx to > build on AIX. I downloaded rxtx, ran ./configure and make. When > I run make I get the following error: > > libtool: link: `/home/mschned/rxtx-2.1-7r2/powerpc-ibm-aix5.3.0.0/SerialImp.lo' is not a valid libtool object > make: *** [powerpc-ibm-aix5.3.0.0/librxtxSerial.la] Error 1 > > Do you have any suggestions on how to fix this problem? > > I have tried building on AIX 4.3.3 and AIX 5.3.0 (same error > on both systems). I did have our system administrator load > automake, autoconf, make (gnu), and gcc. Here are the versions: > > AIX 4.3.3 AIX 5.3.0 > rxtx: 2.1-7r2 2.1-7r2 > autoconf: 2.53 2.59 > automake: 1.5 1.8.5 > make: 3.79.1 3.80 > gcc: (used native cc) 4.0.0 > > Any help would be appreciated. > > Mark Schnedar > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From guille at sms.nl Wed Aug 30 01:14:32 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 09:14:32 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> Message-ID: <7.0.1.0.0.20060830091204.03652de0@sms.nl> At 16:49 29/08/2006, Bob Jacobsen wrote: >At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > > > >Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >is defined as: > > > > > Enables RTS flow-control handshaking. The driver raises the RTS line, > >> enabling the DCE to send, when the input buffer has enough room to > >> receive data. The driver lowers the RTS line, preventing the DCE to > >> send, when the input buffer does not have enough room to receive > >> data. If this value is used, it is an error for the application to adjust > >> the line with EscapeCommFunction. > > > >which clearly reflects the newer usage style - it keeps the RTS line high > >as long as there is space to _receive_ data. And takes it low when the > >receive/input buffer is getting full to stop the modem from sending it data. > > > >Does this jive with other peoples understanding of RTS usage? > >Can you point to any devices that actually implement this "new" understanding? Many (most) of the embedded devices we work with implement this kind of flow control. The host (DTE) raises RTS when it can receive data, and lowers it when the input buffers are full. In turn it watches the CTS line to see whether it can send data to the DCE. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From tjarvi at qbang.org Wed Aug 30 01:23:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 30 Aug 2006 01:23:46 -0600 (MDT) Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830091204.03652de0@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > At 16:49 29/08/2006, Bob Jacobsen wrote: >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: >>> >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which >>> is defined as: >>> >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, >>>> enabling the DCE to send, when the input buffer has enough room to >>>> receive data. The driver lowers the RTS line, preventing the DCE to >>>> send, when the input buffer does not have enough room to receive >>>> data. If this value is used, it is an error for the application to adjust >>>> the line with EscapeCommFunction. >>> >>> which clearly reflects the newer usage style - it keeps the RTS line high >>> as long as there is space to _receive_ data. And takes it low when the >>> receive/input buffer is getting full to stop the modem from sending it data. >>> >>> Does this jive with other peoples understanding of RTS usage? >> >> Can you point to any devices that actually implement this "new" understanding? > > Many (most) of the embedded devices we work with implement this kind of flow > control. The host (DTE) raises RTS when it can receive data, and lowers it > when the input buffers are full. In turn it watches the CTS line to see > whether it can send data to the DCE. > I think this explains some hardware control 'bugs' I've seen. -- Trent Jarvi tjarvi at qbang.org From guille at sms.nl Wed Aug 30 02:01:35 2006 From: guille at sms.nl (Guillermo Rodriguez Garcia) Date: Wed, 30 Aug 2006 10:01:35 +0200 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> Message-ID: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> At 09:23 30/08/2006, Trent Jarvi wrote: >On Wed, 30 Aug 2006, Guillermo Rodriguez Garcia wrote: > > > At 16:49 29/08/2006, Bob Jacobsen wrote: > >> At 1:38 PM -0500 8/28/06, Pete Flugstad wrote: > >>> > >>> Now, RXTX on Windows uses RTS_CONTROL_HANDSHAKE, which > >>> is defined as: > >>> > >>> > Enables RTS flow-control handshaking. The driver raises the RTS line, > >>>> enabling the DCE to send, when the input buffer has enough room to > >>>> receive data. The driver lowers the RTS line, preventing the DCE to > >>>> send, when the input buffer does not have enough room to receive > >>>> data. If this value is used, it is an error for the > application to adjust > >>>> the line with EscapeCommFunction. > >>> > >>> which clearly reflects the newer usage style - it keeps the RTS line high > >>> as long as there is space to _receive_ data. And takes it low when the > >>> receive/input buffer is getting full to stop the modem from > sending it data. > >>> > >>> Does this jive with other peoples understanding of RTS usage? > >> > >> Can you point to any devices that actually implement this "new" > understanding? > > > > Many (most) of the embedded devices we work with implement this > kind of flow > > control. The host (DTE) raises RTS when it can receive data, and lowers it > > when the input buffers are full. In turn it watches the CTS line to see > > whether it can send data to the DCE. > > > >I think this explains some hardware control 'bugs' I've seen. I think the above is the most widespread use, but that may just mean it is the most widespread use in our specific segment (embedded systems). Some UART chips (e.g. from Exar) implement this kind of flow control directly in hardware. For example the Exar can be configured to suspend transmission when it sees CTS low, and resume transmission when it sees CTS high. This is also consistent with our experience. Maybe this helps clarify: http://www.tldp.org/HOWTO/Text-Terminal-HOWTO-10.html#ss10.7 Note the "Old RTS/CTS handshaking is different" section, which refers to "older terminals" whereas newer equipment would use RTS/CTS flow control (or equivalently DTR/DTS) as described above. Guillermo -- Guillermo Rodriguez Garcia Snijder Micro Systems phone +31-493-351020 G. Rodriguez Garcia fax +31-493-351530 Visser 25 email guille at sms.nl NL5751 BL Deurne The Netherlands http://www.snijder.com From Bob_Jacobsen at lbl.gov Wed Aug 30 07:55:31 2006 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed, 30 Aug 2006 06:55:31 -0700 Subject: [Rxtx] swtiching RTS_CONTROL_HANDSHAKE to RTS_CONTROL_TOGGLE In-Reply-To: <7.0.1.0.0.20060830095557.0374ff28@sms.nl> References: <84d4a6d50608281138i2c3015a1m5d933635dd651b43@mail.gmail.com> <7.0.1.0.0.20060830091204.03652de0@sms.nl> <7.0.1.0.0.20060830095557.0374ff28@sms.nl> Message-ID: I think we all agree that CTS inactive means "Send no more from DTE to DCE". The question is how to express the other direction, "Send no more from DCE to DTE". There are two parts to this question: What do various DTE-like devices do, and what do various DCE-like devices expect? Electrically, the lines that go that direction are DTR, DCD, and RTS (plus some special-purpose lines that are rarely present). All three devices I work most with respect the DTR lead. On the other hand, the FTDI chips for doing serial over USB provide either (RTS and CTS) or (DTR and DSR) as the two leads. What we're probably seeing is two different approaches, that have propagated separately. That's a problem. Bob -- Bob Jacobsen, UC Berkeley jacobsen at berkeley.edu +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG From Pawan.Kharbanda at dot.state.co.us Wed Aug 30 09:07:44 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Wed, 30 Aug 2006 09:07:44 -0600 Subject: [Rxtx] Port Locking / JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0455E5E5@hqexchange3.dot.state.co.us> Trent, Sorry for not responding earlier to your email. I was actually waiting for the release of our software on the new Hardware. As I mentioned in my previous emails, RXTX crashes and locks up serial ports with the older version of Redhat (Linux 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:28:55 EDT 2005 i686 i686 i386 GNU/Linux), it might work ok if you are using one or 2 ports but anything more than that it has issues. I was using JDK1.5.0_06 and older firmwares of Digi boxes. Let me know if you need any more specific information of the older system. Thanks Pawan Kharbanda -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Thursday, August 10, 2006 5:40 AM To: Kharbanda, Pawan Cc: Trent Jarvi; RXTX Developers and Users Subject: RE: Port Locking / JVM Crashing On Tue, 8 Aug 2006, Kharbanda, Pawan wrote: > Trent, > I found the culprit .... RXTX2.1.7 + JDK 1.5.0_06 + Redhat kernel > 2.4.21-37.Elsmp + digi box is a bad combination. I upgraded one of my > machine(with 8 processors) to the new kernel (2.6.9-34.0.2.ELsmp) and > have absolutely no problem with JVM crashing or Port Locking even > after 10000 operations (now I am trying 100,000 :). This is all with > the original RXTX 2.1.7 (final) api's without any of my fixes that I > have been trying for last 2-3 weeks. > > I will suggest that we update the INSTALL or Readme file accompnying > the RXTX saying the suggested kernel for Redhat Linux is > 2.6.9-34.0.2.Elsmp and use Digi PortServer II with the following configuration (Model: > PortServer TS 16 Rack Firmware: Version 82000684_S 05/22/2006 POST: > 82000685_G 02/02/2006). This should helped everybody using the RXTX > API's with RedHat Linux atleast. > Hi Pawan Would it be possible to get the full description of your system as it was while causing all the problems? That may be good information for someone searching the mail-list later. -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Aug 1 01:11:30 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 1 Aug 2006 09:11:30 +0200 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <34B6BC40-1405-4A13-8054-0FC6CE10466A@buechse.de> This is a problem with lock files. You should find it somewhere in the documentation... On 01.08.2006, at 03:53, Richard P. Welty wrote: > trying to get my app running on a Mac OS X powerbook, when > the following is executed as the first thing inside the > run method of a Thread: > > > try { > port = (SerialPort) selectedPort.open( > this.getClass().getName(), 2000); > } catch ( PortInUseException ex){ > ex.printStackTrace(); > return; > } > > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java: > 354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run > (ScaleWatcher.java:143) > > i've not seen any documentation suggesting that rxtx would be finicky > about application names... > > thanks for any suggestions, > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From rwelty at suespammers.org Tue Aug 1 05:37:53 2006 From: rwelty at suespammers.org (Richard P. Welty) Date: Tue, 01 Aug 2006 07:37:53 -0400 Subject: [Rxtx] Application Name? In-Reply-To: <44CEB408.7040407@suespammers.org> References: <44CEB408.7040407@suespammers.org> Message-ID: <44CF3D11.9060108@suespammers.org> Richard P. Welty wrote: > i get the following: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) Aha, a confusing error message. it's really a lock file problem; the code is trying to fill in the application name but when it's getting "Unknown Application" and filling that in... richard From ajmas at sympatico.ca Tue Aug 1 13:10:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:10:59 -0400 Subject: [Rxtx] Application Name? Message-ID: <20060801191059.HFCD18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> You need the source code in CVS. The forth coming 2.18 will correct this, but currently the only place to find the correction is in CVS. No idea when 2.18 is due. > > From: "Richard P. Welty" > Date: 2006/08/01 Tue AM 07:37:53 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Application Name? > > Richard P. Welty wrote: > > > i get the following: > > > > gnu.io.PortInUseException: Unknown Application > > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > > at > > com.krusty_motorsports.scale.monitor.ScaleWatcher.run(ScaleWatcher.java:143) > > Aha, a confusing error message. it's really a lock file problem; the > code is trying to fill in the application name but when it's getting > "Unknown Application" and filling that in... > > richard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:15:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:15:57 -0400 Subject: [Rxtx] Do interfaces break backwards compatibility? Message-ID: <20060801191557.BBXW10262.tomts22-srv.bellnexxia.net@smtp1.sympatico.ca> It is the class that decides to add serializable that needs to worry about those issues. For the most part serial ports and their connection states should be considered as transient, since there is no guarantee they will still be present or that their state will be, especially in a USB world. What you can store is the port settings and port id and then simply test for port availability next time. Nothing else should be assumed. > > From: Gregg Wonderly > Date: 2006/07/31 Mon PM 01:21:19 EDT > To: RXTX Developers and Users > Subject: Re: [Rxtx] Do interfaces break backwards compatibility? > > Doug Berkland wrote: > > As far as I can tell, nothing in either RXTX or Sun's JavaCOMM > > implements Serializable. Therefore, there are no worries from that > > either. (I can't think of a reason anything in JavaCOMM should > > implement Serializable either.) > > Any interface in javax.comm can become implemented by a serializable object. > Thus, if someone wants to provide remote access to a serial port, then they > might (and I think this is not wise) choose to subclass and add Serializable to > the interface list. > > It's that kind of Serialization compatibility that I'm talking about. > > Gregg Wonderly > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Tue Aug 1 13:18:11 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 1 Aug 2006 15:18:11 -0400 Subject: [Rxtx] precompiled for Intel Mac? Message-ID: <20060801191811.FLJY27612.tomts16-srv.bellnexxia.net@smtp1.sympatico.ca> > > From: Joachim Buechse > There will be. However not before we have figured out some remaining issues. What issues are remaining? Andre From Pawan.Kharbanda at dot.state.co.us Tue Aug 1 16:55:08 2006 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Tue, 1 Aug 2006 16:55:08 -0600 Subject: [Rxtx] JVM Crashing Message-ID: <939A619A756047469C41EE9BA51890FB0429E41A@hqexchange3.dot.state.co.us> Hi, I am also experiencing occasional JVM crash thru the native code. I am attaching the log from the crash. Any ideas what might be causing it???? Regards Pawan Kharbanda # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb75e39b2, pid=11017, tid=2369031088 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [librxtxSerial.so+0x69b2] initialise_event_info_struct+0x66 # --------------- T H R E A D --------------- Current thread (0x8d000480): JavaThread "Thread-119" [_thread_in_native, id=111 51] siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000ba Registers: EAX=0x0000000a, EBX=0xb75e83a8, ECX=0x00000000, EDX=0x0000000a ESP=0x8d3482b8, EBP=0x8d3482d0, ESI=0x8d3482e8, EDI=0x8d000540 EIP=0xb75e39b2, CR2=0x000000ba, EFLAGS=0x00010206 Top of Stack: (sp=0x8d3482b8) 0x8d3482b8: 30ffffff 00000000 8d3484cc b75e83a8 0x8d3482c8: 8d3482e8 8d000480 8d348490 b75e3c00 0x8d3482d8: 8d3482e8 8d3484cc 8d3483c4 8d3483d8 0x8d3482e8: 00000000 fbad8001 8d3483d8 8d3483d8 0x8d3482f8: 0834a4f0 00000000 8d34833c b75d0405 0x8d348308: 00000000 00000002 00000000 00000000 0x8d348318: 00000000 0834a4f0 8df7d1d8 b75d08fd 0x8d348328: 0834a4f0 8df7d1c0 b70717f0 00000000 Instructions: (pc=0xb75e39b2) 0xb75e39a2: 00 8b 82 b0 00 00 00 85 c0 74 0f 8d 76 00 89 c2 0xb75e39b2: 8b 80 b0 00 00 00 85 c0 75 f4 89 b2 b0